diff options
-rw-r--r-- | Makefile.Linux | 6 | ||||
-rw-r--r-- | Makefile.common | 7 | ||||
-rw-r--r-- | Makefile.rules | 7 |
3 files changed, 11 insertions, 9 deletions
diff --git a/Makefile.Linux b/Makefile.Linux index 27ae66e459..4d411f081e 100644 --- a/Makefile.Linux +++ b/Makefile.Linux @@ -10,10 +10,10 @@ # MakeSharedObjectOption := -shared -# ExportSymbols - This is used by tools that need to make sure that all of their -# symbols are exported for use at runtime by dlsym. +# PLATFORMLINKOPTS - On Linux, we must specify this linker option so that all +# symbols are exported by tools for runtime use by dlsym. # -ExportSymbols := -Wl,--export-dynamic +PLATFORMLINKOPTS := -Wl,--export-dynamic # Path to location for LLVM front-end for this architecture. This setting may # be overriden by the Makefile.config option, and should not override it if set. diff --git a/Makefile.common b/Makefile.common index b9b1cc5b96..6d1698e2ba 100644 --- a/Makefile.common +++ b/Makefile.common @@ -393,6 +393,7 @@ STATICUSEDLIBS := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS))) USED_LIB_PATHS_G := $(addprefix $(LIBDEBUG)/, $(STATICUSEDLIBS)) USED_LIB_PATHS_O := $(addprefix $(LIBRELEASE)/, $(STATICUSEDLIBS)) USED_LIB_PATHS_P := $(addprefix $(LIBPROFILE)/, $(STATICUSEDLIBS)) +LINK_OPTS := $(TOOLLINKOPTS) $(PLATFORMLINKOPTS) all:: $(TOOLEXENAMES) clean:: @@ -400,15 +401,15 @@ clean:: $(TOOLEXENAME_G): $(ObjectsG) $(USED_LIB_PATHS_G) $(BUILD_ROOT_TOP)/tools/Debug/.dir @echo ======= Linking $(TOOLNAME) debug executable $(WARN_MSG) ======= - $(VERB) $(LinkG) -o $@ $(ObjectsG) $(USED_LIBS_OPTIONS_G) $(TOOLLINKOPTS) + $(VERB) $(LinkG) -o $@ $(ObjectsG) $(USED_LIBS_OPTIONS_G) $(LINK_OPTS) $(TOOLEXENAME_O): $(ObjectsO) $(USED_LIB_PATHS_O) $(BUILD_ROOT_TOP)/tools/Release/.dir @echo ======= Linking $(TOOLNAME) release executable ======= - $(VERB) $(LinkO) -o $@ $(ObjectsO) $(USED_LIBS_OPTIONS_O) $(TOOLLINKOPTS) + $(VERB) $(LinkO) -o $@ $(ObjectsO) $(USED_LIBS_OPTIONS_O) $(LINK_OPTS) $(TOOLEXENAME_P): $(ObjectsP) $(USED_LIB_PATHS_P) $(BUILD_ROOT_TOP)/tools/Profile/.dir @echo ======= Linking $(TOOLNAME) profile executable ======= - $(VERB) $(LinkP) -o $@ $(ObjectsP) $(USED_LIBS_OPTIONS_P) $(TOOLLINKOPTS) + $(VERB) $(LinkP) -o $@ $(ObjectsP) $(USED_LIBS_OPTIONS_P) $(LINK_OPTS) endif diff --git a/Makefile.rules b/Makefile.rules index b9b1cc5b96..6d1698e2ba 100644 --- a/Makefile.rules +++ b/Makefile.rules @@ -393,6 +393,7 @@ STATICUSEDLIBS := $(patsubst %.a.o, lib%.a, $(addsuffix .o, $(USEDLIBS))) USED_LIB_PATHS_G := $(addprefix $(LIBDEBUG)/, $(STATICUSEDLIBS)) USED_LIB_PATHS_O := $(addprefix $(LIBRELEASE)/, $(STATICUSEDLIBS)) USED_LIB_PATHS_P := $(addprefix $(LIBPROFILE)/, $(STATICUSEDLIBS)) +LINK_OPTS := $(TOOLLINKOPTS) $(PLATFORMLINKOPTS) all:: $(TOOLEXENAMES) clean:: @@ -400,15 +401,15 @@ clean:: $(TOOLEXENAME_G): $(ObjectsG) $(USED_LIB_PATHS_G) $(BUILD_ROOT_TOP)/tools/Debug/.dir @echo ======= Linking $(TOOLNAME) debug executable $(WARN_MSG) ======= - $(VERB) $(LinkG) -o $@ $(ObjectsG) $(USED_LIBS_OPTIONS_G) $(TOOLLINKOPTS) + $(VERB) $(LinkG) -o $@ $(ObjectsG) $(USED_LIBS_OPTIONS_G) $(LINK_OPTS) $(TOOLEXENAME_O): $(ObjectsO) $(USED_LIB_PATHS_O) $(BUILD_ROOT_TOP)/tools/Release/.dir @echo ======= Linking $(TOOLNAME) release executable ======= - $(VERB) $(LinkO) -o $@ $(ObjectsO) $(USED_LIBS_OPTIONS_O) $(TOOLLINKOPTS) + $(VERB) $(LinkO) -o $@ $(ObjectsO) $(USED_LIBS_OPTIONS_O) $(LINK_OPTS) $(TOOLEXENAME_P): $(ObjectsP) $(USED_LIB_PATHS_P) $(BUILD_ROOT_TOP)/tools/Profile/.dir @echo ======= Linking $(TOOLNAME) profile executable ======= - $(VERB) $(LinkP) -o $@ $(ObjectsP) $(USED_LIBS_OPTIONS_P) $(TOOLLINKOPTS) + $(VERB) $(LinkP) -o $@ $(ObjectsP) $(USED_LIBS_OPTIONS_P) $(LINK_OPTS) endif |