diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | Makerules | 6 | ||||
-rw-r--r-- | config.make.in | 1 | ||||
-rwxr-xr-x | configure | 13 | ||||
-rw-r--r-- | configure.in | 8 |
5 files changed, 34 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog index 7b36252bb0..77941b09eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2011-07-02 Roland McGrath <roland@hack.frob.com> + * config.make.in (use-default-link): New variable. + * configure.in (use_default_link): Grok --with-default-link to set it. + * configure: Regenerated. + * Makerules [$(elf) = yes] [$(use-default-link) = yes]: + (shlib-lds, shlib-lds-flags): Define to empty. + * Makerules (shlib-lds): New variable. (shlib-lds-flags): New variable. (build-shlib, build-moduile, build-module-asneeded): Use it. diff --git a/Makerules b/Makerules index d3cb4cc106..23d9f1c166 100644 --- a/Makerules +++ b/Makerules @@ -479,6 +479,11 @@ endif endif ifeq (yes,$(elf)) +ifeq (yes,$(use-default-link)) +# If the linker is good enough, we can let it use its default linker script. +shlib-lds = +shlib-lds-flags = +else # binutils only position loadable notes into the first page for binaries, # not for shared objects $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules @@ -516,6 +521,7 @@ common-generated += shlib.lds shlib-lds = $(common-objpfx)shlib.lds shlib-lds-flags = -T $(shlib-lds) +endif define build-shlib $(build-shlib-helper) -o $@ $(shlib-lds-flags) \ diff --git a/config.make.in b/config.make.in index 0656b1bca0..34842bfcd6 100644 --- a/config.make.in +++ b/config.make.in @@ -69,6 +69,7 @@ have-cc-with-libunwind = @libc_cv_cc_with_libunwind@ fno-unit-at-a-time = @fno_unit_at_a_time@ bind-now = @bindnow@ have-hash-style = @libc_cv_hashstyle@ +use-default-link = @use_default_link@ static-libgcc = @libc_cv_gcc_static_libgcc@ diff --git a/configure b/configure index 20e73409ae..e8ad775e4d 100755 --- a/configure +++ b/configure @@ -696,6 +696,7 @@ force_install bindnow oldest_abi enable_check_abi +use_default_link with_cvs with_fp ac_ct_CXX @@ -770,6 +771,7 @@ with_selinux with_xcoff with_cvs with_headers +with_default_link enable_sanity_checks enable_check_abi enable_shared @@ -1464,6 +1466,7 @@ Optional Packages: --without-cvs if CVS should not be used --with-headers=PATH location of system headers to use (for example /usr/src/linux/include) [default=compiler default] + --with-default-link do not use explicit linker scripts [default=no] --with-tls enable support for TLS --without-__thread do not use TLS features even when supporting them --with-cpu=CPU select code for CPU variant @@ -3581,6 +3584,16 @@ else fi + + +# Check whether --with-default-link was given. +if test "${with_default_link+set}" = set; then : + withval=$with_default_link; use_default_link=$withval +else + use_default_link=no +fi + + # Check whether --enable-sanity-checks was given. if test "${enable_sanity_checks+set}" = set; then : enableval=$enable_sanity_checks; enable_sanity=$enableval diff --git a/configure.in b/configure.in index f2b3921df0..f34aab3c50 100644 --- a/configure.in +++ b/configure.in @@ -114,6 +114,14 @@ AC_ARG_WITH([headers], [sysheaders=$withval], [sysheaders='']) +AC_SUBST(use_default_link) +AC_ARG_WITH([default-link], + AC_HELP_STRING([--with-default-link], + [do not use explicit linker scripts + @<:@default=no@:>@]), + [use_default_link=$withval], + [use_default_link=no]) + AC_ARG_ENABLE([sanity-checks], AC_HELP_STRING([--disable-sanity-checks], [really do not use threads (should not be used except in special situations) @<:@default=yes@:>@]), |