comparison make/bsd/makefiles/gcc.make @ 8682:d778bb46a9a5

8008451: Make mac builds on 10.8 work on 10.7 Reviewed-by: jcoomes, ohair
author erikj
date Mon, 04 Mar 2013 22:39:00 -0800
parents 892acf0431ef
children cb75b67f04fb
comparison
equal deleted inserted replaced
8681:27714220e50e 8682:d778bb46a9a5
227 # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp. 227 # -DDONT_USE_PRECOMPILED_HEADER will exclude all includes in precompiled.hpp.
228 ifeq ($(USE_PRECOMPILED_HEADER),0) 228 ifeq ($(USE_PRECOMPILED_HEADER),0)
229 CFLAGS += -DDONT_USE_PRECOMPILED_HEADER 229 CFLAGS += -DDONT_USE_PRECOMPILED_HEADER
230 endif 230 endif
231 231
232 ifeq ($(OS_VENDOR), Darwin)
233 # Setting these parameters makes it an error to link to macosx APIs that are
234 # newer than the given OS version and makes the linked binaries compatible even
235 # if built on a newer version of the OS.
236 # The expected format is X.Y.Z
237 ifeq ($(MACOSX_VERSION_MIN),)
238 MACOSX_VERSION_MIN=10.7.0
239 endif
240 # The macro takes the version with no dots, ex: 1070
241 CFLAGS += -DMAC_OS_X_VERSION_MAX_ALLOWED=$(subst .,,$(MACOSX_VERSION_MIN)) \
242 -mmacosx-version-min=$(MACOSX_VERSION_MIN)
243 LDFLAGS += -mmacosx-version-min=$(MACOSX_VERSION_MIN)
244 endif
245
232 #------------------------------------------------------------------------ 246 #------------------------------------------------------------------------
233 # Linker flags 247 # Linker flags
234 248
235 # statically link libstdc++.so, work with gcc but ignored by g++ 249 # statically link libstdc++.so, work with gcc but ignored by g++
236 STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic 250 STATIC_STDCXX = -Wl,-Bstatic -lstdc++ -Wl,-Bdynamic