From 5e46e8d4b0fee11a5d2ea12d0d21ed0bff6db855 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Wed, 12 Sep 2018 18:49:08 -0400 Subject: remove vis.h protected-visibility hack since commit dc2f368e565c37728b0d620380b849c3a1ddd78f this has been disabled by default, but was left available in case users unhappy with the resulting size or performance regressions wanted to try to make it work. now that we make widespread use of hidden visibility for internal interfaces, this no longer makes sense. if any costly calls remain they can be fixed with hidden aliases. --- configure | 38 -------------------------------------- src/internal/vis.h | 27 --------------------------- 2 files changed, 65 deletions(-) delete mode 100644 src/internal/vis.h diff --git a/configure b/configure index f940af9a..6e489a1d 100755 --- a/configure +++ b/configure @@ -31,7 +31,6 @@ Optional features: --enable-optimize=... optimize listed components for speed over size [auto] --enable-debug build with debugging information [disabled] --enable-warnings build with recommended warnings flags [disabled] - --enable-visibility use global visibility options to optimize PIC [no] --enable-wrapper=... build given musl toolchain wrapper [auto] --disable-shared inhibit building shared library [enabled] --disable-static inhibit building static library [enabled] @@ -135,7 +134,6 @@ target= optimize=auto debug=no warnings=no -visibility=no shared=auto static=yes wrapper=auto @@ -163,9 +161,6 @@ case "$arg" in --disable-debug|--enable-debug=no) debug=no ;; --enable-warnings|--enable-warnings=yes) warnings=yes ;; --disable-warnings|--enable-warnings=no) warnings=no ;; ---enable-visibility=auto) visibility=auto ;; ---enable-visibility|--enable-visibility=yes) visibility=yes ;; ---disable-visibility|--enable-visibility=no) visibility=no ;; --enable-wrapper|--enable-wrapper=yes) wrapper=detect ;; --enable-wrapper=all) wrapper=yes ; gcc_wrapper=yes ; clang_wrapper=yes ;; --enable-wrapper=gcc) wrapper=yes ; gcc_wrapper=yes ;; @@ -525,39 +520,6 @@ tryflag CFLAGS_AUTO -Wno-unknown-pragmas tryflag CFLAGS_AUTO -Wno-pointer-to-int-cast fi -if test "x$visibility" = xauto ; then -# This test checks toolchain support for several things: -# - the -include option -# - the attributes/pragmas used in vis.h -# - linking code that takes the address of protected symbols -# - gcc 3.x bug that wrongly claims declarations mismatch -printf "checking whether global visibility preinclude works... " -cat > "$tmpc" </dev/null 2>&1 ; then -visibility=yes -else -visibility=no -fi -printf "%s\n" "$visibility" -fi - -if test "x$visibility" = xyes ; then -CFLAGS_AUTO="$CFLAGS_AUTO -include vis.h" -CFLAGS_AUTO="${CFLAGS_AUTO# }" -fi - # Determine if the compiler produces position-independent code (PIC) # by default. If so, we don't need to compile separate object files # for libc.a and libc.so. diff --git a/src/internal/vis.h b/src/internal/vis.h deleted file mode 100644 index 35855fc8..00000000 --- a/src/internal/vis.h +++ /dev/null @@ -1,27 +0,0 @@ -/* This file is only used if enabled in the build system, in which case it is - * included automatically via command line options. It is not included - * explicitly by any source files or other headers. Its purpose is to - * override default visibilities to reduce the size and performance costs - * of position-independent code. */ - -#if !defined(CRT) && !defined(__ASSEMBLER__) - -/* Conceptually, all symbols should be protected, but some toolchains - * fail to support copy relocations for protected data, so exclude all - * exported data symbols. */ - -__attribute__((__visibility__("default"))) -extern struct _IO_FILE *const stdin, *const stdout, *const stderr; - -__attribute__((__visibility__("default"))) -extern int optind, opterr, optopt, optreset, __optreset, getdate_err, h_errno, daylight, __daylight, signgam, __signgam; - -__attribute__((__visibility__("default"))) -extern long timezone, __timezone; - -__attribute__((__visibility__("default"))) -extern char *optarg, **environ, **__environ, *tzname[2], *__tzname[2], *__progname, *__progname_full; - -#pragma GCC visibility push(protected) - -#endif -- cgit v1.2.1