]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Add --with-default-link configure option.
authorRoland McGrath <roland@hack.frob.com>
Sat, 11 Jun 2011 11:16:49 +0000 (04:16 -0700)
committerRoland McGrath <roland@hack.frob.com>
Sat, 2 Jul 2011 22:19:52 +0000 (15:19 -0700)
ChangeLog
Makerules
config.make.in
configure
configure.in

index 7b36252bb0d516b6aecf798ca7d99e0548c10ffb..77941b09eb438f025462846e3b1978d1dc941135 100644 (file)
--- 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.
index d3cb4cc106ac8a8a8fc26cf177b32d8b780375ea..23d9f1c166267187189c4d6bb4bc857863e22b56 100644 (file)
--- 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) \
index 0656b1bca06d1e33854d376529c0050f3a0fc9ea..34842bfcd676a7011dc682986fb78e75216864c0 100644 (file)
@@ -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@
 
index 20e73409aeb5311d1a225137ae1845e1365e6ea4..e8ad775e4da486621111ced66c0fe61e808a3eda 100755 (executable)
--- 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
index f2b3921df08d40185571f10cf6bd18f1c7935ccd..f34aab3c50e34a0ca9ffd8bd620206a4b3443b01 100644 (file)
@@ -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@:>@]),