From 5d1ba61966faf7c49cd7a38fb9adb7cdca1d9ca1 Mon Sep 17 00:00:00 2001 From: Raoul Gough Date: Fri, 24 Jan 2003 21:38:57 +0000 Subject: [PATCH] Support for suppressing the export-all-symbols linker flag [SVN r17037] --- gcc-tools.jam | 7 ++++++- v1/gcc-tools.jam | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/gcc-tools.jam b/gcc-tools.jam index 1440ca1ea..942a0fab7 100644 --- a/gcc-tools.jam +++ b/gcc-tools.jam @@ -355,10 +355,15 @@ rule Link-action DLL_LINK_FLAGS = "" ; } + # Allow gcc-nocygwin to avoid this flag + if ! $(GCC_NO_EXPORT_ALL) { + DLL_LINK_FLAGS = "$(DLL_LINK_FLAGS)-Wl,--export-all-symbols " ; + } + # This will appear before the import library name when building a DLL, but # will be "multiplied away" otherwise. The --exclude-symbols directive # proved to be neccessary with some versions of Cygwin. - IMPLIB_COMMAND on $(<) = "$(DLL_LINK_FLAGS)-Wl,--export-all-symbols -Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__ -Wl,--out-implib," ; + IMPLIB_COMMAND on $(<) = "$(DLL_LINK_FLAGS)-Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__ -Wl,--out-implib," ; DEPENDS $(<) : $(NEEDLIBS) $(NEEDIMPS) ; gRUN_LD_LIBRARY_PATH($(<)) += $(STDLIBPATH:T) ; diff --git a/v1/gcc-tools.jam b/v1/gcc-tools.jam index 1440ca1ea..942a0fab7 100644 --- a/v1/gcc-tools.jam +++ b/v1/gcc-tools.jam @@ -355,10 +355,15 @@ rule Link-action DLL_LINK_FLAGS = "" ; } + # Allow gcc-nocygwin to avoid this flag + if ! $(GCC_NO_EXPORT_ALL) { + DLL_LINK_FLAGS = "$(DLL_LINK_FLAGS)-Wl,--export-all-symbols " ; + } + # This will appear before the import library name when building a DLL, but # will be "multiplied away" otherwise. The --exclude-symbols directive # proved to be neccessary with some versions of Cygwin. - IMPLIB_COMMAND on $(<) = "$(DLL_LINK_FLAGS)-Wl,--export-all-symbols -Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__ -Wl,--out-implib," ; + IMPLIB_COMMAND on $(<) = "$(DLL_LINK_FLAGS)-Wl,--exclude-symbols,_bss_end__:_bss_start__:_data_end__:_data_start__ -Wl,--out-implib," ; DEPENDS $(<) : $(NEEDLIBS) $(NEEDIMPS) ; gRUN_LD_LIBRARY_PATH($(<)) += $(STDLIBPATH:T) ;