diff options
author | Dan Gohman <gohman@apple.com> | 2010-06-01 14:56:56 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2010-06-01 14:56:56 +0000 |
commit | da612d62260220618af9be428aa827d5d04f344f (patch) | |
tree | 4824c9b5e9ce4c09d4a1418128dfbd519c067360 /Makefile.rules | |
parent | c6e1f67b17b4cb9d707af1245c1ecf00f91f23c0 (diff) |
-retain-symbols-file is not what it seems. Update the makefiles
and configury to use --version-script.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105271 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Makefile.rules')
-rw-r--r-- | Makefile.rules | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/Makefile.rules b/Makefile.rules index 408588132f..942cb9d4d7 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -990,8 +990,21 @@ $(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir clean-local:: -$(Verb) $(RM) -f $(NativeExportsFile) else +ifeq ($(HAVE_LINK_VERSION_SCRIPT),1) +# Gold and BFD ld require a version script rather than a plain list. +NativeExportsFile := $(ObjDir)/$(notdir $(EXPORTED_SYMBOL_FILE)).map +$(NativeExportsFile): $(EXPORTED_SYMBOL_FILE) $(ObjDir)/.dir + $(Verb) echo "{" > $@ + $(Verb) grep -q "\<" $< && echo " global:" >> $@ || : + $(Verb) sed -e 's/\>/;/' -e 's/^\</ /' < $< >> $@ + $(Verb) echo " local: *;" >> $@ + $(Verb) echo "};" >> $@ +clean-local:: + -$(Verb) $(RM) -f $(NativeExportsFile) +else NativeExportsFile := $(EXPORTED_SYMBOL_FILE) endif +endif # Now add the linker command-line options to use the native export file. @@ -1000,8 +1013,8 @@ LLVMLibsOptions += -Wl,-exported_symbols_list,$(NativeExportsFile) endif # gold, bfd ld, etc. -ifeq ($(HAVE_LINK_RETAIN_SYMBOLS_FILE),1) -LLVMLibsOptions += -Wl,-retain-symbols-file,$(NativeExportsFile) +ifeq ($(HAVE_LINK_VERSION_SCRIPT),1) +LLVMLibsOptions += -Wl,--version-script,$(NativeExportsFile) endif endif |