diff options
author | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 14:12:05 +0000 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2018-12-27 14:12:05 +0000 |
commit | 963c37d5c0eb62b38f8764b23931c0dcdd497a13 (patch) | |
tree | 12a521ddf17b3e1bb26594656bbb05903c54afd0 /configure | |
parent | 7bb5f8a836b916d6ebf7b6921b136e99cea2442d (diff) | |
parent | 3c03baca37fdcb52c3881e653ca392bba7a99c2b (diff) |
Merge tag 'glibc-2.28' into baseline-2.28baseline
The GNU C Library
=================
The GNU C Library version 2.28 is now available.
The GNU C Library is used as *the* C library in the GNU system and
in GNU/Linux systems, as well as many other systems that use Linux
as the kernel.
The GNU C Library is primarily designed to be a portable
and high performance C library. It follows all relevant
standards including ISO C11 and POSIX.1-2008. It is also
internationalized and has one of the most complete
internationalization interfaces known.
The GNU C Library webpage is at http://www.gnu.org/software/libc/
Packages for the 2.28 release may be downloaded from:
http://ftpmirror.gnu.org/libc/
http://ftp.gnu.org/gnu/libc/
The mirror list is at http://www.gnu.org/order/ftp.html
NEWS for version 2.28
=====================
Major new features:
* The localization data for ISO 14651 is updated to match the 2016
Edition 4 release of the standard, this matches data provided by
Unicode 9.0.0. This update introduces significant improvements to the
collation of Unicode characters. This release deviates slightly from
the standard in that the collation element ordering for lowercase and
uppercase LATIN script characters is adjusted to ensure that regular
expressions with ranges like [a-z] and [A-Z] don't interleave e.g. A
is not matched by [a-z]. With the update many locales have been
updated to take advantage of the new collation information. The new
collation information has increased the size of the compiled locale
archive or binary locales.
* The GNU C Library can now be compiled with support for Intel CET, AKA
Intel Control-flow Enforcement Technology. When the library is built
with --enable-cet, the resulting glibc is protected with indirect
branch tracking (IBT) and shadow stack (SHSTK). CET-enabled glibc is
compatible with all existing executables and shared libraries. This
feature is currently supported on i386, x86_64 and x32 with GCC 8 and
binutils 2.29 or later. Note that CET-enabled glibc requires CPUs
capable of multi-byte NOPs, like x86-64 processors as well as Intel
Pentium Pro or newer. NOTE: --enable-cet has been tested for i686,
x86_64 and x32 on non-CET processors. --enable-cet has been tested
for x86_64 and x32 on CET SDVs, but Intel CET support hasn't been
validated for i686.
* The GNU C Library now has correct support for ABSOLUTE symbols
(SHN_ABS-relative symbols). Previously such ABSOLUTE symbols were
relocated incorrectly or in some cases discarded. The GNU linker can
make use of the newer semantics, but it must communicate it to the
dynamic loader by setting the ELF file's identification (EI_ABIVERSION
field) to indicate such support is required.
* Unicode 11.0.0 Support: Character encoding, character type info, and
transliteration tables are all updated to Unicode 11.0.0, using
generator scripts contributed by Mike FABIAN (Red Hat).
* <math.h> functions that round their results to a narrower type are added
from TS 18661-1:2014 and TS 18661-3:2015:
- fadd, faddl, daddl and corresponding fMaddfN, fMaddfNx, fMxaddfN and
fMxaddfNx functions.
- fsub, fsubl, dsubl and corresponding fMsubfN, fMsubfNx, fMxsubfN and
fMxsubfNx functions.
- fmul, fmull, dmull and corresponding fMmulfN, fMmulfNx, fMxmulfN and
fMxmulfNx functions.
- fdiv, fdivl, ddivl and corresponding fMdivfN, fMdivfNx, fMxdivfN and
fMxdivfNx functions.
* Two grammatical forms of month names are now supported for the following
languages: Armenian, Asturian, Catalan, Czech, Kashubian, Occitan, Ossetian,
Scottish Gaelic, Upper Sorbian, and Walloon. The following languages now
support two grammatical forms in abbreviated month names: Catalan, Greek,
and Kashubian.
* Newly added locales: Lower Sorbian (dsb_DE) and Yakut (sah_RU) also
include the support for two grammatical forms of month names.
* Building and running on GNU/Hurd systems now works without out-of-tree
patches.
* The renameat2 function has been added, a variant of the renameat function
which has a flags argument. If the flags are zero, the renameat2 function
acts like renameat. If the flag is not zero and there is no kernel
support for renameat2, the function will fail with an errno value of
EINVAL. This is different from the existing gnulib function renameatu,
which performs a plain rename operation in case of a RENAME_NOREPLACE
flags and a non-existing destination (and therefore has a race condition
that can clobber the destination inadvertently).
* The statx function has been added, a variant of the fstatat64
function with an additional flags argument. If there is no direct
kernel support for statx, glibc provides basic stat support based on
the fstatat64 function.
* IDN domain names in getaddrinfo and getnameinfo now use the system libidn2
library if installed. libidn2 version 2.0.5 or later is recommended. If
libidn2 is not available, internationalized domain names are not encoded
or decoded even if the AI_IDN or NI_IDN flags are passed to getaddrinfo or
getnameinfo. (getaddrinfo calls with non-ASCII names and AI_IDN will fail
with an encoding error.) Flags which used to change the IDN encoding and
decoding behavior (AI_IDN_ALLOW_UNASSIGNED, AI_IDN_USE_STD3_ASCII_RULES,
NI_IDN_ALLOW_UNASSIGNED, NI_IDN_USE_STD3_ASCII_RULES) have been
deprecated. They no longer have any effect.
* Parsing of dynamic string tokens in DT_RPATH, DT_RUNPATH, DT_NEEDED,
DT_AUXILIARY, and DT_FILTER has been expanded to support the full
range of ELF gABI expressions including such constructs as
'$ORIGIN$ORIGIN' (if valid). For SUID/GUID applications the rules
have been further restricted, and where in the past a dynamic string
token sequence may have been interpreted as a literal string it will
now cause a load failure. These load failures were always considered
unspecified behaviour from the perspective of the dynamic loader, and
for safety are now load errors e.g. /foo/${ORIGIN}.so in DT_NEEDED
results in a load failure now.
* Support for ISO C threads (ISO/IEC 9899:2011) has been added. The
implementation includes all the standard functions provided by
<threads.h>:
- thrd_current, thrd_equal, thrd_sleep, thrd_yield, thrd_create,
thrd_detach, thrd_exit, and thrd_join for thread management.
- mtx_init, mtx_lock, mtx_timedlock, mtx_trylock, mtx_unlock, and
mtx_destroy for mutual exclusion.
- call_once for function call synchronization.
- cnd_broadcast, cnd_destroy, cnd_init, cnd_signal, cnd_timedwait, and
cnd_wait for conditional variables.
- tss_create, tss_delete, tss_get, and tss_set for thread-local storage.
Application developers must link against libpthread to use ISO C threads.
Deprecated and removed features, and other changes affecting compatibility:
* The nonstandard header files <libio.h> and <_G_config.h> are no longer
installed. Software that was using either header should be updated to
use standard <stdio.h> interfaces instead.
* The stdio functions 'getc' and 'putc' are no longer defined as macros.
This was never required by the C standard, and the macros just expanded
to call alternative names for the same functions. If you hoped getc and
putc would provide performance improvements over fgetc and fputc, instead
investigate using (f)getc_unlocked and (f)putc_unlocked, and, if
necessary, flockfile and funlockfile.
* All stdio functions now treat end-of-file as a sticky condition. If you
read from a file until EOF, and then the file is enlarged by another
process, you must call clearerr or another function with the same effect
(e.g. fseek, rewind) before you can read the additional data. This
corrects a longstanding C99 conformance bug. It is most likely to affect
programs that use stdio to read interactive input from a terminal.
(Bug #1190.)
* The macros 'major', 'minor', and 'makedev' are now only available from
the header <sys/sysmacros.h>; not from <sys/types.h> or various other
headers that happen to include <sys/types.h>. These macros are rarely
used, not part of POSIX nor XSI, and their names frequently collide with
user code; see https://sourceware.org/bugzilla/show_bug.cgi?id=19239 for
further explanation.
<sys/sysmacros.h> is a GNU extension. Portable programs that require
these macros should first include <sys/types.h>, and then include
<sys/sysmacros.h> if __GNU_LIBRARY__ is defined.
* The tilegx*-*-linux-gnu configurations are no longer supported.
* The obsolete function ustat is no longer available to newly linked
binaries; the headers <ustat.h> and <sys/ustat.h> have been removed. This
function has been deprecated in favor of fstatfs and statfs.
* The obsolete function nfsservctl is no longer available to newly linked
binaries. This function was specific to systems using the Linux kernel
and could not usefully be used with the GNU C Library on systems with
version 3.1 or later of the Linux kernel.
* The obsolete function name llseek is no longer available to newly linked
binaries. This function was specific to systems using the Linux kernel
and was not declared in a header. Programs should use the lseek64 name
for this function instead.
* The AI_IDN_ALLOW_UNASSIGNED and NI_IDN_ALLOW_UNASSIGNED flags for the
getaddrinfo and getnameinfo functions have been deprecated. The behavior
previously selected by them is now always enabled.
* The AI_IDN_USE_STD3_ASCII_RULES and NI_IDN_USE_STD3_ASCII_RULES flags for
the getaddrinfo and getnameinfo functions have been deprecated. The STD3
restriction (rejecting '_' in host names, among other things) has been
removed, for increased compatibility with non-IDN name resolution.
* The fcntl function now have a Long File Support variant named fcntl64. It
is added to fix some Linux Open File Description (OFD) locks usage on non
LFS mode. As for others *64 functions, fcntl64 semantics are analogous with
fcntl and LFS support is handled transparently. Also for Linux, the OFD
locks act as a cancellation entrypoint.
* The obsolete functions encrypt, encrypt_r, setkey, setkey_r, cbc_crypt,
ecb_crypt, and des_setparity are no longer available to newly linked
binaries, and the headers <rpc/des_crypt.h> and <rpc/rpc_des.h> are no
longer installed. These functions encrypted and decrypted data with the
DES block cipher, which is no longer considered secure. Software that
still uses these functions should switch to a modern cryptography library,
such as libgcrypt.
* Reflecting the removal of the encrypt and setkey functions above, the
macro _XOPEN_CRYPT is no longer defined. As a consequence, the crypt
function is no longer declared unless _DEFAULT_SOURCE or _GNU_SOURCE is
enabled.
* The obsolete function fcrypt is no longer available to newly linked
binaries. It was just another name for the standard function crypt,
and it has not appeared in any header file in many years.
* We have tentative plans to hand off maintenance of the passphrase-hashing
library, libcrypt, to a separate development project that will, we hope,
keep up better with new passphrase-hashing algorithms. We will continue
to declare 'crypt' in <unistd.h>, and programs that use 'crypt' or
'crypt_r' should not need to change at all; however, distributions will
need to install <crypt.h> and libcrypt from a separate project.
In this release, if the configure option --disable-crypt is used, glibc
will not install <crypt.h> or libcrypt, making room for the separate
project's versions of these files. The plan is to make this the default
behavior in a future release.
Changes to build and runtime requirements:
GNU make 4.0 or later is now required to build glibc.
Security related changes:
CVE-2016-6261, CVE-2016-6263, CVE-2017-14062: Various vulnerabilities have
been fixed by removing the glibc-internal IDNA implementation and using
the system-provided libidn2 library instead. Originally reported by Hanno
Böck and Christian Weisgerber.
CVE-2017-18269: An SSE2-based memmove implementation for the i386
architecture could corrupt memory. Reported by Max Horn.
CVE-2018-11236: Very long pathname arguments to realpath function could
result in an integer overflow and buffer overflow. Reported by Alexey
Izbyshev.
CVE-2018-11237: The mempcpy implementation for the Intel Xeon Phi
architecture could write beyond the target buffer, resulting in a buffer
overflow. Reported by Andreas Schwab.
The following bugs are resolved with this release:
[1190] stdio: fgetc()/fread() behaviour is not POSIX compliant
[6889] manual: 'PWD' mentioned but not specified
[13575] libc: SSIZE_MAX defined as LONG_MAX is inconsistent with ssize_t,
when __WORDSIZE != 64
[13762] regex: re_search etc. should return -2 on memory exhaustion
[13888] build: /tmp usage during testing
[13932] math: dbl-64 pow unexpectedly slow for some inputs
[14092] nptl: Support C11 threads
[14095] localedata: Review / update collation data from Unicode / ISO
14651
[14508] libc: -Wformat warnings
[14553] libc: Namespace pollution loff_t in sys/types.h
[14890] libc: Make NT_PRFPREG canonical.
[15105] libc: Extra PLT references with -Os
[15512] libc: __bswap_constant_16 not compiled when -Werror -Wsign-
conversion is given
[16335] manual: Feature test macro documentation incomplete and out of
date
[16552] libc: Unify umount implementations in terms of umount2
[17082] libc: htons et al.: statement-expressions prevent use on global
scope with -O1 and higher
[17343] libc: Signed integer overflow in /stdlib/random_r.c
[17438] localedata: pt_BR: wrong d_fmt delimiter
[17662] libc: please implement binding for the new renameat2 syscall
[17721] libc: __restrict defined as /* Ignore */ even in c11
[17979] libc: inconsistency between uchar.h and stdint.h
[18018] dynamic-link: Additional $ORIGIN handling issues (CVE-2011-0536)
[18023] libc: extend_alloca is broken (questionable pointer comparison,
horrible machine code)
[18124] libc: hppa: setcontext erroneously returns -1 as exit code for
last constant.
[18471] libc: llseek should be a compat symbol
[18473] soft-fp: [powerpc-nofpu] __sqrtsf2, __sqrtdf2 should be compat
symbols
[18991] nss: nss_files skips large entry in database
[19239] libc: Including stdlib.h ends up with macros major and minor being
defined
[19463] libc: linknamespace failures when compiled with -Os
[19485] localedata: csb_PL: Update month translations + add yesstr/nostr
[19527] locale: Normalized charset name not recognized by setlocale
[19667] string: Missing Sanity Check for malloc calls in file 'testcopy.c'
[19668] libc: Missing Sanity Check for malloc() in file 'tst-setcontext-
fpscr.c'
[19728] network: out of bounds stack read in libidn function
idna_to_ascii_4i (CVE-2016-6261)
[19729] network: out of bounds heap read on invalid utf-8 inputs in
stringprep_utf8_nfkc_normalize (CVE-2016-6263)
[19818] dynamic-link: Absolute (SHN_ABS) symbols incorrectly relocated by
the base address
[20079] libc: Add SHT_X86_64_UNWIND to elf.h
[20251] libc: 32bit programs pass garbage in struct flock for OFD locks
[20419] dynamic-link: files with large allocated notes crash in
open_verify
[20530] libc: bswap_16 should use __builtin_bswap16() when available
[20890] dynamic-link: ldconfig: fsync the files before atomic rename
[20980] manual: CFLAGS environment variable replaces vital options
[21163] regex: Assertion failure in pop_fail_stack when executing a
malformed regexp (CVE-2015-8985)
[21234] manual: use of CFLAGS makes glibc detect no optimization
[21269] dynamic-link: i386 sigaction sa_restorer handling is wrong
[21313] build: Compile Error GCC 5.4.0 MIPS with -0S
[21314] build: Compile Error GCC 5.2.0 MIPS with -0s
[21508] locale: intl/tst-gettext failure with latest msgfmt
[21547] localedata: Tibetan script collation broken (Dzongkha and Tibetan)
[21812] network: getifaddrs() returns entries with ifa_name == NULL
[21895] libc: ppc64 setjmp/longjmp not fully interoperable with static
dlopen
[21942] dynamic-link: _dl_dst_substitute incorrectly handles $ORIGIN: with
AT_SECURE=1
[22241] localedata: New locale: Yakut (Sakha) locale for Russia (sah_RU)
[22247] network: Integer overflow in the decode_digit function in
puny_decode.c in libidn (CVE-2017-14062)
[22342] nscd: NSCD not properly caching netgroup
[22391] nptl: Signal function clear NPTL internal symbols inconsistently
[22550] localedata: es_ES locale (and other es_* locales): collation
should treat ñ as a primary different character, sync the collation
for Spanish with CLDR
[22638] dynamic-link: sparc: static binaries are broken if glibc is built
by gcc configured with --enable-default-pie
[22639] time: year 2039 bug for localtime etc. on 64-bit platforms
[22644] string: memmove-sse2-unaligned on 32bit x86 produces garbage when
crossing 2GB threshold (CVE-2017-18269)
[22646] localedata: redundant data (LC_TIME) for es_CL, es_CU, es_EC and
es_BO
[22735] time: Misleading typo in time.h source comment regarding
CLOCKS_PER_SECOND
[22753] libc: preadv2/pwritev2 fallback code should handle offset=-1
[22761] libc: No trailing `%n' conversion specifier in FMT passed from
`__assert_perror_fail ()' to `__assert_fail_base ()'
[22766] libc: all glibc internal dlopen should use RTLD_NOW for robust
dlopen failures
[22786] libc: Stack buffer overflow in realpath() if input size is close
to SSIZE_MAX (CVE-2018-11236)
[22787] dynamic-link: _dl_check_caller returns false when libc is linked
through an absolute DT_NEEDED path
[22792] build: tcb-offsets.h dependency dropped
[22797] libc: pkey_get() uses non-reserved name of argument
[22807] libc: PTRACE_* constants missing for powerpc
[22818] glob: posix/tst-glob_lstat_compat failure on alpha
[22827] dynamic-link: RISC-V ELF64 parser mis-reads flag in ldconfig
[22830] malloc: malloc_stats doesn't restore cancellation state on stderr
[22848] localedata: ca_ES: update date definitions from CLDR
[22862] build: _DEFAULT_SOURCE is defined even when _ISOC11_SOURCE is
[22884] math: RISCV fmax/fmin handle signalling NANs incorrectly
[22896] localedata: Update locale data for an_ES
[22902] math: float128 test failures with GCC 8
[22918] libc: multiple common of `__nss_shadow_database'
[22919] libc: sparc32: backtrace yields infinite backtrace with
makecontext
[22926] libc: FTBFS on powerpcspe
[22932] localedata: lt_LT: Update of abbreviated month names from CLDR
required
[22937] localedata: Greek (el_GR, el_CY) locales actually need ab_alt_mon
[22947] libc: FAIL: misc/tst-preadvwritev2
[22963] localedata: cs_CZ: Add alternative month names
[22987] math: [powerpc/sparc] fdim inlines errno, exceptions handling
[22996] localedata: change LC_PAPER to en_US in es_BO locale
[22998] dynamic-link: execstack tests are disabled when SELinux is
disabled
[23005] network: Crash in __res_context_send after memory allocation
failure
[23007] math: strtod cannot handle -nan
[23024] nss: getlogin_r is performing NSS lookups when loginid isn't set
[23036] regex: regex equivalence class regression
[23037] libc: initialize msg_flags to zero for sendmmsg() calls
[23069] libc: sigaction broken on riscv64-linux-gnu
[23094] localedata: hr_HR: wrong thousands_sep and mon_thousands_sep
[23102] dynamic-link: Incorrect parsing of multiple consecutive $variable
patterns in runpath entries (e.g. $ORIGIN$ORIGIN)
[23137] nptl: s390: pthread_join sometimes block indefinitely (on 31bit
and libc build with -Os)
[23140] localedata: More languages need two forms of month names
[23145] libc: _init/_fini aren't marked as hidden
[23152] localedata: gd_GB: Fix typo in "May" (abbreviated)
[23171] math: C++ iseqsig for long double converts arguments to double
[23178] nscd: sudo will fail when it is run in concurrent with commands
that changes /etc/passwd
[23196] string: __mempcpy_avx512_no_vzeroupper mishandles large copies
(CVE-2018-11237)
[23206] dynamic-link: static-pie + dlopen breaks debugger interaction
[23208] localedata: New locale - Lower Sorbian (dsb)
[23233] regex: Memory leak in build_charclass_op function in file
posix/regcomp.c
[23236] stdio: Harden function pointers in _IO_str_fields
[23250] nptl: Offset of __private_ss differs from GCC
[23253] math: tgamma test suite failures on i686 with -march=x86-64
-mtune=generic -mfpmath=sse
[23259] dynamic-link: Unsubstituted ${ORIGIN} remains in DT_NEEDED for
AT_SECURE
[23264] libc: posix_spawnp wrongly executes ENOEXEC in non compat mode
[23266] nis: stringop-truncation warning with new gcc8.1 in nisplus-
parser.c
[23272] math: fma(INFINITY,INFIITY,0.0) should be INFINITY
[23277] math: nan function should not have const attribute
[23279] math: scanf and strtod wrong for some hex floating-point
[23280] math: wscanf rounds wrong; wcstod is ok for negative numbers and
directed rounding
[23290] localedata: IBM273 is not equivalent to ISO-8859-1
[23303] build: undefined reference to symbol
'__parse_hwcap_and_convert_at_platform@@GLIBC_2.23'
[23307] dynamic-link: Absolute symbols whose value is zero ignored in
lookup
[23313] stdio: libio vtables validation and standard file object
interposition
[23329] libc: The __libc_freeres infrastructure is not properly run across
DSO boundaries.
[23349] libc: Various glibc headers no longer compatible with
<linux/time.h>
[23351] malloc: Remove unused code related to heap dumps and malloc
checking
[23363] stdio: stdio-common/tst-printf.c has non-free license
[23396] regex: Regex equivalence regression in single-byte locales
[23422] localedata: oc_FR: More updates of locale data
[23442] build: New warning with GCC 8
[23448] libc: Out of bounds access in IBM-1390 converter
[23456] libc: Wrong index_cpu_LZCNT
[23458] build: tst-get-cpu-features-static isn't added to tests
[23459] libc: COMMON_CPUID_INDEX_80000001 isn't populated for Intel
processors
[23467] dynamic-link: x86/CET: A property note parser bug
Release Notes
=============
https://sourceware.org/glibc/wiki/Release/2.28
Contributors
============
This release was made possible by the contributions of many people.
The maintainers are grateful to everyone who has contributed
changes or bug reports. These include:
Adhemerval Zanella
Agustina Arzille
Alan Modra
Alexandre Oliva
Amit Pawar
Andreas Schwab
Andrew Senkevich
Andrew Waterman
Aurelien Jarno
Carlos O'Donell
Chung-Lin Tang
DJ Delorie
Daniel Alvarez
David Michael
Dmitry V. Levin
Dragan Stanojevic - Nevidljivi
Florian Weimer
Flávio Cruz
Francois Goichon
Gabriel F. T. Gomes
H.J. Lu
Herman ten Brugge
Hongbo Zhang
Igor Gnatenko
Jesse Hathaway
John David Anglin
Joseph Myers
Leonardo Sandoval
Maciej W. Rozycki
Mark Wielaard
Martin Sebor
Michael Wolf
Mike FABIAN
Patrick McGehearty
Patsy Franklin
Paul Pluzhnikov
Quentin PAGÈS
Rafal Luzynski
Rajalakshmi Srinivasaraghavan
Raymond Nicholson
Rical Jasan
Richard Braun
Robert Buj
Rogerio Alves
Samuel Thibault
Sean McKean
Siddhesh Poyarekar
Stefan Liebler
Steve Ellcey
Sylvain Lesage
Szabolcs Nagy
Thomas Schwinge
Tulio Magno Quites Machado Filho
Valery Timiriliyev
Vincent Chen
Wilco Dijkstra
Zack Weinberg
Zong Li
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 1245 |
1 files changed, 763 insertions, 482 deletions
@@ -2,7 +2,7 @@ # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for GNU C Library (see version.h). # -# Report bugs to <http://sourceware.org/bugzilla/>. +# Report bugs to <https://sourceware.org/bugzilla/>. # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @@ -266,7 +266,7 @@ fi $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and -$0: http://sourceware.org/bugzilla/ about your system, +$0: https://sourceware.org/bugzilla/ about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." @@ -581,7 +581,7 @@ PACKAGE_NAME='GNU C Library' PACKAGE_TARNAME='glibc' PACKAGE_VERSION='(see version.h)' PACKAGE_STRING='GNU C Library (see version.h)' -PACKAGE_BUGREPORT='http://sourceware.org/bugzilla/' +PACKAGE_BUGREPORT='https://sourceware.org/bugzilla/' PACKAGE_URL='http://www.gnu.org/software/glibc/' ac_unique_file="include/features.h" @@ -594,7 +594,9 @@ mach_interface_list DEFINES static_nss profile +libc_cv_multidir libc_cv_pie_default +libc_cv_cc_pie_default libc_cv_pic_default shared static @@ -619,7 +621,7 @@ LIBGD libc_cv_cc_loop_to_function libc_cv_cc_submachine libc_cv_cc_nofma -stack_protector +libc_cv_mtls_dialect_gnu2 fno_unit_at_a_time libc_cv_output_format libc_cv_has_glob_dat @@ -629,15 +631,21 @@ libc_cv_z_execstack libc_cv_z_combreloc ASFLAGS_config libc_cv_cc_with_libunwind +libc_cv_insert libc_cv_protected_data -BISON INSTALL_INFO PERL BASH_SHELL +CXX_BITS_STD_ABS_H +CXX_CMATH_HEADER +CXX_CSTDLIB_HEADER CXX_SYSINCLUDES SYSINCLUDES +PYTHON +PYTHON_PROG AUTOCONF NM +BISON AWK SED MAKEINFO @@ -645,6 +653,7 @@ MSGFMT MAKE LD AS +GPROF OBJCOPY OBJDUMP AR @@ -652,27 +661,31 @@ LN_S INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM -sysdeps_add_ons sysnames submachine multi_arch +no_stack_protector +stack_protector +libc_cv_ssp +libc_cv_with_fp base_machine -add_on_subdirs -add_ons +have_tunables build_pt_chown build_nscd +build_obsolete_nsl link_obsolete_rpc +libc_cv_static_nss_crypt libc_cv_nss_crypt +build_crypt +experimental_malloc enable_werror all_warnings force_install bindnow -enable_lock_elision hardcoded_path_in_tests enable_timezone_tools use_default_link sysheaders -with_fp ac_ct_CXX CXXFLAGS CXX @@ -745,7 +758,6 @@ with_bugurl with_gd with_gd_include with_gd_lib -with_fp with_binutils with_selinux with_headers @@ -753,13 +765,13 @@ with_default_link enable_sanity_checks enable_shared enable_profile +enable_static_pie enable_timezone_tools enable_hardcoded_path_in_tests enable_stackguard_randomization -enable_lock_elision -enable_add_ons enable_hidden_plt enable_bind_now +enable_stack_protector enable_static_nss enable_force_install enable_maintainer_mode @@ -767,13 +779,18 @@ enable_kernel enable_all_warnings enable_werror enable_multi_arch +enable_experimental_malloc +enable_crypt enable_nss_crypt enable_obsolete_rpc +enable_obsolete_nsl enable_systemtap enable_build_nscd enable_nscd enable_pt_chown +enable_tunables enable_mathvec +enable_cet with_cpu ' ac_precious_vars='build_alias @@ -788,8 +805,7 @@ CPP CXX CXXFLAGS CCC' -ac_subdirs_all=' -' +ac_subdirs_all='' # Initialize some variables set by options. ac_init_help= @@ -1406,6 +1422,8 @@ Optional Features: in special situations) [default=yes] --enable-shared build shared library [default=yes if GNU ld] --enable-profile build profiled library [default=no] + --enable-static-pie enable static PIE support and use it in the + testsuite [default=no] --disable-timezone-tools do not install timezone tools [default=install] --enable-hardcoded-path-in-tests @@ -1414,13 +1432,11 @@ Optional Features: --enable-stackguard-randomization initialize __stack_chk_guard canary with a random number at program start - --enable-lock-elision=yes/no - Enable lock elision for pthread mutexes by default - --enable-add-ons[=DIRS...] - configure and build add-ons in DIR1,DIR2,... search - for add-ons if no parameter given --disable-hidden-plt do not hide internal function calls to avoid PLT --enable-bind-now disable lazy relocations in DSOs + --enable-stack-protector=[yes|no|all|strong] + Use -fstack-protector[-all|-strong] to detect glibc + buffer overflows --enable-static-nss build static NSS modules [default=no] --disable-force-install don't force installation of files from this package, even if they are older than the installed files @@ -1433,15 +1449,25 @@ Optional Features: --disable-werror do not build with -Werror --enable-multi-arch enable single DSO with optimizations for multiple architectures + --disable-experimental-malloc + disable experimental malloc features + --disable-crypt do not build nor install the passphrase hashing + library, libcrypt --enable-nss-crypt enable libcrypt to use nss --enable-obsolete-rpc build and install the obsolete RPC code for link-time usage + --enable-obsolete-nsl build and install the obsolete libnsl library and + depending NSS modules --enable-systemtap enable systemtap static probe points [default=no] --disable-build-nscd disable building and installing the nscd daemon --disable-nscd library functions will not contact the nscd daemon --enable-pt_chown Enable building and installing pt_chown + --enable-tunables Enable tunables support. Known values are 'yes', + 'no' and 'valstring' --enable-mathvec Enable building and installing mathvec [default depends on architecture] + --enable-cet enable Intel Control-flow Enforcement Technology + (CET), x86 only Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] @@ -1451,7 +1477,6 @@ Optional Packages: --with-gd=DIR find libgd include dir and library with prefix DIR --with-gd-include=DIR find libgd include files in DIR --with-gd-lib=DIR find libgd library files in DIR - --with-fp if using floating-point hardware [default=yes] --with-binutils=PATH specify location of binutils (as and ld) --with-selinux if building with SELinux support --with-headers=PATH location of system headers to use (for example @@ -1474,7 +1499,7 @@ Some influential environment variables: Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. -Report bugs to <http://sourceware.org/bugzilla/>. +Report bugs to <https://sourceware.org/bugzilla/>. GNU C Library home page: <http://www.gnu.org/software/glibc/>. General help using GNU software: <http://www.gnu.org/gethelp/>. _ACEOF @@ -2168,12 +2193,12 @@ _ACEOF # We require GCC, and by default use its preprocessor. Override AC_PROG_CPP # here to work around the Autoconf issue discussed in -# <http://sourceware.org/ml/libc-alpha/2013-01/msg00721.html>. +# <https://sourceware.org/ml/libc-alpha/2013-01/msg00721.html>. # AC_PROG_CPP # We require GCC. Override _AC_PROG_CC_C89 here to work around the Autoconf # issue discussed in -# <http://sourceware.org/ml/libc-alpha/2013-01/msg00757.html>. +# <https://sourceware.org/ml/libc-alpha/2013-01/msg00757.html>. @@ -3278,15 +3303,6 @@ libgd-LDFLAGS = $libgd_ldflags" fi -# Check whether --with-fp was given. -if test "${with_fp+set}" = set; then : - withval=$with_fp; with_fp=$withval -else - with_fp=yes -fi - - - # Check whether --with-binutils was given. if test "${with_binutils+set}" = set; then : withval=$with_binutils; path_binutils=$withval @@ -3345,6 +3361,13 @@ else profile=no fi +# Check whether --enable-static-pie was given. +if test "${enable_static_pie+set}" = set; then : + enableval=$enable_static_pie; static_pie=$enableval +else + static_pie=no +fi + # Check whether --enable-timezone-tools was given. if test "${enable_timezone_tools+set}" = set; then : enableval=$enable_timezone_tools; enable_timezone_tools=$enableval @@ -3375,27 +3398,6 @@ if test "$enable_stackguard_randomize" = yes; then fi -# Check whether --enable-lock-elision was given. -if test "${enable_lock_elision+set}" = set; then : - enableval=$enable_lock_elision; enable_lock_elision=$enableval -else - enable_lock_elision=no -fi - - -if test "$enable_lock_elision" = yes ; then - $as_echo "#define ENABLE_LOCK_ELISION 1" >>confdefs.h - -fi - -# Check whether --enable-add-ons was given. -if test "${enable_add_ons+set}" = set; then : - enableval=$enable_add_ons; -else - enable_add_ons=yes -fi - - # Check whether --enable-hidden-plt was given. if test "${enable_hidden_plt+set}" = set; then : enableval=$enable_hidden_plt; hidden=$enableval @@ -3416,6 +3418,22 @@ else fi +if test "x$bindnow" = xyes; then + $as_echo "#define BIND_NOW 1" >>confdefs.h + +fi + +# Check whether --enable-stack-protector was given. +if test "${enable_stack_protector+set}" = set; then : + enableval=$enable_stack_protector; enable_stack_protector=$enableval +else + enable_stack_protector=no +fi + +case "$enable_stack_protector" in +all|yes|no|strong) ;; +*) as_fn_error $? "Not a valid argument for --enable-stack-protector: \"$enable_stack_protector\"" "$LINENO" 5;; +esac # Check whether --enable-static-nss was given. if test "${enable_static_nss+set}" = set; then : @@ -3485,6 +3503,24 @@ else fi +# Check whether --enable-experimental-malloc was given. +if test "${enable_experimental_malloc+set}" = set; then : + enableval=$enable_experimental_malloc; experimental_malloc=$enableval +else + experimental_malloc=yes +fi + + + +# Check whether --enable-crypt was given. +if test "${enable_crypt+set}" = set; then : + enableval=$enable_crypt; build_crypt=$enableval +else + build_crypt=yes +fi + + + # Check whether --enable-nss-crypt was given. if test "${enable_nss_crypt+set}" = set; then : enableval=$enable_nss_crypt; nss_crypt=$enableval @@ -3492,13 +3528,22 @@ else nss_crypt=no fi +if test x$build_libcrypt = xno && test x$nss_crypt = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-nss-crypt has no effect when libcrypt is disabled" >&5 +$as_echo "$as_me: WARNING: --enable-nss-crypt has no effect when libcrypt is disabled" >&2;} + nss_crypt=no +fi if test x$nss_crypt = xyes; then nss_includes=-I$(nss-config --includedir 2>/dev/null) if test $? -ne 0; then as_fn_error $? "cannot find include directory with nss-config" "$LINENO" 5 fi + nspr_includes=-I$(nspr-config --includedir 2>/dev/null) + if test $? -ne 0; then + as_fn_error $? "cannot find include directory with nspr-config" "$LINENO" 5 + fi old_CFLAGS="$CFLAGS" - CFLAGS="$CFLAGS $nss_includes" + CFLAGS="$CFLAGS $nss_includes $nspr_includes" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3522,6 +3567,7 @@ cannot find NSS headers with lowlevel hash function interfaces" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext old_LIBS="$LIBS" + old_LDFLAGS="$LDFLAGS" LIBS="$LIBS -lfreebl3" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -3544,14 +3590,41 @@ cannot link program using lowlevel NSS hash functions" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext + # Check to see if there is a static NSS cryptographic library. + # If there isn't then we can't link anything with libcrypt.a, + # and that might mean disabling some static tests. + LDFLAGS="$LDFLAGS -static" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +typedef int PRBool; +#include <hasht.h> +#include <nsslowhash.h> +int +main () +{ +NSSLOW_Init(); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + libc_cv_static_nss_crypt=yes +else + libc_cv_static_nss_crypt=no +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + LDFLAGS="$old_LDFLAGS" CFLAGS="$old_CFLAGS" LIBS="$old_LIBS" else libc_cv_nss_crypt=no + libc_cv_static_nss_crypt=no fi + # Check whether --enable-obsolete-rpc was given. if test "${enable_obsolete_rpc+set}" = set; then : enableval=$enable_obsolete_rpc; link_obsolete_rpc=$enableval @@ -3566,6 +3639,20 @@ if test "$link_obsolete_rpc" = yes; then fi +# Check whether --enable-obsolete-nsl was given. +if test "${enable_obsolete_nsl+set}" = set; then : + enableval=$enable_obsolete_nsl; build_obsolete_nsl=$enableval +else + build_obsolete_nsl=no +fi + + + +if test "$build_obsolete_nsl" = yes; then + $as_echo "#define LINK_OBSOLETE_NSL 1" >>confdefs.h + +fi + # Check whether --enable-systemtap was given. if test "${enable_systemtap+set}" = set; then : enableval=$enable_systemtap; systemtap=$enableval @@ -3642,6 +3729,19 @@ if test "$build_pt_chown" = yes; then fi +# Check whether --enable-tunables was given. +if test "${enable_tunables+set}" = set; then : + enableval=$enable_tunables; have_tunables=$enableval +else + have_tunables=yes +fi + + +if test "$have_tunables" = yes; then + $as_echo "#define HAVE_TUNABLES 1" >>confdefs.h + +fi + # The abi-tags file uses a fairly simplistic model for name recognition that # can't distinguish i486-pc-linux-gnu fully from i486-pc-gnu. So we mutate a # $host_os of `gnu*' here to be `gnu-gnu*' just so that it can tell. @@ -3662,6 +3762,14 @@ else fi +# Check whether --enable-cet was given. +if test "${enable_cet+set}" = set; then : + enableval=$enable_cet; enable_cet=$enableval +else + enable_cet=no +fi + + # We keep the original values in `$config_*' and never modify them, so we # can write them unchanged into config.make. Everything else uses # $machine, $vendor, and $os, and changes them whenever convenient. @@ -3674,7 +3782,7 @@ config_os="`echo $config_os | sed 's/^unknown-//'`" # Some configurations imply other options. elf=yes -# The configure fragment of an add-on port can modify these to supplement +# The configure fragment of a port can modify these to supplement # or override the table in the case statement below. No fragment should # ever change the config_* variables, however. machine=$config_machine @@ -3699,6 +3807,11 @@ fi # check below. libc_config_ok=no +# A preconfigure script for a system that may or may not use fpu +# sysdeps directories sets this to a preprocessor conditional for +# whether to use such directories. +with_fp_cond=1 + if frags=`ls -d $srcdir/sysdeps/*/preconfigure 2> /dev/null` then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysdeps preconfigure fragments" >&5 @@ -3712,143 +3825,6 @@ $as_echo_n "checking for sysdeps preconfigure fragments... " >&6; } $as_echo "" >&6; } fi -subdirs="$subdirs " - - -case "$enable_add_ons" in -''|no) add_ons= ;; -yes|'*') - add_ons=`cd $srcdir && ls -d 2> /dev/null */configure */sysdeps | - sed 's@/[^/]*$@@' | sort | uniq` - add_ons_automatic=yes - ;; -*) add_ons=`echo "$enable_add_ons" | sed 's/,/ /g'` - add_ons_automatic=no ;; -esac - -configured_add_ons= -add_ons_sfx= -add_ons_pfx= -if test x"$add_ons" != x; then - for f in $add_ons; do - # Some sanity checks - case "$f" in - crypt) - as_fn_error $? " -*** It seems that you're using an old \`crypt' add-on. crypt is now -*** part of glibc and using the old add-on will not work with this -*** release. Start again with fresh sources and without the old -*** \`crypt' add-on." "$LINENO" 5 - ;; - localedata) - as_fn_error $? " -*** It seems that you're using an old \`localedata' add-on. localedata -*** is now part of glibc and using the old add-on will not work with -*** this release. Start again with fresh sources and without the old -*** \`localedata' add-on." "$LINENO" 5 - ;; - esac - done - - # Now source each add-on's configure fragment. - # The fragments can use $srcdir/$libc_add_on to find themselves, - # and test $add_ons_automatic to see if they were explicitly requested. - # A fragment can clear (or even change) $libc_add_on to affect - # whether it goes into the list to be actually used in the build. - use_add_ons= - for libc_add_on in $add_ons; do - # Test whether such a directory really exists. - # It can be absolute, or relative to $srcdir, or relative to the build dir. - case "$libc_add_on" in - /*) - libc_add_on_srcdir=$libc_add_on - ;; - *) - test -d "$srcdir/$libc_add_on" || { - if test -d "$libc_add_on"; then - libc_add_on="`pwd`/$libc_add_on" - else - as_fn_error $? "add-on directory \"$libc_add_on\" does not exist" "$LINENO" 5 - fi - } - libc_add_on_srcdir=$srcdir/$libc_add_on - ;; - esac - - libc_add_on_frag=$libc_add_on_srcdir/configure - libc_add_on_canonical= - libc_add_on_config_subdirs= - if test -r "$libc_add_on_frag"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: running configure fragment for add-on $libc_add_on" >&5 -$as_echo "$as_me: running configure fragment for add-on $libc_add_on" >&6;} - libc_add_on_canonical=unknown - libc_add_on_subdirs= - . "$libc_add_on_frag" - test -z "$libc_add_on" || { - configured_add_ons="$configured_add_ons $libc_add_on" - if test "x$libc_add_on_canonical" = xunknown; then - as_fn_error $? "fragment must set \$libc_add_on_canonical" "$LINENO" 5 - fi - for d in $libc_add_on_subdirs; do - case "$libc_add_on" in - /*) subdir_srcdir="$libc_add_on" ;; - *) subdir_srcdir="\$(..)$libc_add_on" ;; - esac - case "$d" in - .) - d="${libc_add_on_canonical:-$libc_add_on}" - ;; - /*) - subdir_srcdir="$d" - ;; - *) - subdir_srcdir="$subdir_srcdir/$d" - ;; - esac - d=`echo "$d" | sed 's@/*$@@;s@^.*/@@'` - add_on_subdirs="$add_on_subdirs $d" - test "$subdir_srcdir" = "\$(..)$d" || config_vars="$config_vars -$d-srcdir = $subdir_srcdir" - done - for d in $libc_add_on_config_subdirs; do - case "$d" in - /*) as_fn_error $? "fragment uses absolute path in \$libc_add_on_config_subdirs" "$LINENO" 5 ;; - esac - if test ! -d "$libc_add_on_srcdir/$d"; then - as_fn_error $? "fragment wants to configure missing directory $d" "$LINENO" 5 - fi - case "$libc_add_on" in - /*) as_fn_error $? "relative path required for add-on using \$libc_add_on_config_subdirs" "$LINENO" 5 ;; - esac - subdirs="$subdirs $libc_add_on/$d" - done - } - fi - if test -n "$libc_add_on"; then - if frags=`ls -d $libc_add_on_srcdir/sysdeps/*/preconfigure 2> /dev/null` -then - { $as_echo "$as_me:${as_lineno-$LINENO}: checking add-on $libc_add_on for preconfigure fragments" >&5 -$as_echo_n "checking add-on $libc_add_on for preconfigure fragments... " >&6; } - for frag in $frags; do - name=`echo "$frag" | sed 's@/[^/]*$@@;s@^.*/@@'` - echo $ECHO_N "$name $ECHO_C" >&6 - . "$frag" - done - { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 -$as_echo "" >&6; } -fi - use_add_ons="$use_add_ons $libc_add_on" - add_ons_pfx="$add_ons_pfx $libc_add_on/" - test -z "$libc_add_on_canonical" || - add_ons_sfx="$add_ons_sfx /$libc_add_on_canonical" - fi - done - # Use echo to strip excess whitespace. - add_ons="`echo $use_add_ons`" -fi - - - ### ### By using the undocumented --enable-hacker-mode option for configure @@ -3864,7 +3840,7 @@ if test -z "$enable_hacker_mode" && test x"$libc_config_ok" != xyes; then *** The GNU C library is currently unavailable for this platform. *** If you are interested in seeing glibc on this platform visit *** the \"How to submit a new port\" in the wiki: -*** https://sourceware.org/glibc/wiki/HomePage#Development +*** https://sourceware.org/glibc/wiki/#Development *** and join the community!" "$LINENO" 5 ;; esac @@ -3874,6 +3850,129 @@ fi test -n "$base_machine" || base_machine=$machine +# Determine whether to use fpu or nofpu sysdeps directories. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for use of fpu sysdeps directories" >&5 +$as_echo_n "checking for use of fpu sysdeps directories... " >&6; } +if ${libc_cv_with_fp+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <<EOF +#if $with_fp_cond +int dummy; +#else +# error "no hardware floating point" +#endif +EOF +libc_cv_with_fp=no +if ${CC-cc} $CFLAGS $CPPFLAGS -S conftest.c -o conftest.s \ + 1>&5 2>&5 ; then + libc_cv_with_fp=yes +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_with_fp" >&5 +$as_echo "$libc_cv_with_fp" >&6; } + + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fstack-protector" >&5 +$as_echo_n "checking for -fstack-protector... " >&6; } +if ${libc_cv_ssp+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector -xc /dev/null -S -o /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + libc_cv_ssp=yes +else + libc_cv_ssp=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ssp" >&5 +$as_echo "$libc_cv_ssp" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fstack-protector-strong" >&5 +$as_echo_n "checking for -fstack-protector-strong... " >&6; } +if ${libc_cv_ssp_strong+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector-strong -xc /dev/null -S -o /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + libc_cv_ssp_strong=yes +else + libc_cv_ssp_strong=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ssp_strong" >&5 +$as_echo "$libc_cv_ssp_strong" >&6; } + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fstack-protector-all" >&5 +$as_echo_n "checking for -fstack-protector-all... " >&6; } +if ${libc_cv_ssp_all+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector-all -xc /dev/null -S -o /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + libc_cv_ssp_all=yes +else + libc_cv_ssp_all=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ssp_all" >&5 +$as_echo "$libc_cv_ssp_all" >&6; } + +stack_protector= +no_stack_protector= +if test "$libc_cv_ssp" = yes; then + no_stack_protector="-fno-stack-protector -DSTACK_PROTECTOR_LEVEL=0" + $as_echo "#define HAVE_CC_NO_STACK_PROTECTOR 1" >>confdefs.h + +fi + +if test "$enable_stack_protector" = yes && test "$libc_cv_ssp" = yes; then + stack_protector="-fstack-protector" + $as_echo "#define STACK_PROTECTOR_LEVEL 1" >>confdefs.h + +elif test "$enable_stack_protector" = all && test "$libc_cv_ssp_all" = yes; then + stack_protector="-fstack-protector-all" + $as_echo "#define STACK_PROTECTOR_LEVEL 2" >>confdefs.h + +elif test "$enable_stack_protector" = strong && test "$libc_cv_ssp_strong" = yes; then + stack_protector="-fstack-protector-strong" + $as_echo "#define STACK_PROTECTOR_LEVEL 3" >>confdefs.h + +else + stack_protector="-fno-stack-protector" + $as_echo "#define STACK_PROTECTOR_LEVEL 0" >>confdefs.h + +fi + + + + +if test -n "$stack_protector"; then + no_ssp=-fno-stack-protector +else + no_ssp= + + if test "$enable_stack_protector" != no; then + as_fn_error $? "--enable-stack-protector=$enable_stack_protector specified, but specified level of stack protection is not supported by the compiler." "$LINENO" 5 + fi +fi + # For the multi-arch option we need support in the assembler & linker. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for assembler and linker STT_GNU_IFUNC support" >&5 $as_echo_n "checking for assembler and linker STT_GNU_IFUNC support... " >&6; } @@ -3896,7 +3995,7 @@ __start: EOF libc_cv_ld_gnu_indirect_function=no if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \ - -nostartfiles -nostdlib \ + -nostartfiles -nostdlib $no_ssp \ -o conftest conftest.S 1>&5 2>&5; then # Do a link to see if the backend supports IFUNC relocs. $READELF -r conftest 1>&5 @@ -3909,6 +4008,62 @@ fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ld_gnu_indirect_function" >&5 $as_echo "$libc_cv_ld_gnu_indirect_function" >&6; } +# Check if gcc supports attribute ifunc as it is used in libc_ifunc macro. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcc attribute ifunc support" >&5 +$as_echo_n "checking for gcc attribute ifunc support... " >&6; } +if ${libc_cv_gcc_indirect_function+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <<EOF +extern int func (int); +int used_func (int a) +{ + return a; +} +static void *resolver () +{ + return &used_func; +} +extern __typeof (func) func __attribute__ ((ifunc ("resolver"))); +EOF +libc_cv_gcc_indirect_function=no +if ${CC-cc} -c conftest.c -o conftest.o 1>&5 \ + 2>&5 ; then + if $READELF -s conftest.o | grep IFUNC >/dev/null 2>&5; then + libc_cv_gcc_indirect_function=yes + fi +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_indirect_function" >&5 +$as_echo "$libc_cv_gcc_indirect_function" >&6; } + +# Check if gcc warns about alias for function with incompatible types. +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler warns about alias for function with incompatible types" >&5 +$as_echo_n "checking if compiler warns about alias for function with incompatible types... " >&6; } +if ${libc_cv_gcc_incompatible_alias+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <<EOF +int __redirect_foo (const void *s, int c); + +__typeof (__redirect_foo) *foo_impl (void) __asm__ ("foo"); +__typeof (__redirect_foo) *foo_impl (void) +{ + return 0; +} + +extern __typeof (__redirect_foo) foo_alias __attribute__ ((alias ("foo"))); +EOF +libc_cv_gcc_incompatible_alias=yes +if ${CC-cc} -Werror -c conftest.c -o conftest.o 1>&5 2>&5 ; then + libc_cv_gcc_incompatible_alias=no +fi +rm -f conftest* +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_gcc_incompatible_alias" >&5 +$as_echo "$libc_cv_gcc_incompatible_alias" >&6; } + if test x"$libc_cv_ld_gnu_indirect_function" != xyes; then if test x"$multi_arch" = xyes; then as_fn_error $? "--enable-multi-arch support requires assembler and linker support" "$LINENO" 5 @@ -3916,6 +4071,26 @@ if test x"$libc_cv_ld_gnu_indirect_function" != xyes; then multi_arch=no fi fi +if test x"$libc_cv_gcc_indirect_function" != xyes; then + # GCC 8+ emits a warning for alias with incompatible types and it might + # fail to build ifunc resolvers aliases to either weak or internal + # symbols. Disables multiarch build in this case. + if test x"$libc_cv_gcc_incompatible_alias" == xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gcc emits a warning for alias between functions of incompatible types" >&5 +$as_echo "$as_me: WARNING: gcc emits a warning for alias between functions of incompatible types" >&2;} + if test x"$multi_arch" = xyes; then + as_fn_error $? "--enable-multi-arch support requires a gcc with gnu-indirect-function support" "$LINENO" 5 + fi + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Multi-arch is disabled." >&5 +$as_echo "$as_me: WARNING: Multi-arch is disabled." >&2;} + multi_arch=no + elif test x"$multi_arch" = xyes; then + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --enable-multi-arch support recommends a gcc with gnu-indirect-function support. +Please use a gcc which supports it by default or configure gcc with --enable-gnu-indirect-function" >&5 +$as_echo "$as_me: WARNING: --enable-multi-arch support recommends a gcc with gnu-indirect-function support. +Please use a gcc which supports it by default or configure gcc with --enable-gnu-indirect-function" >&2;} + fi +fi multi_arch_d= if test x"$multi_arch" != xno; then multi_arch_d=/multiarch @@ -3968,7 +4143,7 @@ tail=$machine${submachine:+/$submachine} while m=`echo $tail | sed 's@^\(.*\)/\([^/]*\)$@& \1@'`; test -n "$m"; do set $m # Prepend the machine's FPU directory unless --without-fp. - if test "$with_fp" = yes; then + if test "$libc_cv_with_fp" = yes; then maybe_fpu=/fpu else maybe_fpu=/nofpu @@ -3984,7 +4159,6 @@ done # Find what sysdep directories exist. -sysnames_add_ons= sysnames= for b in $base ''; do for m0 in $mach ''; do @@ -3993,34 +4167,21 @@ for b in $base ''; do for o in /$ostry ''; do test "$o" = / && continue for m in $mach ''; do - for d in $add_ons_pfx ''; do - for a in $add_ons_sfx ''; do - try_suffix="$m0$b$v$o$m" - if test -n "$try_suffix"; then - try_srcdir="${srcdir}/" - case "$d" in - /*) try_srcdir= ;; - esac - try="${d}sysdeps$try_suffix$a" - test -n "$enable_debug_configure" && - echo "$0 DEBUG: try $try" >&2 - if test -d "$try_srcdir$try"; then - sysnames="$sysnames $try" - { test -n "$o" || test -n "$b"; } && os_used=t - { test -n "$m" || test -n "$m0"; } && machine_used=t - case x${m0:-$m} in - x*/$submachine) submachine_used=t ;; - esac - if test -n "$d"; then - case "$sysnames_add_ons" in - *" $d "*) ;; - *|'') sysnames_add_ons="$sysnames_add_ons $d" ;; - esac - fi - fi - fi - done - done + try_suffix="$m0$b$v$o$m" + if test -n "$try_suffix"; then + try_srcdir="${srcdir}/" + try="sysdeps$try_suffix" + test -n "$enable_debug_configure" && + echo "$0 DEBUG: try $try" >&2 + if test -d "$try_srcdir$try"; then + sysnames="$sysnames $try" + { test -n "$o" || test -n "$b"; } && os_used=t + { test -n "$m" || test -n "$m0"; } && machine_used=t + case x${m0:-$m} in + x*/$submachine) submachine_used=t ;; + esac + fi + fi done done done @@ -4029,7 +4190,7 @@ done # If the assembler supports gnu_indirect_function symbol type and the # architecture supports multi-arch, we enable multi-arch by default. -case $sysnames_add_ons$sysnames in +case $sysnames in *"$multi_arch_d"*) ;; *) @@ -4092,24 +4253,15 @@ while test $# -gt 0; do eval "${implies_type}=\"\$${implies_type} \$name_base/\$x\"" found=yes fi - for d in $add_ons_pfx ''; do - try="${d}sysdeps/$x" - case $d in - /*) try_srcdir= ;; - *) try_srcdir=$srcdir/ ;; - esac - test -n "$enable_debug_configure" && - echo "DEBUG: $name $implies_file $x try($d) {$try_srcdir}$try" >&2 - if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try; - then - eval "${implies_type}=\"\$${implies_type} \$try\"" - found=yes - case "$sysnames_add_ons" in - *" $d "*) ;; - *|'') sysnames_add_ons="$sysnames_add_ons $d" ;; - esac - fi - done + try="sysdeps/$x" + try_srcdir=$srcdir/ + test -n "$enable_debug_configure" && + echo "DEBUG: $name $implies_file $x try() {$try_srcdir}$try" >&2 + if test $try != $xsrcdir$name_base/$x && test -d $try_srcdir$try; + then + eval "${implies_type}=\"\$${implies_type} \$try\"" + found=yes + fi if test $found = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $name/$implies_file specifies nonexistent $x" >&5 $as_echo "$as_me: WARNING: $name/$implies_file specifies nonexistent $x" >&2;} @@ -4147,63 +4299,6 @@ sysnames="$names $default_sysnames" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $default_sysnames" >&5 $as_echo "$default_sysnames" >&6; } -# Collect the list of add-ons that supply partial sysdeps trees. -sysdeps_add_ons= -for add_on in $add_ons; do - case "$add_on" in - /*) xsrcdir= ;; - *) xsrcdir="$srcdir/" ;; - esac - - test -d "$xsrcdir$add_on/sysdeps" || { - case "$configured_add_ons " in - *" $add_on "*) ;; - *|'') - as_fn_error $? "add-on $add_on has no configure fragment or sysdeps tree" "$LINENO" 5 - ;; - esac - continue - } - - sysdeps_add_ons="$sysdeps_add_ons $add_on" - case "$sysnames_add_ons" in - *" $add_on/ "*) ;; - *|'') - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: add-on $add_on contributed no sysdeps directories" >&5 -$as_echo "$as_me: WARNING: add-on $add_on contributed no sysdeps directories" >&2;} - continue ;; - esac - - found=no - for d in $sysnames; do - case "$d" in - $add_on/sysdeps/*) ;; - *) continue ;; - esac - (cd "$xsrcdir$d" && for f in *[!~]; do - case "$f" in - sys|bits) - for ff in $f/*.h; do - test -d "$ff" || { test -e "$ff" && exit 88; } - done - ;; - *) - test -d "$f" || { test -e "$f" && exit 88; } - ;; - esac - done) - if test $? -eq 88; then - found=yes - break - fi - done - if test $found = no; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: add-on $add_on contributed no useful sysdeps directories" >&5 -$as_echo "$as_me: WARNING: add-on $add_on contributed no useful sysdeps directories" >&2;} - fi -done - - ### Locate tools. @@ -4330,6 +4425,8 @@ OBJDUMP=`$CC -print-prog-name=objdump` OBJCOPY=`$CC -print-prog-name=objcopy` +GPROF=`$CC -print-prog-name=gprof` + # Determine whether we are using GNU binutils. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $AS is GNU as" >&5 @@ -4370,7 +4467,7 @@ $as_echo "$libc_cv_prog_ld_gnu" >&6; } gnu_ld=$libc_cv_prog_ld_gnu -# Accept binutils 2.22 or newer. +# Accept binutils 2.25 or newer. for ac_prog in $AS do # Extract the first word of "$ac_prog", so it can be a program name with args. @@ -4422,7 +4519,7 @@ $as_echo_n "checking version of $AS... " >&6; } ac_prog_version=`$AS --version 2>&1 | sed -n 's/^.*GNU assembler.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) + 2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; @@ -4434,7 +4531,74 @@ if test $ac_verc_fail = yes; then AS=: critic_missing="$critic_missing as" fi -for ac_prog in $LD + +if test -n "`$LD --version | sed -n 's/^GNU \(gold\).*$/\1/p'`"; then + # Accept gold 1.14 or higher + for ac_prog in $LD +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_LD+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$LD"; then + ac_cv_prog_LD="$LD" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_LD="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +LD=$ac_cv_prog_LD +if test -n "$LD"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 +$as_echo "$LD" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$LD" && break +done + +if test -z "$LD"; then + ac_verc_fail=yes +else + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $LD" >&5 +$as_echo_n "checking version of $LD... " >&6; } + ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU gold.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 1.1[4-9]*|1.[2-9][0-9]*|1.1[0-9][0-9]*|[2-9].*|[1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 +$as_echo "$ac_prog_version" >&6; } +fi +if test $ac_verc_fail = yes; then + LD=: critic_missing="$critic_missing GNU gold" +fi + +else + for ac_prog in $LD do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 @@ -4485,7 +4649,7 @@ $as_echo_n "checking version of $LD... " >&6; } ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.1[0-9][0-9]*|2.2[2-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) + 2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; @@ -4494,9 +4658,10 @@ $as_echo_n "checking version of $LD... " >&6; } $as_echo "$ac_prog_version" >&6; } fi if test $ac_verc_fail = yes; then - LD=: critic_missing="$critic_missing ld" + LD=: critic_missing="$critic_missing GNU ld" fi +fi # These programs are version sensitive. @@ -4551,7 +4716,7 @@ $as_echo_n "checking version of $MAKE... " >&6; } ac_prog_version=`$MAKE --version 2>&1 | sed -n 's/^.*GNU Make[^0-9]*\([0-9][0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 3.79* | 3.[89]* | [4-9].* | [1-9][0-9]*) + [4-9].* | [1-9][0-9]*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; @@ -4816,6 +4981,69 @@ if test $ac_verc_fail = yes; then critic_missing="$critic_missing gawk" fi +for ac_prog in bison +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_BISON+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$BISON"; then + ac_cv_prog_BISON="$BISON" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_BISON="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +BISON=$ac_cv_prog_BISON +if test -n "$BISON"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5 +$as_echo "$BISON" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$BISON" && break +done + +if test -z "$BISON"; then + ac_verc_fail=yes +else + # Found it, now check the version. + { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $BISON" >&5 +$as_echo_n "checking version of $BISON... " >&6; } + ac_prog_version=`$BISON --version 2>&1 | sed -n 's/^.*bison (GNU Bison) \([0-9]*\.[0-9.]*\).*$/\1/p'` + case $ac_prog_version in + '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; + 2.7*|[3-9].*|[1-9][0-9]*) + ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; + *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; + + esac + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 +$as_echo "$ac_prog_version" >&6; } +fi +if test $ac_verc_fail = yes; then + critic_missing="$critic_missing bison" +fi + { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC is sufficient to build libc" >&5 $as_echo_n "checking if $CC is sufficient to build libc... " >&6; } @@ -4830,7 +5058,7 @@ int main () { -#if !defined __GNUC__ || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 7) +#if !defined __GNUC__ || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 9) #error insufficient compiler #endif ; @@ -5013,17 +5241,73 @@ else AUTOCONF=no fi +# Check for python3 if available, or else python. +for ac_prog in python3 python +do + # Extract the first word of "$ac_prog", so it can be a program name with args. +set dummy $ac_prog; ac_word=$2 +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 +$as_echo_n "checking for $ac_word... " >&6; } +if ${ac_cv_prog_PYTHON_PROG+:} false; then : + $as_echo_n "(cached) " >&6 +else + if test -n "$PYTHON_PROG"; then + ac_cv_prog_PYTHON_PROG="$PYTHON_PROG" # Let the user override the test. +else +as_save_IFS=$IFS; IFS=$PATH_SEPARATOR +for as_dir in $PATH +do + IFS=$as_save_IFS + test -z "$as_dir" && as_dir=. + for ac_exec_ext in '' $ac_executable_extensions; do + if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then + ac_cv_prog_PYTHON_PROG="$ac_prog" + $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 + break 2 + fi +done + done +IFS=$as_save_IFS + +fi +fi +PYTHON_PROG=$ac_cv_prog_PYTHON_PROG +if test -n "$PYTHON_PROG"; then + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON_PROG" >&5 +$as_echo "$PYTHON_PROG" >&6; } +else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 +$as_echo "no" >&6; } +fi + + + test -n "$PYTHON_PROG" && break +done +test -n "$PYTHON_PROG" || PYTHON_PROG="no" + +case "x$PYTHON_PROG" in +xno|x|x:) PYTHON_PROG=no ;; +*) ;; +esac + +if test "x$PYTHON_PROG" = xno; then + aux_missing="$aux_missing python" +else + PYTHON="$PYTHON_PROG -B" + +fi + test -n "$critic_missing" && as_fn_error $? " *** These critical programs are missing or too old:$critic_missing *** Check the INSTALL file for required versions." "$LINENO" 5 test -n "$aux_missing" && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** These auxiliary programs are missing or incompatible versions:$aux_missing -*** some features will be disabled. +*** some features or tests will be disabled. *** Check the INSTALL file for required versions." >&5 $as_echo "$as_me: WARNING: *** These auxiliary programs are missing or incompatible versions:$aux_missing -*** some features will be disabled. +*** some features or tests will be disabled. *** Check the INSTALL file for required versions." >&2;} # if using special system headers, find out the compiler's sekrit @@ -5049,6 +5333,21 @@ fi +# Obtain some C++ header file paths. This is used to make a local +# copy of those headers in Makerules. +if test -n "$CXX"; then + find_cxx_header () { + echo "#include <$1>" | $CXX -M -MP -x c++ - 2>/dev/null \ + | sed -n "\,$1:,{s/:\$//;p}" + } + CXX_CSTDLIB_HEADER="$(find_cxx_header cstdlib)" + CXX_CMATH_HEADER="$(find_cxx_header cmath)" + CXX_BITS_STD_ABS_H="$(find_cxx_header bits/std_abs.h)" +fi + + + + # Test if LD_LIBRARY_PATH contains the notation for the current directory # since this would lead to problems installing/building glibc. # LD_LIBRARY_PATH contains the current directory if one of the following @@ -5204,69 +5503,6 @@ $as_echo "no" >&6; } fi -for ac_prog in bison -do - # Extract the first word of "$ac_prog", so it can be a program name with args. -set dummy $ac_prog; ac_word=$2 -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 -$as_echo_n "checking for $ac_word... " >&6; } -if ${ac_cv_prog_BISON+:} false; then : - $as_echo_n "(cached) " >&6 -else - if test -n "$BISON"; then - ac_cv_prog_BISON="$BISON" # Let the user override the test. -else -as_save_IFS=$IFS; IFS=$PATH_SEPARATOR -for as_dir in $PATH -do - IFS=$as_save_IFS - test -z "$as_dir" && as_dir=. - for ac_exec_ext in '' $ac_executable_extensions; do - if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then - ac_cv_prog_BISON="$ac_prog" - $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 - break 2 - fi -done - done -IFS=$as_save_IFS - -fi -fi -BISON=$ac_cv_prog_BISON -if test -n "$BISON"; then - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5 -$as_echo "$BISON" >&6; } -else - { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 -$as_echo "no" >&6; } -fi - - - test -n "$BISON" && break -done - -if test -z "$BISON"; then - ac_verc_fail=yes -else - # Found it, now check the version. - { $as_echo "$as_me:${as_lineno-$LINENO}: checking version of $BISON" >&5 -$as_echo_n "checking version of $BISON... " >&6; } - ac_prog_version=`$BISON --version 2>&1 | sed -n 's/^.*bison (GNU Bison) \([0-9]*\.[0-9.]*\).*$/\1/p'` - case $ac_prog_version in - '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; - 2.7*|[3-9].*|[1-9][0-9]*) - ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; - *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; - - esac - { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 -$as_echo "$ac_prog_version" >&6; } -fi -if test $ac_verc_fail = yes; then - BISON=no -fi - { $as_echo "$as_me:${as_lineno-$LINENO}: checking for .set assembler directive" >&5 $as_echo_n "checking for .set assembler directive... " >&6; } @@ -5286,7 +5522,7 @@ extern int glibc_conftest_frobozz; void _start() { glibc_conftest_frobozz = 1; } EOF if ${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS \ - -nostartfiles -nostdlib \ + -nostartfiles -nostdlib $no_ssp \ -o conftest conftest.s conftest1.c 1>&5 2>&5; then libc_cv_asm_set_directive=yes else @@ -5310,7 +5546,7 @@ else int bar __attribute__ ((visibility ("protected"))) = 1; EOF libc_cv_protected_data=no - if { ac_try='${CC-cc} -nostdlib -nostartfiles -fPIC -shared conftest.c -o conftest.so' + if { ac_try='${CC-cc} -nostdlib -nostartfiles $no_ssp -fPIC -shared conftest.c -o conftest.so' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5320,7 +5556,7 @@ EOF extern int bar; int main (void) { return bar; } EOF - if { ac_try='${CC-cc} -nostdlib -nostartfiles conftest.c -o conftest conftest.so' + if { ac_try='${CC-cc} -nostdlib -nostartfiles $no_ssp conftest.c -o conftest conftest.so' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5336,6 +5572,38 @@ fi $as_echo "$libc_cv_protected_data" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking linker support for INSERT in linker script" >&5 +$as_echo_n "checking linker support for INSERT in linker script... " >&6; } +if ${libc_cv_insert+:} false; then : + $as_echo_n "(cached) " >&6 +else + cat > conftest.c <<EOF + const int __attribute__ ((section(".bar"))) bar = 0x12345678; + int test (void) { return bar; } +EOF + cat > conftest.t <<EOF + SECTIONS + { + .bar : { *(.bar) } + } + INSERT AFTER .rela.dyn; +EOF + libc_cv_insert=no + if { ac_try='${CC-cc} -nostdlib -nostartfiles $no_ssp -fPIC -shared conftest.c -Wl,-T,conftest.t -o conftest.so' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then + libc_cv_insert=yes + fi + rm -f conftest.* + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_insert" >&5 +$as_echo "$libc_cv_insert" >&6; } + + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken __attribute__((alias()))" >&5 $as_echo_n "checking for broken __attribute__((alias()))... " >&6; } if ${libc_cv_broken_alias_attribute+:} false; then : @@ -5405,7 +5673,7 @@ __attribute__ ((constructor)) void ctor (void) { asm (""); } __attribute__ ((destructor)) void dtor (void) { asm (""); } EOF -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -o conftest +if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -o conftest conftest.c -static -nostartfiles -nostdlib 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -5518,7 +5786,7 @@ extern int mumble; int foo (void) { return bar (mumble); } EOF if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS - -fPIC -shared -o conftest.so conftest.c + -fPIC -shared $no_ssp -o conftest.so conftest.c -nostdlib -nostartfiles -Wl,-z,combreloc 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -5527,7 +5795,7 @@ if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then - if $READELF -S conftest.so | grep '\.rel\(a\|\)\.dyn' > /dev/null; then + if $READELF -S conftest.so | grep -E '.rela?.dyn' > /dev/null; then libc_cv_z_combreloc=yes else libc_cv_z_combreloc=no @@ -5554,7 +5822,7 @@ if test x"$gnu_ld" = x"yes"; then cat > conftest.c <<EOF int _start (void) { return 42; } EOF - if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -Wl,-z,execstack -nostdlib -nostartfiles -fPIC -shared -o conftest.so conftest.c 1>&5' @@ -5578,6 +5846,62 @@ fi $as_echo "$libc_linker_feature" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for linker that supports --no-dynamic-linker" >&5 +$as_echo_n "checking for linker that supports --no-dynamic-linker... " >&6; } +libc_linker_feature=no +if test x"$gnu_ld" = x"yes"; then + libc_linker_check=`$LD -v --help 2>/dev/null | grep "\--no-dynamic-linker"` + if test -n "$libc_linker_check"; then + cat > conftest.c <<EOF +int _start (void) { return 42; } +EOF + if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp + -Wl,--no-dynamic-linker -nostdlib -nostartfiles + -fPIC -shared -o conftest.so conftest.c + 1>&5' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; } + then + libc_linker_feature=yes + fi + rm -f conftest* + fi +fi +if test $libc_linker_feature = yes; then + libc_cv_no_dynamic_linker=yes +else + libc_cv_no_dynamic_linker=no +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_linker_feature" >&5 +$as_echo "$libc_linker_feature" >&6; } +config_vars="$config_vars +have-no-dynamic-linker = $libc_cv_no_dynamic_linker" + +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -static-pie" >&5 +$as_echo_n "checking for -static-pie... " >&6; } +if ${libc_cv_static_pie+:} false; then : + $as_echo_n "(cached) " >&6 +else + if { ac_try='${CC-cc} -static-pie -xc /dev/null -S -o /dev/null' + { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 + (eval $ac_try) 2>&5 + ac_status=$? + $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 + test $ac_status = 0; }; }; then : + libc_cv_static_pie=yes +else + libc_cv_static_pie=no +fi + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_static_pie" >&5 +$as_echo "$libc_cv_static_pie" >&6; } +config_vars="$config_vars +have-static-pie = $libc_cv_static_pie" + { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fpie" >&5 $as_echo_n "checking for -fpie... " >&6; } if ${libc_cv_fpie+:} false; then : @@ -5608,7 +5932,7 @@ else cat > conftest.c <<EOF int _start (void) { return 42; } EOF -if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS +if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS $no_ssp -fPIC -shared -o conftest.so conftest.c -Wl,--hash-style=both -nostdlib 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 @@ -5701,7 +6025,7 @@ int foo (void) { return mumble; } EOF if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $LDFLAGS -fPIC -shared -o conftest.so conftest.c - -nostdlib -nostartfiles + -nostdlib -nostartfiles $no_ssp 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 @@ -5729,7 +6053,7 @@ if ${libc_cv_output_format+:} false; then : $as_echo_n "(cached) " >&6 else if libc_cv_output_format=` -${CC-cc} -nostartfiles -nostdlib -Wl,--print-output-format 2>&5` +${CC-cc} -nostartfiles -nostdlib $no_ssp -Wl,--print-output-format 2>&5` then : else @@ -5772,53 +6096,37 @@ else fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fstack-protector" >&5 -$as_echo_n "checking for -fstack-protector... " >&6; } -if ${libc_cv_ssp+:} false; then : - $as_echo_n "(cached) " >&6 -else - if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector -xc /dev/null -S -o /dev/null' - { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 - (eval $ac_try) 2>&5 - ac_status=$? - $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - libc_cv_ssp=yes -else - libc_cv_ssp=no -fi - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ssp" >&5 -$as_echo "$libc_cv_ssp" >&6; } - -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -fstack-protector-strong" >&5 -$as_echo_n "checking for -fstack-protector-strong... " >&6; } -if ${libc_cv_ssp_strong+:} false; then : +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for -mtls-dialect=gnu2" >&5 +$as_echo_n "checking for -mtls-dialect=gnu2... " >&6; } +if ${libc_cv_mtls_dialect_gnu2+:} false; then : $as_echo_n "(cached) " >&6 else - if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -Werror -fstack-protector-strong -xc /dev/null -S -o /dev/null' + cat > conftest.c <<EOF +__thread int i; +void foo (void) +{ + i = 10; +} +EOF +if { ac_try='${CC-cc} $CFLAGS $CPPFLAGS -S -fPIC -mtls-dialect=gnu2 + conftest.c 1>&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 - test $ac_status = 0; }; }; then : - libc_cv_ssp_strong=yes + test $ac_status = 0; }; } +then + libc_cv_mtls_dialect_gnu2=yes else - libc_cv_ssp_strong=no -fi - + libc_cv_mtls_dialect_gnu2=no fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_ssp_strong" >&5 -$as_echo "$libc_cv_ssp_strong" >&6; } - -stack_protector= -if test "$libc_cv_ssp_strong" = "yes"; then - stack_protector="-fstack-protector-strong" -elif test "$libc_cv_ssp" = "yes"; then - stack_protector="-fstack-protector" +rm -f conftest* fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_mtls_dialect_gnu2" >&5 +$as_echo "$libc_cv_mtls_dialect_gnu2" >&6; } +config_vars="$config_vars +have-mtls-dialect-gnu2 = $libc_cv_mtls_dialect_gnu2" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc puts quotes around section names" >&5 $as_echo_n "checking whether cc puts quotes around section names... " >&6; } @@ -5859,7 +6167,7 @@ void zero (void *x) __builtin_memset (x, 0, 1000); } EOF -if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "memset" > /dev/null' +if { ac_try='${CC-cc} -O3 -S conftest.c -o - | grep -F "memset" > /dev/null' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -5891,7 +6199,7 @@ char *foo (const char *a, const char *b) return __builtin_strstr (a, b); } EOF -if { ac_try='${CC-cc} -O3 -S conftest.c -o - | fgrep "my_strstr" > /dev/null' +if { ac_try='${CC-cc} -O3 -S conftest.c -o - | grep -F "my_strstr" > /dev/null' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 (eval $ac_try) 2>&5 ac_status=$? @@ -6223,58 +6531,6 @@ if test $libc_cv_predef_fortify_source = yes; then fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC implicitly enables -fstack-protector" >&5 -$as_echo_n "checking whether $CC implicitly enables -fstack-protector... " >&6; } -if ${libc_cv_predef_stack_protector+:} false; then : - $as_echo_n "(cached) " >&6 -else - -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -extern void foobar (char *); -int -main () -{ -char large_array[2048]; foobar (large_array); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO"; then : - -libc_undefs=`$NM -u conftest.o | - LC_ALL=C $AWK '$1 == "U" { print $2 | "sort -u"; next } { exit(1) }' \ - 2>&5` || { - as_fn_error $? "confusing output from $NM -u" "$LINENO" 5 -} -echo >&5 "libc_undefs='$libc_undefs'" -# On some architectures, there are architecture-specific undefined -# symbols (resolved by the linker), so filter out unknown symbols. -# This will fail to produce the correct result if the compiler -# defaults to -fstack-protector but this produces an undefined symbol -# other than __stack_chk_fail. However, compilers like that have not -# been encountered in practice. -libc_undefs=`echo "$libc_undefs" | egrep '^(foobar|__stack_chk_fail)$'` -case "$libc_undefs" in -foobar) libc_cv_predef_stack_protector=no ;; -'__stack_chk_fail -foobar') libc_cv_predef_stack_protector=yes ;; -*) as_fn_error $? "unexpected symbols in test: $libc_undefs" "$LINENO" 5 ;; -esac -else - as_fn_error $? "test compilation failed" "$LINENO" 5 -fi -rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext - -fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_predef_stack_protector" >&5 -$as_echo "$libc_cv_predef_stack_protector" >&6; } -libc_extra_cflags= -if test $libc_cv_predef_stack_protector = yes; then - libc_extra_cflags="$libc_extra_cflags -fno-stack-protector" -fi -libc_extra_cppflags= - # Some linkers on some architectures support __ehdr_start but with # bugs. Make sure usage of it does not create relocations in the # output (as the linker should resolve them all for us). @@ -6288,7 +6544,7 @@ old_CFLAGS="$CFLAGS" old_LDFLAGS="$LDFLAGS" old_LIBS="$LIBS" CFLAGS="$CFLAGS -fPIC" -LDFLAGS="$LDFLAGS -nostdlib -nostartfiles -shared" +LDFLAGS="$LDFLAGS -nostdlib -nostartfiles -shared $no_ssp" LIBS= cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6302,7 +6558,7 @@ long ehdr (void) { return __ehdr_start.val; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - if $READELF -r conftest | fgrep __ehdr_start >/dev/null; then + if $READELF -r conftest | grep -F __ehdr_start >/dev/null; then libc_cv_ehdr_start=broken else libc_cv_ehdr_start=yes @@ -6467,6 +6723,11 @@ if test x"$libc_cv_ld_gnu_indirect_function" = xyes; then fi +if test x"$libc_cv_gcc_indirect_function" = xyes; then + $as_echo "#define HAVE_GCC_IFUNC 1" >>confdefs.h + +fi + # This is far from the AC_ARG_ENABLE that sets it so that a sysdeps # configure fragment can override the value to prevent this AC_DEFINE. @@ -6517,23 +6778,43 @@ $as_echo "$libc_cv_pic_default" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fPIE is default" >&5 $as_echo_n "checking whether -fPIE is default... " >&6; } -if ${libc_cv_pie_default+:} false; then : +if ${libc_cv_cc_pie_default+:} false; then : $as_echo_n "(cached) " >&6 else - libc_cv_pie_default=yes + libc_cv_cc_pie_default=yes cat > conftest.c <<EOF #if defined __PIE__ || defined __pie__ || defined PIE || defined pie # error PIE is default. #endif EOF if eval "${CC-cc} -S conftest.c 2>&5 1>&5"; then - libc_cv_pie_default=no + libc_cv_cc_pie_default=no fi rm -f conftest.* fi -{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_pie_default" >&5 -$as_echo "$libc_cv_pie_default" >&6; } +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $libc_cv_cc_pie_default" >&5 +$as_echo "$libc_cv_cc_pie_default" >&6; } +libc_cv_pie_default=$libc_cv_cc_pie_default + + + +# Set the `multidir' variable by grabbing the variable from the compiler. +# We do it once and save the result in a generated makefile. +libc_cv_multidir=`${CC-cc} $CFLAGS $CPPFLAGS -print-multi-directory` + +if test "$static_pie" = yes; then + # The linker must support --no-dynamic-linker. + if test "$libc_cv_no_dynamic_linker" != yes; then + as_fn_error $? "linker support for --no-dynamic-linker needed" "$LINENO" 5 + fi + # Default to PIE. + libc_cv_pie_default=yes + $as_echo "#define ENABLE_STATIC_PIE 1" >>confdefs.h + +fi +config_vars="$config_vars +enable-static-pie = $static_pie" @@ -7117,7 +7398,7 @@ $config_headers Configuration commands: $config_commands -Report bugs to <http://sourceware.org/bugzilla/>. +Report bugs to <https://sourceware.org/bugzilla/>. GNU C Library home page: <http://www.gnu.org/software/glibc/>. General help using GNU software: <http://www.gnu.org/gethelp/>." |