Static linking is always needed
authorUlrich Drepper <drepper@gmail.com>
Sun, 8 Jan 2012 14:52:29 +0000 (09:52 -0500)
committerUlrich Drepper <drepper@gmail.com>
Sun, 8 Jan 2012 14:52:29 +0000 (09:52 -0500)
ChangeLog
Makeconfig
config.make.in
configure.in
dlfcn/Makefile
elf/Makefile
math/Makefile
misc/Makefile
nptl/Makefile
sysdeps/mach/hurd/Makefile

index 0834b90..78ac067 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,15 @@
 2012-01-08  Ulrich Drepper  <drepper@gmail.com>
 
+       * configure.in: static is always set to yes.  Remove.
+       * config.make.in: Don't set build-static.
+       * Makeconfig: Remove use of build-static.
+       * dlfcn/Makefile: Likewise.
+       * elf/Makefile: Likewise.
+       * math/Makefile: Likewise.
+       * misc/Makefile: Likewise.
+       * nptl/Makefile: Likewise.
+       * sysdeps/mach/hurd/Makefile: Likewise.
+
        * configure.in: PWD_P is not used anymore.
        * config.make.in: Remove PWD_P entry.
 
index fb7468f..2db2821 100644 (file)
@@ -535,14 +535,7 @@ link-extra-libs-bounded = $(link-extra-libs)
 endif
 
 # The static libraries.
-ifeq (yes,$(build-static))
 link-libc-static = -Wl,--start-group $(common-objpfx)libc.a $(static-gnulib) -Wl,--end-group
-else
-ifeq (yes,$(build-shared))
-# We can try to link the programs with lib*_pic.a...
-link-libc-static = $(static-gnulib) $(common-objpfx)libc_pic.a
-endif
-endif
 link-libc-bounded = $(common-objpfx)libc_b.a $(gnulib) $(common-objpfx)libc_b.a
 
 ifndef gnulib
@@ -721,10 +714,8 @@ all-object-suffixes := .o .os .op .og .ob .oS
 object-suffixes :=
 CPPFLAGS-.o = $(pic-default)
 CFLAGS-.o = $(filter %frame-pointer,$(+cflags))
-ifeq (yes,$(build-static))
 libtype.o := lib%.a
 object-suffixes += .o
-endif
 ifeq (yes,$(build-shared))
 # Under --enable-shared, we will build a shared library of PIC objects.
 # The PIC object files are named foo.os.
index 90d6b28..d937952 100644 (file)
@@ -88,7 +88,6 @@ sizeof-long-double = @sizeof_long_double@
 nss-crypt = @libc_cv_nss_crypt@
 
 # Configuration options.
-build-static = @static@
 build-shared = @shared@
 build-pic-default= @libc_cv_pic_default@
 build-profile = @profile@
index fbc8881..5fd6d85 100644 (file)
@@ -112,16 +112,6 @@ AC_ARG_ENABLE([check-abi],
              [enable_check_abi=$enableval],
              [enable_check_abi=no])
 
-dnl Arguments to enable or disable building the static, shared, profiled,
-dnl and -fomit-frame-pointer libraries.
-dnl I've disabled this for now since we cannot build glibc without static
-dnl libraries built in the moment.
-dnl AC_ARG_ENABLE([static],
-dnl               AC_HELP_STRING([--enable-static],
-dnl                              [build static library @<:@default=yes@:>@]),
-dnl               [static=$enableval],
-dnl               [static=yes])
-static=yes
 AC_ARG_ENABLE([shared],
              AC_HELP_STRING([--enable-shared],
                             [build shared library @<:@default=yes if GNU ld@:>@]),
index ae76082..be8580c 100644 (file)
@@ -53,7 +53,7 @@ failtestmod.so-no-z-defs = yes
 glreflib2.so-no-z-defs = yes
 errmsg1mod.so-no-z-defs = yes
 
-ifeq (yesyes,$(build-static)$(build-shared))
+ifeq (yes,$(build-shared))
 tests += tststatic tststatic2
 tests-static += tststatic tststatic2
 modules-names += modstatic modstatic2
index b010085..052e763 100644 (file)
@@ -200,9 +200,8 @@ tests = tst-tls1 tst-tls2 tst-tls9 tst-leaks1
 ifeq (yes,$(have-initfini-array))
 tests += tst-array1 tst-array2 tst-array3 tst-array4 tst-array5
 endif
-ifeq (yes,$(build-static))
 tests-static = tst-tls1-static tst-tls2-static tst-stackguard1-static
-ifeq (yesyes,$(build-static)$(build-shared))
+ifeq (yes,$(build-shared))
 tests-static += tst-tls9-static
 tst-tls9-static-ENV = \
        LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)dlfcn
@@ -211,7 +210,6 @@ ifeq (yes,$(have-initfini-array))
 tests-static += tst-array1-static tst-array5-static
 endif
 tests += $(tests-static)
-endif
 ifeq (yes,$(build-shared))
 tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
         constload1 order vismain noload filter unload \
index 41340da..2819550 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1996-2006,2011 Free Software Foundation, Inc.
+# Copyright (C) 1996-2006,2011,2012 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -199,12 +199,7 @@ ifeq ($(build-bounded),yes)
 $(tests:%=$(objpfx)%-bp): $(objpfx)libm_b.a
 endif
 
-ifeq ($(build-static),yes)
-o = .o
-else
-o = .os
-endif
-gmp-objs = $(patsubst %,$(common-objpfx)stdlib/%$o,\
+gmp-objs = $(patsubst %,$(common-objpfx)stdlib/%.o,\
                      add_n sub_n cmp addmul_1 mul_1 mul_n divmod_1 \
                      lshift rshift mp_clz_tab udiv_qrnnd inlines)
 $(objpfx)atest-exp: $(gmp-objs)
index 6be2bc7..f9c51ac 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1991-2006, 2007, 2009, 2011 Free Software Foundation, Inc.
+# Copyright (C) 1991-2007, 2009, 2011, 2012 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -74,9 +74,7 @@ generated := tst-error1.mtrace tst-error1-mem
 include ../Makeconfig
 
 aux := init-misc
-ifeq ($(build-static),yes)
 install-lib := libbsd-compat.a libg.a
-endif
 gpl2lgpl := error.c error.h
 
 tests := tst-dirname tst-tsearch tst-fdset tst-efgcvt tst-mntent tst-hsearch \
index be6f490..0c317b0 100644 (file)
@@ -352,11 +352,10 @@ CFLAGS-funlockfile.c = -D_IO_MTSAFE_IO
 link-libc-static := $(common-objpfx)libc.a $(static-gnulib) \
                    $(common-objpfx)libc.a
 
-ifeq ($(build-static),yes)
 tests-static += tst-locale1 tst-locale2 tst-stackguard1-static
 tests += tst-stackguard1-static
 xtests-static += tst-setuid1-static
-endif
+
 # These tests are linked with libc before libpthread
 tests-reverse += tst-cancel5 tst-cancel23 tst-vfork1x tst-vfork2x
 
index 93058ff..36aebaa 100644 (file)
@@ -1,5 +1,4 @@
-# Copyright (C) 1993,94,95,96,97,98,99,2000,2001,2002,2003,2004,2009,2011
-#      Free Software Foundation, Inc.
+# Copyright (C) 1993-2004,2009,2011,2012 Free Software Foundation, Inc.
 # This file is part of the GNU C Library.
 
 # The GNU C Library is free software; you can redistribute it and/or
@@ -169,20 +168,10 @@ CFLAGS-dl-load.c = -DEXTERNAL_MAP_FROM_FD
 endif
 
 # We need these libs to link static programs in the libc source tree, too.
-ifeq (yes,$(build-static))
 link-libc-static := -Wl,-\( \
                    $(patsubst %,$(common-objpfx)%.a,\
                               libc mach/libmachuser hurd/libhurduser) \
                    $(static-gnulib) -Wl,-\)
-else
-ifeq (yes,$(build-shared))
-# We can try to link the programs with lib*_pic.a...
-link-libc-static := $(link-libc) -Wl,-\( \
-                   $(patsubst %,$(common-objpfx)%_pic.a,\
-                              libc mach/libmachuser hurd/libhurduser) \
-                   $(static-gnulib) -Wl,-\)
-endif
-endif
 \f
 ifeq ($(subdir),csu)