On Monday, June 8, 2015 at 12:19:59 AM UTC-4, Jeffrey Walton wrote: > > There's an open issue on the old issue tracker that asks for a pkg-config > file for Crypto++. See > https://sourceforge.net/p/cryptopp/feature-requests/44/. > > We also have a patch called DataDir that allows the Crypto++ self tests to > run after installation into /usr or /usr/local. See > http://www.cryptopp.com/wiki/DataDir. > > QUESTION: will one pkg-config file suffice, like that provided by Fedora > at http://pkgs.fedoraproject.org/cgit/cryptopp.git/tree/cryptopp.pc? Or > are there different pkg-config files, depending on the distro? > > QUESTION: do the DataDir patch accomplish what you need as a maintainer? > Would it be helpful to include in Master? >
The following is the patch we are considering. It adds -fPIC for x86_64 targets: diff --git a/GNUmakefile b/GNUmakefile index 61204cf..8f8e643 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -12,6 +12,7 @@ MKDIR = mkdir EGREP = egrep UNAME = $(shell uname) IS_X86 = $(shell uname -m | $(EGREP) -c "i.86|x86|i86|amd64") +IS_X86_64 = $(shell uname -m | $(EGREP) -c "_64|d64") IS_SUN_CC = $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: Sun") IS_LINUX = $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -c "linux") IS_MINGW = $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -c "mingw") @@ -26,6 +27,11 @@ ifeq ($(CXX),gcc) # for some reason CXX is gcc on cygwin 1 CXX = g++ endif +# Enable PIC for x86_64 targets +ifneq ($(IS_X86_64),0) +CXXFLAGS += -fPIC +endif + ifeq ($(IS_X86),1) GCC42_OR_LATER = $(shell $(CXX) -v 2>&1 | $(EGREP) -c "^gcc version (4.[2-9]|[5 @@ -81,7 +87,7 @@ endif ifeq ($(IS_LINUX),1) LDFLAGS += -pthread -ifneq ($(shell uname -i | $(EGREP) -c "(_64|d64)"),0) +ifneq ($(IS_X86_64),0) M32OR64 = -m64 endif endif -fPIC does not appear to be needed on OS X 10.7 - 10.0 or OpenBSD 5.7. But rather that special case it (GNU make lacks logical operators), I think its easiest to add it for all targets. Jeff -- -- You received this message because you are subscribed to the "Crypto++ Users" Google Group. To unsubscribe, send an email to [email protected]. More information about Crypto++ and this group is available at http://www.cryptopp.com. --- You received this message because you are subscribed to the Google Groups "Crypto++ Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
