Skip to content

Commit

Permalink
Cleanup of configuration options
Browse files Browse the repository at this point in the history
Make several tool features mandatory and simplify the code.
  • Loading branch information
drepper committed Sep 10, 2011
1 parent 1248c1c commit 3ce1f29
Show file tree
Hide file tree
Showing 84 changed files with 467 additions and 796 deletions.
80 changes: 80 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,83 @@
2011-09-10 Ulrich Drepper <[email protected]>

* configure.in: Remove --with-__thread option. Make tests for
--no-whole-archive, __builtin_expect, symbol redirection, __thread,
tls_model attribute fail if no support is available. Remove
USE_IN_LIBIO.
* Makeconfig: Adjust for dropped configure option. All features are
now mandatory.
* Makerules: Likewise.
* Versions.def: Likewise.
* argp/argp-fmtstream.c: Likewise.
* argp/argp-fmtstream.h: Likewise.
* argp/argp-help.c: Likewise.
* assert/assert.c: Likewise.
* config.h.in: Likewise.
* config.make.in: Likewise.
* configure: Likewise.
* configure.in: Likewise.
* csu/Versions: Likewise.
* csu/init.c: Likewise.
* elf/tst-audit2.c: Likewise.
* elf/tst-tls10.c: Likewise.
* elf/tst-tls10.h: Likewise.
* elf/tst-tls11.c: Likewise.
* elf/tst-tls12.c: Likewise.
* elf/tst-tls14.c: Likewise.
* elf/tst-tlsmod11.c: Likewise.
* elf/tst-tlsmod12.c: Likewise.
* elf/tst-tlsmod13.c: Likewise.
* elf/tst-tlsmod13a.c: Likewise.
* elf/tst-tlsmod14a.c: Likewise.
* elf/tst-tlsmod15b.c: Likewise.
* elf/tst-tlsmod16a.c: Likewise.
* elf/tst-tlsmod16b.c: Likewise.
* elf/tst-tlsmod7.c: Likewise.
* elf/tst-tlsmod8.c: Likewise.
* elf/tst-tlsmod9.c: Likewise.
* gmon/gmon.c: Likewise.
* grp/fgetgrent_r.c: Likewise.
* grp/putgrent.c: Likewise.
* hurd/fopenport.c: Likewise.
* include/libc-symbols.h: Likewise.
* include/tls.h: Likewise.
* intl/gettextP.h: Likewise.
* intl/loadinfo.h: Likewise.
* locale/global-locale.c: Likewise.
* locale/localeinfo.h: Likewise.
* mach/devstream.c: Likewise.
* malloc/arena.c: Likewise.
* malloc/set-freeres.c: Likewise.
* misc/err.c: Likewise.
* misc/getttyent.c: Likewise.
* misc/mntent_r.c: Likewise.
* posix/getopt.c: Likewise.
* posix/wordexp.c: Likewise.
* pwd/fgetpwent_r.c: Likewise.
* resolv/Versions: Likewise.
* resolv/res_hconf.c: Likewise.
* shadow/fgetspent_r.c: Likewise.
* shadow/putspent.c: Likewise.
* stdio-common/printf_fphex.c: Likewise.
* stdio-common/tmpfile.c: Likewise.
* stdlib/abort.c: Likewise.
* stdlib/fmtmsg.c: Likewise.
* sunrpc/auth_unix.c: Likewise.
* sunrpc/clnt_perr.c: Likewise.
* sunrpc/clnt_tcp.c: Likewise.
* sunrpc/clnt_udp.c: Likewise.
* sunrpc/clnt_unix.c: Likewise.
* sunrpc/openchild.c: Likewise.
* sunrpc/svc_simple.c: Likewise.
* sunrpc/svc_tcp.c: Likewise.
* sunrpc/svc_udp.c: Likewise.
* sunrpc/svc_unix.c: Likewise.
* sunrpc/xdr.c: Likewise.
* sunrpc/xdr_array.c: Likewise.
* sunrpc/xdr_rec.c: Likewise.
* sunrpc/xdr_ref.c: Likewise.
* sunrpc/xdr_stdio.c: Likewise.

2011-09-09 Ulrich Drepper <[email protected]>

* sysdeps/i386/fpu/libm-test-ulps: Adjust ULPs for jn tests.
Expand Down
4 changes: 4 additions & 0 deletions Makeconfig
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,10 @@ as-needed :=
no-as-needed :=
endif

# Must be supported by the linker.
no-whole-archive = -Wl,--no-whole-archive
whole-archive = -Wl,--whole-archive

# Installed name of the startup code.
ifneq ($(have-initfini),yes)
# When not having init/fini, there is just one startfile, called crt0.o.
Expand Down
3 changes: 1 addition & 2 deletions Makerules
Original file line number Diff line number Diff line change
Expand Up @@ -595,7 +595,6 @@ endif
build-module-helper-objlist = \
$(patsubst %_pic.a,$(whole-archive) %_pic.a $(no-whole-archive),\
$(filter-out %.lds $(map-file) $(+preinit) $(+postinit),$^))
whole-archive := -Wl,--whole-archive

build-module-objlist = $(build-module-helper-objlist) $(LDLIBS-$(@F:%.so=%).so)
build-shlib-objlist = $(build-module-helper-objlist) \
Expand All @@ -621,7 +620,7 @@ endif
ifeq ($(elf),yes)
$(common-objpfx)libc_pic.os: $(common-objpfx)libc_pic.a
$(LINK.o) -nostdlib -nostartfiles -r -o $@ \
$(LDFLAGS-c_pic.os) -Wl,-d -Wl,--whole-archive $^ -o $@
$(LDFLAGS-c_pic.os) -Wl,-d $(whole-archive) $^ -o $@

ifeq (,$(strip $(shlib-lds-flags)))
# Generate a list of -R options to excise .gnu.glibc-stub.* sections.
Expand Down
2 changes: 0 additions & 2 deletions Versions.def
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ libc {
GLIBC_2.13
GLIBC_2.14
GLIBC_2.15
%ifdef USE_IN_LIBIO
HURD_CTHREADS_0.3
%endif
%ifdef EXPORT_UNWIND_FIND_FDE
GCC_3.0
%endif
Expand Down
12 changes: 2 additions & 10 deletions argp/argp-fmtstream.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams
Copyright (C) 1997-1999,2001,2002,2003,2005 Free Software Foundation, Inc.
Copyright (C) 1997-1999,2001-2003,2005,2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <[email protected]>.
Expand Down Expand Up @@ -40,7 +40,7 @@
#define isblank(ch) ((ch)==' ' || (ch)=='\t')
#endif

#if defined _LIBC && defined USE_IN_LIBIO
#ifdef _LIBC
# include <wchar.h>
# include <libio/libioP.h>
# define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a)
Expand Down Expand Up @@ -101,11 +101,7 @@ __argp_fmtstream_free (argp_fmtstream_t fs)
__argp_fmtstream_update (fs);
if (fs->p > fs->buf)
{
#ifdef USE_IN_LIBIO
__fxprintf (fs->stream, "%.*s", (int) (fs->p - fs->buf), fs->buf);
#else
fwrite_unlocked (fs->buf, 1, fs->p - fs->buf, fs->stream);
#endif
}
free (fs->buf);
free (fs);
Expand Down Expand Up @@ -150,11 +146,9 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
size_t i;
for (i = 0; i < pad; i++)
{
#ifdef USE_IN_LIBIO
if (_IO_fwide (fs->stream, 0) > 0)
putwc_unlocked (L' ', fs->stream);
else
#endif
putc_unlocked (' ', fs->stream);
}
}
Expand Down Expand Up @@ -315,11 +309,9 @@ __argp_fmtstream_update (argp_fmtstream_t fs)
*nl++ = ' ';
else
for (i = 0; i < fs->wmargin; ++i)
#ifdef USE_IN_LIBIO
if (_IO_fwide (fs->stream, 0) > 0)
putwc_unlocked (L' ', fs->stream);
else
#endif
putc_unlocked (' ', fs->stream);

/* Copy the tail of the original buffer into the current buffer
Expand Down
5 changes: 2 additions & 3 deletions argp/argp-fmtstream.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Word-wrapping and line-truncating streams.
Copyright (C) 1997 Free Software Foundation, Inc.
Copyright (C) 1997, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <[email protected]>.
Expand Down Expand Up @@ -43,8 +43,7 @@
# endif
#endif

#if (_LIBC - 0 && !defined (USE_IN_LIBIO)) \
|| (defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H))
#if defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H)
/* line_wrap_stream is available, so use that. */
#define ARGP_FMTSTREAM_USE_LINEWRAP
#endif
Expand Down
11 changes: 4 additions & 7 deletions argp/argp-help.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* Hierarchial argument parsing help output
Copyright (C) 1995-2003, 2004, 2005, 2006, 2007
Free Software Foundation, Inc.
Copyright (C) 1995-2007, 2011 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Written by Miles Bader <[email protected]>.
Expand Down Expand Up @@ -312,13 +311,13 @@ fill_in_uparams (const struct argp_state *state)
{"no-parent", 'P', 0, 0, "Include processes without parents"},
{0, 'x', 0, OPTION_ALIAS},
{"all-fields",'Q', 0, 0, "Don't elide unusable fields (normally"
" if there's some reason ps can't"
" if there's some reason ps can't"
" print a field for any process, it's"
" removed from the output entirely)" },
" removed from the output entirely)" },
{"reverse", 'r', 0, 0, "Reverse the order of any sort"},
{"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS},
{"session", OPT_SESS, "SID", OPTION_ARG_OPTIONAL,
"Add the processes from the session"
"Add the processes from the session"
" SID (which defaults to the sid of"
" the current process)" },
Expand Down Expand Up @@ -1874,11 +1873,9 @@ __argp_failure (const struct argp_state *state, int status, int errnum,
#endif
}

#ifdef USE_IN_LIBIO
if (_IO_fwide (stream, 0) > 0)
putwc_unlocked (L'\n', stream);
else
#endif
putc_unlocked ('\n', stream);

#if _LIBC || (HAVE_FLOCKFILE && HAVE_FUNLOCKFILE)
Expand Down
8 changes: 3 additions & 5 deletions assert/assert.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,9 @@

extern const char *__progname;

#ifdef USE_IN_LIBIO
# include <wchar.h>
# include <libio/iolibio.h>
# define fflush(s) INTUSE(_IO_fflush) (s)
#endif
#include <wchar.h>
#include <libio/iolibio.h>
#define fflush(s) INTUSE(_IO_fflush) (s)

/* This function, when passed a string containing an asserted
expression, a filename, and a line number, prints a message
Expand Down
17 changes: 0 additions & 17 deletions config.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,6 @@
/* Define if _Unwind_Find_FDE should be exported from glibc. */
#undef EXPORT_UNWIND_FIND_FDE

/* Define to use GNU libio instead of GNU stdio.
This is defined by configure under --enable-libio. */
#undef USE_IN_LIBIO

/* Define if using ELF and the assembler supports the `.previous'
directive. */
#undef HAVE_ASM_PREVIOUS_DIRECTIVE
Expand All @@ -95,22 +91,9 @@
/* Define if static NSS modules are wanted. */
#undef DO_STATIC_NSS

/* Define if the compiler supports __builtin_expect. */
#undef HAVE_BUILTIN_EXPECT

/* Define if the compiler supports __builtin_memset. */
#undef HAVE_BUILTIN_MEMSET

/* Define if __asm () on built-in function's prototype causes redirection of
the builtin. */
#undef HAVE_BUILTIN_REDIRECTION

/* Define if the __thread keyword is supported. */
#undef HAVE___THREAD

/* Define if the compiler supports __attribute__((tls_model(""))). */
#undef HAVE_TLS_MODEL_ATTRIBUTE

/* Define if the regparm attribute shall be used for local functions
(gcc on ix86 only). */
#undef USE_REGPARMS
Expand Down
1 change: 0 additions & 1 deletion config.make.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ static-libgcc = @libc_cv_gcc_static_libgcc@

versioning = @VERSIONING@
oldest-abi = @oldest_abi@
no-whole-archive = @no_whole_archive@
exceptions = @exceptions@
multi-arch = @multi_arch@

Expand Down
Loading

0 comments on commit 3ce1f29

Please sign in to comment.