diff options
author | Ulrich Drepper <drepper@redhat.com> | 2004-04-03 08:53:24 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2004-04-03 08:53:24 +0000 |
commit | feca5e0be0d18ed2987fe714e1410673d62507db (patch) | |
tree | 47c15f90748ccc43159e646f0e22dc066a44e6f7 | |
parent | 08c9a553c723f301d044062e72871c8d9e6fa510 (diff) | |
download | glibc-feca5e0be0d18ed2987fe714e1410673d62507db.tar.gz glibc-feca5e0be0d18ed2987fe714e1410673d62507db.tar.xz glibc-feca5e0be0d18ed2987fe714e1410673d62507db.zip |
Update.
2004-03-30 H.J. Lu <hongjiu.lu@intel.com> * Makeconfig (link-libc-static): Use $(static-gnulib) instead of $(gnulib). (libgcc_eh): New variable. (gnulib): Use it variable. (static-gnulib): New variable. * Makerules (LDLIBS-c.so): Use $(static-gnulib) instead of $(gnulib). * config.make.in (have-as-needed): New variable. * configure.in: Check if linker supports --as-needed.
-rw-r--r-- | ChangeLog | 11 | ||||
-rw-r--r-- | Makeconfig | 15 | ||||
-rw-r--r-- | Makerules | 4 | ||||
-rw-r--r-- | config.make.in | 1 | ||||
-rw-r--r-- | configure.in | 16 | ||||
-rw-r--r-- | nptl/ChangeLog | 5 | ||||
-rw-r--r-- | nptl/Makefile | 3 |
7 files changed, 48 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog index a47c9f2b42..d5461864f5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2004-03-30 H.J. Lu <hongjiu.lu@intel.com> + + * Makeconfig (link-libc-static): Use $(static-gnulib) instead + of $(gnulib). + (libgcc_eh): New variable. + (gnulib): Use it variable. + (static-gnulib): New variable. + * Makerules (LDLIBS-c.so): Use $(static-gnulib) instead of $(gnulib). + * config.make.in (have-as-needed): New variable. + * configure.in: Check if linker supports --as-needed. + 2004-04-02 Ulrich Drepper <drepper@redhat.com> * sysdeps/unix/sysv/linux/internal_statvfs64.c: New file. diff --git a/Makeconfig b/Makeconfig index e0b3433cdc..37bbb1df4c 100644 --- a/Makeconfig +++ b/Makeconfig @@ -504,12 +504,12 @@ endif # The static libraries. ifeq (yes,$(build-static)) -link-libc-static = $(common-objpfx)libc.a $(gnulib) $(common-objpfx)libc.a +link-libc-static = $(common-objpfx)libc.a $(static-gnulib) $(common-objpfx)libc.a link-extra-libs-static = $(foreach lib,$(LDLIBS-$(@F)),$(common-objpfx)$(lib).a) else ifeq (yes,$(build-shared)) # We can try to link the programs with lib*_pic.a... -link-libc-static = $(gnulib) $(common-objpfx)libc_pic.a +link-libc-static = $(static-gnulib) $(common-objpfx)libc_pic.a link-extra-libs-static = $(link-extra-libs) endif endif @@ -517,10 +517,17 @@ link-libc-bounded = $(common-objpfx)libc_b.a $(gnulib) $(common-objpfx)libc_b.a link-extra-libs-bounded = $(foreach lib,$(LDLIBS-$(@F:%-bp=%)),$(common-objpfx)$(lib)_b.a) ifndef gnulib +ifneq ($(have-as-needed),yes) + libgcc_eh := -lgcc_eh +else + libgcc_eh := --as-needed -lgcc_s --no-as-needed +endif ifneq ($(have-cc-with-libunwind),yes) - gnulib := -lgcc -lgcc_eh + gnulib := -lgcc $(libgcc_eh) + static-gnulib := -lgcc -lgcc_eh else - gnulib := -lgcc -lgcc_eh -lunwind + gnulib := -lgcc $(libgcc_eh) -lunwind + static-gnulib := -lgcc -lgcc_eh -lunwind endif endif ifeq ($(elf),yes) diff --git a/Makerules b/Makerules index a0eb30a557..72ce04a7e9 100644 --- a/Makerules +++ b/Makerules @@ -581,8 +581,8 @@ build-shlib-objlist = $(build-module-helper-objlist) \ # Also omits crti.o and crtn.o, which we do not want # since we define our own `.init' section specially. LDFLAGS-c.so = -nostdlib -nostartfiles -# But we still want to link libc.so against $(gnulib). -LDLIBS-c.so += $(gnulib) +# But we still want to link libc.so against $(static-gnulib). +LDLIBS-c.so += $(static-gnulib) # Give libc.so an entry point and make it directly runnable itself. LDFLAGS-c.so += -e __libc_main # If lazy relocation is disabled add the -z now flag. diff --git a/config.make.in b/config.make.in index 9fd6555fec..e6fc6a1cc7 100644 --- a/config.make.in +++ b/config.make.in @@ -46,6 +46,7 @@ have-z-execstack = @libc_cv_z_execstack@ have-initfini = @libc_cv_have_initfini@ have-z-relro = @libc_cv_z_relro@ have-Bgroup = @libc_cv_Bgroup@ +have-as-needed = @libc_cv_as_needed@ need-nopic-initfini = @nopic_initfini@ with-fp = @with_fp@ with-cvs = @with_cvs@ diff --git a/configure.in b/configure.in index 30cf01266c..1f03854534 100644 --- a/configure.in +++ b/configure.in @@ -1315,6 +1315,22 @@ EOF rm -f conftest*]) AC_SUBST(libc_cv_Bgroup) + AC_CACHE_CHECK(for --as-needed option, + libc_cv_as_needed, [dnl + cat > conftest.c <<EOF +int main (void) { return 0; } +EOF + if AC_TRY_COMMAND([${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + -shared -o conftest.so conftest.c + -Wl,--as-needed -nostdlib 1>&AS_MESSAGE_LOG_FD]) + then + libc_cv_as_needed=yes + else + libc_cv_as_needed=no + fi + rm -f conftest*]) + AC_SUBST(libc_cv_as_needed) + ASFLAGS_config= AC_CACHE_CHECK(whether --noexecstack is desirable for .S files, libc_cv_as_noexecstack, [dnl diff --git a/nptl/ChangeLog b/nptl/ChangeLog index ccbaef276d..a441b5cf8f 100644 --- a/nptl/ChangeLog +++ b/nptl/ChangeLog @@ -1,3 +1,8 @@ +2004-03-30 H.J. Lu <hongjiu.lu@intel.com> + + * Makefile (link-libc-static): Use $(static-gnulib) instead of + $(gnulib). + 2004-03-30 Ulrich Drepper <drepper@redhat.com> * sysdeps/pthread/pthread-functions.h: Add ptr__nptl_deallocate_tsd. diff --git a/nptl/Makefile b/nptl/Makefile index 484824fea6..a90c4ad2d7 100644 --- a/nptl/Makefile +++ b/nptl/Makefile @@ -332,7 +332,8 @@ CFLAGS-flockfile.c = -D_IO_MTSAFE_IO CFLAGS-ftrylockfile.c = -D_IO_MTSAFE_IO CFLAGS-funlockfile.c = -D_IO_MTSAFE_IO -link-libc-static := $(common-objpfx)libc.a $(gnulib) $(common-objpfx)libc.a +link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \ + $(common-objpfx)libc.a ifeq ($(build-static),yes) tests-static += tst-locale1 tst-locale2 |