summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2015-07-09 06:11:28 +0000
committernoloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2015-07-09 06:11:28 +0000
commit2d4b3d58c671ec0c58a381b2ebe9e2f3aad55556 (patch)
treed1506babfc3240ddc9068047f58debb76c039d94
parent939c59c745b461c9f485ef27d7f567263be4d3ae (diff)
downloadcryptopp-2d4b3d58c671ec0c58a381b2ebe9e2f3aad55556.tar.gz
Fixed multiarch detection on OS X
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@576 57ff6487-cd31-0410-9ec3-f628ee90f5f0
-rw-r--r--GNUmakefile11
1 files changed, 7 insertions, 4 deletions
diff --git a/GNUmakefile b/GNUmakefile
index f1cdc88..ca36725 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,6 +1,6 @@
CXXFLAGS ?= -DNDEBUG
SYMBOLS ?= -g2
-OPTIMIZE ?= -O3
+OPTIMIZE ?= -O2
# -fPIC is supported, and enabled by default for x86_64.
# the following options reduce code size, but breaks link or makes link very slow on some systems
# CXXFLAGS += -ffunction-sections -fdata-sections
@@ -41,6 +41,7 @@ endif
endif
# End Cygwin work arounds
+# Merge symbols and optimizations
CXXFLAGS += $(SYMBOLS) $(OPTIMIZE)
ifeq ($(IS_X86),1)
@@ -60,13 +61,15 @@ CXXFLAGS += -fPIC
endif
endif
-ifneq ($(GCC42_OR_LATER),0)
-ifneq ($(IS_DARWIN),0)
+# We can do integer math using the Posix shell in a GNUmakefile
+# Below, we are building a boolean circuit that says "Darwin && (GCC 4.2 || Clang)"
+MULTIARCH_SUPPORT = $(shell echo $$(($(IS_DARWIN) * ($(GCC42_OR_LATER) + $(CLANG_COMPILER)))))
+
+ifneq ($(MULTIARCH_SUPPORT),0)
CXXFLAGS += -arch x86_64 -arch i386
else
CXXFLAGS += -march=native
endif
-endif
ifneq ($(INTEL_COMPILER),0)
CXXFLAGS += -wd68 -wd186 -wd279 -wd327