Add -mdynamic-no-pic to CFLAGS when compiling with GCC under OS X.
authorTord Romstad <tord@cm-84.215.83.169.getinternet.no>
Mon, 5 Apr 2010 19:47:28 +0000 (21:47 +0200)
committerTord Romstad <tord@cm-84.215.83.169.getinternet.no>
Mon, 5 Apr 2010 19:47:28 +0000 (21:47 +0200)
Without this flag, the __cpuid() function doesn't compile correctly
in 32-bit mode.

src/Makefile

index 748a739e254551daedf022a8efbe0b3e53e21b77..84b6d624f1e118d132df13803f3edbad8e4f692a 100644 (file)
@@ -212,16 +212,16 @@ osx-x86:
        $(MAKE) \
        CXX='g++' \
        CXXFLAGS="$(GCCFLAGS)" \
-       CXXFLAGS+='-arch i386' \
-       LDFLAGS+='-arch i386' \
+       CXXFLAGS+='-arch i386 -mdynamic-no-pic' \
+       LDFLAGS+='-arch i386 -mdynamic-no-pic' \
        all
 
 osx-x86_64:
        $(MAKE) \
        CXX='g++' \
        CXXFLAGS="$(GCCFLAGS)" \
-       CXXFLAGS+='-arch x86_64' \
-       LDFLAGS+='-arch x86_64' \
+       CXXFLAGS+='-arch x86_64 -mdynamic-no-pic' \
+       LDFLAGS+='-arch x86_64 -mdynamic-no-pic' \
        all
        
 osx-icc32: