aboutsummaryrefslogtreecommitdiff
path: root/Makefile.rules
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2010-04-16 22:58:15 +0000
committerDan Gohman <gohman@apple.com>2010-04-16 22:58:15 +0000
commite05f609b61c23846ee21a24a97631d2364f55078 (patch)
treeb71fb59e87fb66b9dbc2c85e0acde20be4cc27ed /Makefile.rules
parentf7e2bc80d1c645c347532f0847b77ed72b348e5a (diff)
Add an autoconf check for -retain-symbols-file and conditionalize
use of that option with it. This eliminates an imprecise "Linux" test, and should help support old versions of gold. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101560 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r--Makefile.rules13
1 files changed, 6 insertions, 7 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 9ff6c79b6e..6e17781314 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -561,7 +561,7 @@ ifeq ($(HOST_OS),Darwin)
# Get "4" out of 10.4 for later pieces in the makefile.
DARWIN_MAJVERS := $(shell echo $(DARWIN_VERSION)| sed -E 's/10.([0-9]).*/\1/')
- SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined -Wl,suppress \
+ SharedLinkOptions=-Wl,-flat_namespace -Wl,-undefined,suppress \
-dynamiclib
ifneq ($(ARCH),ARM)
SharedLinkOptions += -mmacosx-version-min=$(DARWIN_VERSION)
@@ -990,13 +990,12 @@ endif
# Now add the linker command-line options to use the native export file.
ifeq ($(HOST_OS),Darwin)
-LLVMLibsOptions += -Wl,-exported_symbols_list -Wl,$(NativeExportsFile)
+LLVMLibsOptions += -Wl,-exported_symbols_list,$(NativeExportsFile)
endif
-# This isn't really Linux-specific; it works at least on gold and bfd ld, but
-# there's no convenient way to detect it.
-ifeq ($(HOST_OS),Linux)
-LLVMLibsOptions += -Wl,-retain-symbols-file -Wl,$(NativeExportsFile)
+# gold, bfd ld, etc.
+ifeq ($(HAVE_LINK_RETAIN_SYMBOLS_FILE),1)
+LLVMLibsOptions += -Wl,-retain-symbols-file,$(NativeExportsFile)
endif
endif
@@ -1297,7 +1296,7 @@ ifeq ($(HOST_OS),Darwin)
# Tiger tools don't support this.
ifneq ($(DARWIN_MAJVERS),4)
-LD.Flags += -Wl,-exported_symbol -Wl,_main
+LD.Flags += -Wl,-exported_symbol,_main
endif
endif