diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-04-22 00:09:44 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-04-22 01:34:33 +0300 |
commit | 1bf04b934a8f51ac50be4cb9b6eacbb092871383 (patch) | |
tree | f4d10ac4c5e57d40e98d1abf6c514a69515dbe4b | |
parent | e37ae322b07a02714b22cb663e1d7ab4f2072730 (diff) |
Don't use -Wl,-syslibroot when building against more current SDKs
-rw-r--r-- | solenv/gbuild/platform/macosx.mk | 2 | ||||
-rw-r--r-- | solenv/inc/unxmacx.mk | 4 |
2 files changed, 5 insertions, 1 deletions
diff --git a/solenv/gbuild/platform/macosx.mk b/solenv/gbuild/platform/macosx.mk index ab955cf88d51..d4d113d3d600 100644 --- a/solenv/gbuild/platform/macosx.mk +++ b/solenv/gbuild/platform/macosx.mk @@ -95,7 +95,7 @@ gb_OBJCXXFLAGS := -x objective-c++ -fobjc-exceptions gb_OBJCFLAGS := -x objective-c -fobjc-exceptions gb_LinkTarget_LDFLAGS := \ - -Wl,-syslibroot,$(gb_SDKDIR) \ + $(if $(filter 1040 1050,$(MAC_OS_X_VERSION_MIN_REQUIRED)),-Wl$(COMMA)-syslibroot$(COMMA)$(gb_SDKDIR)) \ $(subst -L../lib , ,$(SOLARLIB)) \ #man ld says: obsolete -Wl,-multiply_defined,suppress \ diff --git a/solenv/inc/unxmacx.mk b/solenv/inc/unxmacx.mk index e4027830e9a0..1ca6a8259267 100644 --- a/solenv/inc/unxmacx.mk +++ b/solenv/inc/unxmacx.mk @@ -178,8 +178,12 @@ LINK*=$(CXX) LINKC*=$(CC) LINKFLAGSDEFS*=-Wl,-multiply_defined,suppress + +.IF "$(MAC_OS_X_VERSION_MIN_REQUIRED)" <= "1050" # assure backwards-compatibility EXTRA_LINKFLAGS*:=-Wl,-syslibroot,$(MACOSX_SDK_PATH) +.ENDIF + # Very long install_names are needed so that install_name_tool -change later on # does not complain that "larger updated load commands do not fit:" LINKFLAGSRUNPATH_URELIB=-install_name '@__________________________________________________URELIB/$(@:f)' |