--- ./GNUmakefile.orig 2010-08-09 14:22:42.000000000 -0700 +++ ./GNUmakefile 2012-07-21 03:14:01.000000000 +0200 @@ -1,4 +1,4 @@ -CXXFLAGS = -DNDEBUG -g -O2 +#CXXFLAGS = -DNDEBUG -g -O2 #CXXFLAGS = -g # -fPIC is supported. Please report any breakage of -fPIC as a bug. # CXXFLAGS += -fPIC @@ -28,9 +28,9 @@ INTEL_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\)") ICC111_OR_LATER = $(shell $(CXX) --version 2>&1 | $(EGREP) -c "\(ICC\) ([2-9][0-9]|1[2-9]|11\.[1-9])") IS_SUN_CC = $(shell $(CXX) -V 2>&1 | $(EGREP) -c "CC: Sun") -GAS210_OR_LATER = $(shell echo "" | $(AS) -v 2>&1 | $(EGREP) -c "GNU assembler version (2\.[1-9][0-9]|[3-9])") -GAS217_OR_LATER = $(shell echo "" | $(AS) -v 2>&1 | $(EGREP) -c "GNU assembler version (2\.1[7-9]|2\.[2-9]|[3-9])") -GAS219_OR_LATER = $(shell echo "" | $(AS) -v 2>&1 | $(EGREP) -c "GNU assembler version (2\.19|2\.[2-9]|[3-9])") +GAS210_OR_LATER = $(shell echo "" | $(CXX) -xc -c -Wa,-v -o/dev/null - 2>&1 | $(EGREP) -c "GNU assembler version (2\.[1-9][0-9]|[3-9])") +GAS217_OR_LATER = $(shell echo "" | $(CXX) -xc -c -Wa,-v -o/dev/null - 2>&1 | $(EGREP) -c "GNU assembler version (2\.1[7-9]|2\.[2-9]|[3-9])") +GAS219_OR_LATER = $(shell echo "" | $(CXX) -xc -c -Wa,-v -o/dev/null - 2>&1 | $(EGREP) -c "GNU assembler version (2\.19|2\.[2-9]|[3-9])") ISMINGW = $(shell $(CXX) --version 2>&1 | $(EGREP) -c "mingw") ifneq ($(GCC42_OR_LATER),0) @@ -151,7 +151,7 @@ $(RANLIB) $@ libcryptopp.so: $(LIBOBJS) - $(CXX) -shared -o $@ $(LIBOBJS) + $(CXX) -shared -o $@ $(CXXFLAGS) $(LDFLAGS) $(LIBOBJS) cryptest.exe: libcryptopp.a $(TESTOBJS) $(CXX) -o $@ $(CXXFLAGS) $(TESTOBJS) -L. -lcryptopp $(LDFLAGS) $(LDLIBS)