From 2bcb0bc790768fbcf379ed8577ff44731db17184 Mon Sep 17 00:00:00 2001 From: Thomas Klausner Date: Sun, 1 Mar 2020 10:49:43 +0100 Subject: [PATCH] findcrcs: fix build with gcc --- findcrcs/Makefile | 6 ++++++ findcrcs/distinfo | 2 +- findcrcs/patches/patch-Makefile | 4 ++-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/findcrcs/Makefile b/findcrcs/Makefile index fb98662474..ad61e8ec34 100644 --- a/findcrcs/Makefile +++ b/findcrcs/Makefile @@ -15,6 +15,12 @@ USE_LANGUAGES= c++ TEST_TARGET= test INSTALLATION_DIRS= bin share/doc/findcrcs +.include "../../mk/compiler.mk" + +.if !empty(CC_VERSION:Mgcc*) +CXXFLAGS+= -mcrc32 +.endif + do-install: ${INSTALL_PROGRAM} ${WRKSRC}/findcrcs ${DESTDIR}${PREFIX}/bin ${INSTALL_DATA} ${WRKSRC}/README ${DESTDIR}${PREFIX}/share/doc/findcrcs diff --git a/findcrcs/distinfo b/findcrcs/distinfo index aa92b408e2..7ea8ef7f1d 100644 --- a/findcrcs/distinfo +++ b/findcrcs/distinfo @@ -4,5 +4,5 @@ SHA1 (findcrcs-0.3.tar.gz) = 5144f3d17c318706b3e8113242bccfc59b62bfb7 RMD160 (findcrcs-0.3.tar.gz) = 05e6c25a15f1cfa78bad06a76e8862ffaf25e897 SHA512 (findcrcs-0.3.tar.gz) = b55a59fc3b2d11f10c87cb05d428409043bdcaaefc42a10c456f5fffc3ede18cc02f09397399cc60a6295666872776eb10662ec089d315f512129faac26b7d4f Size (findcrcs-0.3.tar.gz) = 3981565 bytes -SHA1 (patch-Makefile) = 39cae0bee0e4507fe7afa25371b35c44bd3e3568 +SHA1 (patch-Makefile) = 334bf957a75b92073014e8aacf022cd866792fba SHA1 (patch-findcrcs.cc) = 80cc824ca3e3470050f488cdf35e136886922825 diff --git a/findcrcs/patches/patch-Makefile b/findcrcs/patches/patch-Makefile index ddbfb17b9f..ecf126f02f 100644 --- a/findcrcs/patches/patch-Makefile +++ b/findcrcs/patches/patch-Makefile @@ -9,13 +9,13 @@ Honor LDFLAGS (fixes RELRO). $(BINARY): findcrcs.cc md5.c md5.h crcutil-1.0 crcutil.a - $(BINPREFIX)g++ -O3 -D_FILE_OFFSET_BITS=64 -Wall -o $@ $(EXEFLAGS) findcrcs.cc md5.c crcutil.a -Icrcutil-1.0/code -Icrcutil-1.0/examples -+ $(BINPREFIX)g++ -O3 -D_FILE_OFFSET_BITS=64 -Wall -o $@ $(EXEFLAGS) $(LDFLAGS) findcrcs.cc md5.c crcutil.a -Icrcutil-1.0/code -Icrcutil-1.0/examples ++ $(BINPREFIX)g++ -O3 -D_FILE_OFFSET_BITS=64 -Wall -o $@ $(EXEFLAGS) $(CXXFLAGS) $(LDFLAGS) findcrcs.cc md5.c crcutil.a -Icrcutil-1.0/code -Icrcutil-1.0/examples $(BINPREFIX)strip -s $@ crcutil.a: crcutil-1.0 rm -rf *.o - $(BINPREFIX)g++ -O3 -Wall -mcrc32 -c crcutil-1.0/examples/interface.cc crcutil-1.0/code/*.cc -Icrcutil-1.0/code -Icrcutil-1.0/tests -Icrcutil-1.0/examples -+ $(BINPREFIX)g++ -O3 -Wall -c crcutil-1.0/examples/interface.cc crcutil-1.0/code/*.cc -Icrcutil-1.0/code -Icrcutil-1.0/tests -Icrcutil-1.0/examples ++ $(BINPREFIX)g++ -O3 -Wall $(CXXFLAGS) -c crcutil-1.0/examples/interface.cc crcutil-1.0/code/*.cc -Icrcutil-1.0/code -Icrcutil-1.0/tests -Icrcutil-1.0/examples $(BINPREFIX)ar r crcutil.a *.o rm -rf *.o