aboutsummaryrefslogtreecommitdiff
path: root/aclocal.m4
AgeCommit message (Collapse)AuthorFilesLines
2024-12-22Use -finput-charset=ascii only if supportedH.J. Lu1-0/+29
Check if -finput-charset=ascii is supported before using it in check-installed-headers.sh. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2024-12-18Check if clang and clang++ are used to test glibcH.J. Lu1-0/+49
Set have-test-clang to yes if clang is used to test glibc. Set have-test-clangxx to yes if clang++ is used to test glibc. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2024-12-11Add TEST_CC and TEST_CXX supportH.J. Lu1-0/+83
Support testing glibc build with a different C compiler or a different C++ compiler with $ ../glibc-VERSION/configure TEST_CC="gcc-6.4.1" TEST_CXX="g++-6.4.1" 1. Add LIBC_TRY_CC_AND_TEST_CC_OPTION, LIBC_TRY_CC_AND_TEST_CC_COMMAND and LIBC_TRY_CC_AND_TEST_LINK to test both CC and TEST_CC. 2. Add check and xcheck targets to Makefile.in and override build compiler options with ones from TEST_CC and TEST_CXX. Tested on Fedora 41/x86-64: 1. Building with GCC 14.2.1 and testing with GCC 6.4.1 and GCC 11.2.1. 2. Building with GCC 15 and testing with GCC 6.4.1. Support for GCC versions older than GCC 6.2 may need to change the test sources. Other targets may need to update configure.ac under sysdeps and modify Makefile.in to override target build compiler options. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2024-06-17Convert to autoconf 2.72 (vanilla release, no distribution patches)Andreas K. Hüttel1-1/+1
As discussed at the patch review meeting Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> Reviewed-by: Simon Chopin <simon.chopin@canonical.com>
2023-07-17configure: Use autoconf 2.71Siddhesh Poyarekar1-1/+1
Bump autoconf requirement to 2.71 to allow regenerating configure on more recent distributions. autoconf 2.71 has been in Fedora since F36 and is the current version in Debian stable (bookworm). It appears to be current in Gentoo as well. All sysdeps configure and preconfigure scripts have also been regenerated; all changes are trivial transformations that do not affect functionality. Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2023-01-12configure: Move nm, objdump, and readelf to LIBC_PROG_BINUTILSAdhemerval Zanella1-0/+12
Allow the variables to be overriden or have the defaults come from the compiler currently in use. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2023-01-11configure: Allow user override LD, AR, OBJCOPY, and GPROFAdhemerval Zanella1-4/+12
The only way to override LD, AR, OBJCOPY, and GPROF is through --with-binutils (setting the environments variables on configure is overridden by LIBC_PROG_BINUTILS). The build-many-glibcs.py (bmg) glibcs option generates a working config, but not fully concise (some tools will be set from environment variable, while other will be set from $CC --print-prog-name). So remove the environment variable set to always use the "$CC --print-prog-name". Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2022-12-06configure: Remove AS checkAdhemerval Zanella1-1/+0
The assembler is not issued directly, but rather always through CC wrapper. The binutils version check if done with LD instead. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2022-12-06configure: Remove check if ld is GNUAdhemerval Zanella1-19/+13
Assume linker has gnu argument input style. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2022-12-06configure: Remove check if as is GNUAdhemerval Zanella1-6/+0
It is not used in any place. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2022-10-28Correctly determine libc.so 'OUTPUT_FORMAT' when cross-compiling.Ludovic Courtès1-2/+0
Commit 87d583c6e8cd0e49f64da76636ebeec033298b4d replaces the sed script with an "objdump -f" invocation to determine the 'OUTPUT_FORMAT' bit of the libc.so linker script. However, when cross-compiling, for example from x86_64-linux-gnu to aarch64-linux-gnu, "objdump -f" would report the wrong format ("elf64-little"). Conversely, "aarch64-linux-gnu-objdump -f" reports "elf64-littleaarch64" as expected. This patch changes 'configure.ac' to use AC_CHECK_TOOL rather than '$CC -print-prog-name=objdump' to determine the value of the OBJDUMP variable. That way, OBJDUMP is set to TRIPLET-objdump when cross-compiling for TRIPLET. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2022-06-05grep: egrep -> grep -E, fgrep -> grep -FSam James1-1/+1
Newer versions of GNU grep (after grep 3.7, not inclusive) will warn on 'egrep' and 'fgrep' invocations. Convert usages within the tree to their expanded non-aliased counterparts to avoid irritating warnings during ./configure and the test suite. Signed-off-by: Sam James <sam@gentoo.org> Reviewed-by: Fangrui Song <maskray@google.com>
2022-01-03Properly check linker option in LIBC_LINKER_FEATURE [BZ #28738]H.J. Lu1-1/+7
Update LIBC_LINKER_FEATURE to also check linker warning message since unknown linker -z option may be ignored by linker: $ touch x.c $ gcc -shared -Wl,-z,foobar x.c /usr/bin/ld: warning: -z foobar ignored $ echo $? 0 $ This fixes BZ #28738. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2021-10-29Fix LIBC_PROG_BINUTILS for -fuse-ld=lldAdhemerval Zanella1-1/+5
GCC does not print the correct linker when -fuse-ld=lld is used with the -print-prog-name=ld: $ gcc -v 2>&1 | tail -n 1 gcc version 11.2.0 (Ubuntu 11.2.0-7ubuntu2) $ gcc ld This is different than for gold: $ gcc -fuse-ld=gold -print-prog-name=ld ld.gold Using ld.lld as the static linker name prints the expected result. This is only required when -fuse-ld=lld is used, if lld is used as the 'ld' programs (through a symlink) LIBC_PROG_BINUTILS works as expected. Checked on x86_64-linux-gnu. Reviewed-by: Fangrui Song <maskray@google.com>
2021-10-25configure: Don't check LD -v --help for LIBC_LINKER_FEATUREFangrui Song1-11/+8
When LIBC_LINKER_FEATURE is used to check a linker option with the equal sign, it will likely fail because the LD -v --help output may look like `-z lam-report=[none|warning|error]` while the needle is something like `-z lam-report=warning`. The LD -v --help filter doesn't save much time, so just remove it.
2021-06-04configure: Replaced obsolete AC_TRY_COMPILENaohiro Tamura1-0/+1
This patch replaced obsolete AC_TRY_COMPILE to AC_COMPILE_IFELSE or AC_PREPROC_IFELSE. It has been confirmed that GNU 'autoconf' 2.69 suppressed obsolete warnings, updated the following files: - configure - sysdeps/mach/configure - sysdeps/mach/hurd/configure - sysdeps/s390/configure - sysdeps/unix/sysv/linux/configure and didn't change the following files: - sysdeps/ieee754/ldbl-opt/configure - sysdeps/unix/sysv/linux/powerpc/configure Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2018-01-25LIBC_SLIBDIR_RTLDDIR: substitute arguments in single quotesAndreas Schwab1-2/+2
The arguments of the LIBC_SLIBDIR_RTLDDIR macro are used both in unquoted and single quoted context, so that neither shell nor makefile variable references work. Consistently put them in single quotes so that they can refer to makefile variables.
2017-08-15gmon: Add test for basic mcount/gprof functionalityFlorian Weimer1-0/+2
2016-12-26Work even with compilers which enable -fstack-protector by default [BZ #7065]Nick Alcock1-3/+3
With all the machinery we just added, we can easily arrange to work even when the compiler passes in -fstack-protector automatically: all the necessary bits of glibc are always compiled with -fno-stack-protector now. So tear out the check in configure, and add appropriate calls to -fno-stack-protector in tests that need them (largely those that use -nostdlib), since we don't yet have a __stack_chk_fail that those tests can rely upon. (GCC often provides one, but we cannot rely on this, especially not when bootstrapping.) When stack protection is disabled, explicitly pass -fno-stack-protector to everything, to stop a compiler hacked to enable it from inserting calls to __stack_chk_fail via the PLT in every object file.
2015-11-27Rename localedir to complocaledir (bug 14259).Carlos O'Donell1-1/+1
In preparation to fix the --localedir configure argument we must move the existing conflicting definition of localedir to a more appropriate name. Given that all current internal uses of localedir relate to the compiled locales we rename to complocaledir.
2014-10-31Make aclocal.m4 comment mention updating install.texi for autoconf version.Joseph Myers1-1/+2
* aclocal.m4 (GLIBC_AUTOCONF_VERSION): Mention need to update install.texi in comment.
2014-09-29Require autoconf 2.69H.J. Lu1-1/+1
* aclocal.m4: Require autoconf 2.69. * configure: Regenerated. * sysdeps/aarch64/configure: Likewise. * sysdeps/alpha/configure: Likewise. * sysdeps/arm/armv7/configure: Likewise. * sysdeps/arm/configure: Likewise. * sysdeps/ia64/configure: Likewise. * sysdeps/mach/configure: Likewise. * sysdeps/mips/configure: Likewise. * sysdeps/s390/configure: Likewise. * sysdeps/unix/sysv/linux/mips/configure: Likewise. * sysdeps/unix/sysv/linux/powerpc/powerpc64/configure: Likewise. * sysdeps/alpha/configure.ac: Avoid empty lines at the end of file. * sysdeps/ia64/configure.ac: Likewise.
2014-07-17Refactor handling of /lib64 etc. cases, move out of sysdeps/gnu/configure.ac.Joseph Myers1-0/+18
This patch continues removing architecture-specific cases from non-architecture-specific files by moving the logic to use directories such as /lib64 out of sysdeps/gnu/configure.ac. A new macro LIBC_SLIBDIR_RTLDDIR is created that sysdeps configure scripts can use to declare the library directories to be used; the logic was previously duplicated in configure fragments for aarch64, mips and x32 as well as in sysdeps/gnu/configure.ac. This macro is used directly in sysdeps/gnu/configure.ac only to provide the /lib default (the logic saying that with --prefix=/usr shared libraries go in /lib not /usr/lib); the architecture cases formerly there are moved into various new or existing configure.ac files. The new macro is also used in the various architecture fragments that already had such logic. In the x32 there was previously a configure fragment, but it was a directly written one without a .ac file; now a .ac file is used there instead to generate configure. Tested x86_64 that the installed shared libraries, and the directory structure of the installation, are unchanged by this patch. There is an old bug report - bug 6441 - about library directories changing after reconfiguring. If this is still applicable - and I haven't attempted to confirm it or review the old patch pointed to in that bug - then this patch should reduce the number of places needing changing in any fix. * aclocal.m4 (LIBC_SLIBDIR_RTLDDIR): New macro. * sysdeps/gnu/configure.ac: Use LIBC_SLIBDIR_RTLDDIR. Remove cases for individual architectures. * sysdeps/gnu/configure: Regenerated. * sysdeps/unix/sysv/linux/aarch64/configure.ac: Use LIBC_SLIBDIR_RTLDDIR. * sysdeps/unix/sysv/linux/aarch64/configure: Regenerated. * sysdeps/unix/sysv/linux/mips/configure.ac: Use LIBC_SLIBDIR_RTLDDIR. * sysdeps/unix/sysv/linux/mips/configure: Regenerated. * sysdeps/unix/sysv/linux/powerpc/powerpc64/configure.ac: Use LIBC_SLIBDIR_RTLDDIR. * sysdeps/unix/sysv/linux/powerpc/powerpc64/configure: Regenerated. * sysdeps/unix/sysv/linux/s390/s390-64/configure.ac: New file. * sysdeps/unix/sysv/linux/s390/s390-64/configure: New generated file. * sysdeps/unix/sysv/linux/sparc/sparc64/configure.ac: New file. * sysdeps/unix/sysv/linux/sparc/sparc64/configure: New generated file. * sysdeps/unix/sysv/linux/x86_64/64/configure.ac: New file. * sysdeps/unix/sysv/linux/x86_64/64/configure: New generated file. * sysdeps/unix/sysv/linux/x86_64/x32/configure.ac: New file. * sysdeps/unix/sysv/linux/x86_64/x32/configure: Generate.
2013-10-30rename configure.in to configure.acMike Frysinger1-3/+3
Autoconf has been deprecating configure.in for quite a long time. Rename all our configure.in and preconfigure.in files to .ac. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2013-04-06i386: Fail at configure time for i386 builds.Carlos O'Donell1-0/+33
This change does two things: * Treats a target i386-* as if it were i686. * Fails configure if the user is generating code for i386. We no longer support i386 code-generation because the i386 lacks the atomic operations we need in glibc. You can still configure for i386-*, but you get i686 code. You can't build with --march=i386, --mtune=i386 or a compiler that defaults to i386 code-generation. I've added two i386 entries in the master todo list to discuss merging and renaming: http://sourceware.org/glibc/wiki/Development_Todo/Master#i386 The failure modes are fail-safe here. You compile for i386, get i686, and try to run on i386 and it fails. The configure log has a warning saying we elided to i686. There is no situation that I can see where we run into any serious problems. The patch makes the current state better in that we get less confused users and we build successfully in more default configurations. The next enhancement would be to add --march=i?86 as suggested in #c20 of BZ#10062 for any i?86-* builds, which would solve the problem of a 32-bit compiler that defaults to i386 code-gen and glibc configured for i686-* target. Which previously failed at build time, and now will fail at configure time (requires adding --march=i686). Updated NEWS with BZ #10060 and #10062. No regressions. --- 2013-04-06 Carlos O'Donell <carlos@redhat.com> [BZ #10060, #10062] * aclocal.m4 (LIBC_COMPILER_BUILTIN_INLINED): New macro. * sysdeps/i386/configure.in: Use LIBC_COMPILER_BUILTIN_INLINED and fail configure if __sync_val_compare_and_swap is not inlined. * sysdeps/i386/configure: Regenerate. * configure.in: Build for i686 when configured for i386. * configure: Regenerate. * README: Remove i386 reference.
2013-03-20Move system-specific settings out of toplevel configure.in and config.make.in.Joseph Myers1-0/+7
2012-11-21Properly check linker -z XXX supportH.J. Lu1-0/+28
2012-11-09Support --with-pkgversion and --with-bugurl.Joseph Myers1-0/+48
2012-11-02Require an exact Autoconf version.Roland McGrath1-0/+10
2012-10-09Add missing magic to GLIBC_PROVIDES.Roland McGrath1-0/+8
2012-03-21Use autoconf macro for testing compiler options with empty input.Joseph Myers1-0/+6
2012-03-16Use sysdeps/*/preconfigure fragments from main source tree.Roland McGrath1-0/+14
2012-03-08Fix .ctors/.dtors header configure test for bootstrapping.Joseph Myers1-0/+14
2012-01-08Remove last remnants of RANLIBUlrich Drepper1-1/+0
2011-07-02Explicitly remove .gnu.glibc-stub sections with objcopy when not usingRoland McGrath1-0/+2
linker script.
2011-02-15Remove use of ranlib.Ulrich Drepper1-12/+1
2009-09-15configure tweaks, support $libc_add_on_config_subdirsRoland McGrath1-0/+2
2004-07-02* aclocal.m4: Add provide for AC_CONFIG_AUX_DIR_DEFAULT.Roland McGrath1-0/+1
* Makeconfig ($(common-objpfx)shlib-versions.v.i): Move top-level $(..)shlib-versions file to last in deps list. This lets add-ons give more-specific matches that override defaults in the top-level file. * sysdeps/unix/sysv/linux/configure.in: If arch_minimum_kernel was already set, don't set it or libc_cv_gcc_unwind_find_fde. * sysdeps/unix/sysv/linux/configure: Regenerated.
2002-11-14* scripts/abilist.awk: New file.Roland McGrath1-0/+2
* Makefile (distribute): Add it. * Makerules ($(objpfx)%.dynsym, $(objpfx)%.symlist): New rules. (tests): Depend on .symlist file for each $(install-lib.so-versioned). [! subdir] (tests): Depend on libc.symlist. (generated): Add those files. * aclocal.m4 (LIBC_PROG_BINUTILS): Check for objdump, set OBJDUMP. * configure: Regenerated. * config.make.in (OBJDUMP): New variable, substituted by configure. * malloc/mcheck.c (struct hdr): New members `block' and `magic2'. (mallochook, reallochook): Set them up. (checkhdr): Check HDR->magic2 value. (freehook): Reset HDR->magic2. (memalignhook): New static function. (old_memalign_hook): New static variable. (mcheck, reallochook): Set __memalign_hook to memalignhook.
2002-10-18* sysdeps/unix/alpha/sysdep.h (INLINE_SYSCALL, INLINE_SYSCALL1)Roland McGrath1-0/+2
(inline_syscall_clobbers, inline_syscall0, inline_syscall1) (inline_syscall2, inline_syscall3, inline_syscall4, inline_syscall5) (inline_syscall6): Move these macros ... * sysdeps/unix/sysv/linux/alpha/sysdep.h: ... to here. * aclocal.m4 (GLIBC_PROVIDES): Add AC_PROVIDEs for _AS_PATH_SEPARATOR_PREPARE and _AS_TEST_PREPARE.
2002-10-18* aclocal.m4: Use just the bits from AS_INIT that are needed for theRoland McGrath1-3/+5
GLIBC_PROVIDES. Use plain comment instead of HEADER-COMMENT so that it's obvious when extra autoconf machinery is being dragged in.
2002-10-18* configure.in (MIG): Just AC_SUBST it here.Roland McGrath1-0/+2
* configure: Regenerated. * sysdeps/mach/configure.in (MIG): Do the AC_CHECK_TOOL here. Adding final - argument to all AC_CHECK_HEADER uses for .defs files. * sysdeps/mach/configure: Regenerated. * aclocal.m4 (GLIBC_PROVIDES): Add AC_PROVIDE([_AS_TR_SH_PREPARE]) and AC_PROVIDE([_AS_CR_PREPARE]).
2002-10-18* aclocal.m4 (GLIBC_PROVIDES): Add AC_PROVIDE([_AS_ECHO_N_PREPARE]).Roland McGrath1-1/+2
Remove AC_LANG(C) call, instead just define([_AC_LANG], [C]). * elf/dl-support.c: Move _dl_tls_* variables to ... * sysdeps/generic/libc-tls.c: ... here. * elf/dl-close.c (remove_slotinfo): Take new argument. If false, allow IDX to be one past the current last slotinfo entry. (_dl_close): Pass IMAP->l_init_called for that parameter.
2002-10-17Update.Ulrich Drepper1-42/+12
2002-10-07 Andreas Schwab <schwab@suse.de> * aclocal.m4: Fix for autoconf 2.53. * configure.in: Likewise. Require autoconf 2.53.
2002-09-292002-09-28 Roland McGrath <roland@redhat.com>Roland McGrath1-2/+4
* aclocal.m4 (LIBC_PROG_BINUTILS): Don't clobber $RANLIB with ranlib before we check it.
2001-06-11Update.Andreas Jaeger1-2/+2
2001-06-11 Andreas Jaeger <aj@suse.de> * sysdeps/ieee754/ldbl-128/e_coshl.c: New file. Contributed by Stephen L Moshier <moshier@mediaone.net>. * aclocal.m4: Quote AC_FD_MSG and AC_FD_CC. * sysdeps/powerpc/fpu/libm-test-ulps: Add ULPs for tanh (-0.7). * sysdeps/s390/fpu/libm-test-ulps: Likewise.
1999-05-29Update.Ulrich Drepper1-0/+1
1999-05-27 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * malloc/malloc.h: Properly handle future GCC versions. 1999-05-27 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * sysdeps/unix/sysv/linux/configure.in: Change version checks to use AC_EGREP_CPP. Change sed pattern to not use alternation. Fix text of error message. * aclocal.m4 (GLIBC_PROVIDES): Define AC_LANG to `C'.
1998-11-20Update.Ulrich Drepper1-0/+11
1998-11-20 Ulrich Drepper <drepper@cygnus.com> * aclocal.m4 (LIBC_PROG_BINUTILS): Also add AR and RANLIB using the same method. * configure.in: Don't define AR and RANLIB here. * inet/gethstbyad_r.c: Define NEED__RES_HCONV and POSTPROCESS for host name res_hconf code. * inet/gethstbynm_r.c: Likewise. * nss/getXXbyYY_r.c: Include resolv/res_hconf.h if NEED__RES_HCONF is defined. Call res_hconf_init if necessary. If POSTPROCESS is defined execute the code. * resolv/Makefile (routines): Add res_hconf. (headers): Add res_hconf.h. * resolv/res_hconf.c: Pretty print. * resolv/res_hconf.h: Likewise. 1998-11-20 Ulrich Drepper <drepper@cygnus.com> * sysdeps/generic/bits/byteswap.h: Fix typos in non-GCC definitions. Reported by Scott Bambrough <scottb@corelcomputer.com>. 1998-11-20 1998 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * math/libm-test.c: Raise some epsilons a bit. 1998-11-20 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * Makeconfig ($(common-objpfx)sysd-sorted): Fix portability problems. 1998-11-20 Ulrich Drepper <drepper@cygnus.com> * Makefile (distribute): Add scripts/gen-sorted.awk.
1998-10-31Update.Ulrich Drepper1-2/+3
1998-10-31 Ulrich Drepper <drepper@cygnus.com> * aclocal.m4 (LIBC_PROG_FOO_GNU): Name output file using -o to avoid ld test generating an unwanted file.
1998-04-07Update.Ulrich Drepper1-2/+2
1998-04-07 17:50 Zack Weinberg <zack@rabi.phys.columbia.edu> * glibcbug.in: Report version of gcc in use. Remove unused variable ENVIRONMENT. 1998-04-07 Gordon Matzigkeit <gord@profitpress.com> * aclocal.m4 (LIBC_PROG_BINUTILS): Use `-print-prog-name', not `-print-file-name' to find as and ld. 1998-04-07 Ulrich Drepper <drepper@cygnus.com> * sysdeps/posix/mkstemp.c (mkstemp): Correct return value in case template is wrong. Remove unused varaible `ignored'. 1998-04-07 Andreas Jaeger <aj@arthur.rhein-neckar.de> * libc.map: Export __libc_sa_len. * iconv/gconv_conf.c (MAXPATHLEN): Define correctly.