summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornoloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2015-07-01 02:05:33 +0000
committernoloader <noloader@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2015-07-01 02:05:33 +0000
commit310147fd47915cc37b48669c4b051cec8e8b57de (patch)
treecf74dfe6c580e7c58f5fb2eca24baa9ee496be3e
parent952c650b82f6dafa642ef09952a1987f2c998030 (diff)
downloadcryptopp-310147fd47915cc37b48669c4b051cec8e8b57de.tar.gz
Removed -fPIC for Cygwin x86_64 compiles
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@560 57ff6487-cd31-0410-9ec3-f628ee90f5f0
-rw-r--r--GNUmakefile13
1 files changed, 10 insertions, 3 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 2695e65..c87cf5f 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -14,8 +14,9 @@ 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")
+IS_LINUX = $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -i -c "linux")
+IS_MINGW = $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -i -c "mingw")
+IS_CYGWIN = $(shell $(CXX) -dumpmachine 2>&1 | $(EGREP) -i -c "cygwin")
CLANG_COMPILER = $(shell $(CXX) --version 2>&1 | $(EGREP) -i -c "clang")
# Default prefix for make install
@@ -23,9 +24,12 @@ ifeq ($(PREFIX),)
PREFIX = /usr
endif
-ifeq ($(CXX),gcc) # for some reason CXX is gcc on cygwin 1.1.4
+# For some reason CXX is gcc on cygwin 1.1.4
+ifneq ($(IS_CYGWIN),0)
+ifeq ($(CXX),gcc)
CXX = g++
endif
+endif
ifeq ($(IS_X86),1)
@@ -38,8 +42,11 @@ GAS219_OR_LATER = $(shell $(CXX) -xc -c /dev/null -Wa,-v -o/dev/null 2>&1 | $(EG
#Enable PIC for x86_64 targets
ifneq ($(IS_X86_64),0)
+# But don't enable it on Cygwin x86_64
+ifeq ($(IS_CYGWIN),0)
CXXFLAGS += -fPIC
endif
+endif
ifneq ($(GCC42_OR_LATER),0)
ifeq ($(UNAME),Darwin)