summaryrefslogtreecommitdiff
path: root/Makeconfig
AgeCommit message (Collapse)Author
2026-03-15resolv: Move libanl symbols to libc on hurd tooSamuel Thibault
2026-03-15rt: Move librt symbols to libc on hurd tooSamuel Thibault
2026-03-13configure: Remove extra ')' from b4c110022cAdhemerval Zanella
2026-03-13configure: Fix bootstrap build after 570c46d36b (BZ 33985)Adhemerval Zanella
The 570c46d36b make libgcc_s to be defined for have-cc-with-libunwind=noi (default for gcc builds) without taking into consideration that the compiler can link against -lgcc_s (defined by have-libgcc_s). Checked with a build-many-glibc.py for x86_64-linux-gnu.
2026-03-12configure: Repurpose have-cc-with-libunwind for clang supportAdhemerval Zanella
The `have-cc-with-libunwind` check (and its corresponding macro HAVE_CC_WITH_LIBUNWIND) was historically specific to IA64, intended to supplement libgcc with libunwind. Since this logic is unused in current GCC configurations, this patch repurposes it to support clang-based toolchains that utilize LLVM's libunwind instead of libgcc_s. The configure script now detects if the compiler natively supports unwinding via `-lunwind`. Additionally, when this mode is enabled, `-lclang_rt.builtins` is explicitly added to the `libgcc_eh` definition. This is necessary because `links-dso-program` otherwise fails to link due to a missing `__gcc_personality_v0` symbol. It appears that clang does not automatically link the builtins providing this personality routine when `rlink-path` is actively used during the build. Reviewed-by: Sam James <sam@gentoo.org>
2026-03-12configure: Parametrize runtime libraries to support compiler-rtAdhemerval Zanella
Historically, the build system has hardcoded references to `-lgcc` and `-lgcc_eh`, explicitly assuming the use of the GCC runtime. This prevents building glibc with alternative toolchains, specifically clang configured with `--rtlib=compiler-rt`, where these libraries are replaced by `libclang_rt.builtins`. This patch introduces a mechanism to dynamically detect the compiler's underlying runtime library. The logic works as follows: 1. It queries the compiler using `-print-libgcc-file-name`. 2. It parses the output path to determine if `libgcc` or `compiler-rt` is in use. 3. Based on this detection, it parametrizes the build variables for the static runtime and exception handling libraries (replacing hardcoded `-lgcc` and `-lgcc_eh`). This ensures that the build system correctly links against the active compiler runtime—whether it is the traditional libgcc or LLVM's compiler-rt—without requiring manual overrides. Reviewed-by: Sam James <sam@gentoo.org>
2026-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert
2025-10-20Build glibc with -ftrapping-mathAdhemerval Zanella
GCC enables it by default, clang in the other hand sets -fno-trapping-math. This is required to fix some math and stdlib tests that explicit raises floating point exceptions: math/test-double-canonicalize.out testing double (without inline functions) Failure: canonicalize (max_value): Exception "Overflow" set Failure: canonicalize (max_value): Exception "Inexact" set Failure: canonicalize (-max_value): Exception "Overflow" set Failure: canonicalize (-max_value): Exception "Inexact" set Failure: canonicalize_downward (max_value): Exception "Overflow" set Failure: canonicalize_downward (max_value): Exception "Inexact" set Failure: canonicalize_downward (-max_value): Exception "Overflow" set Failure: canonicalize_downward (-max_value): Exception "Inexact" set Failure: canonicalize_towardzero (max_value): Exception "Overflow" set Failure: canonicalize_towardzero (max_value): Exception "Inexact" set Failure: canonicalize_towardzero (-max_value): Exception "Overflow" set Failure: canonicalize_towardzero (-max_value): Exception "Inexact" set Failure: canonicalize_upward (max_value): Exception "Overflow" set Failure: canonicalize_upward (max_value): Exception "Inexact" set Failure: canonicalize_upward (-max_value): Exception "Overflow" set Failure: canonicalize_upward (-max_value): Exception "Inexact" set test-float-catanh.out testing float (without inline functions) Failure: Real part of: catanh (-0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (-0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh (-0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (-0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh (-0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (-0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh (0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh (0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh (0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (-0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (-0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_downward (-0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (-0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_downward (-0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (-0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_downward (0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_downward (0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_downward (0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (-0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (-0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (-0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (-0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (-0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (-0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_towardzero (0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (-0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (-0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_upward (-0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (-0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_upward (-0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (-0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (0x1.000002p+0 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (0x1.000002p+0 - 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_upward (0x1.000002p+0 + 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (0x1.000002p+0 + 0x8p-152 i): Exception "Underflow" set Failure: Real part of: catanh_upward (0xf.fffffp-4 - 0x4p-128 i): Exception "Underflow" set Failure: Real part of: catanh_upward (0xf.fffffp-4 + 0x4p-128 i): Exception "Underflow" set Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2025-08-07Filter machine compiler flags into Assembler FlagsSachin Monga
Assembler files may want or need to test for predefined macros which are set via -m* compiler options, so ensure all -m* options in CFLAGS are passed to ASFLAGS. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2025-07-22Makeconfig: The hash character # confuses old make, use $(dir instead of sedAndreas K. Hüttel
Up to Make 4.2, # is treated as the start of a comment even in function invocations. This leads to a syntax error. Fixed in Make 4.3, but we still support versions back to 4.0 at the moment. Tested on Gentoo (x86-64) and Debian (loongarch64) Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> Reviewed-by: Collin Funk <collin.funk1@gmail.com>
2025-07-14configure: Add --enable-sframe optionClaudiu Zissulescu
Enable SFrame stack track information. The --enable-sframe option allows the glibc build to compile with SFrame stack track information. Thus, enabling glibc's backtrace to work within glibc. Signed-off-by: Claudiu Zissulescu <claudiu.zissulescu-ianculescu@oracle.com> Reviewed-by: DJ Delorie <dj@redhat.com> Reviewed-by: Sam James <sam@gentoo.org>
2025-07-09Makeconfig: Add libgcc directory to rtld-prefix search pathAndreas K. Hüttel
* This needs to be done twice, for test runs with and without --enable-hardcoded-path-in-tests * Also, we need to query the used $(CC) for the library location. * The container tests run ldd and dump the list of needed libraries, then copy these into the container. * Without this patch, ldd may not find libgcc_s.so, resulting in"not found" output and no copying of the library. * With this patch, the library is picked up independent of its location (as long as the proper directory is provided) and copied into the testroot. * This does not mean yet that ld.so in the testroot actually finds it. Signed-off-by: Andreas K. Hüttel <dilfridge@gentoo.org> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-05-27Move C warning flags from +gccwarn to +gccwarn-cFlorian Weimer
This avoids warnings about these options during the C++ header inclusion tests. Reviewed-by: Sam James <sam@gentoo.org>
2025-05-27Turn on -Wmissing-parameter-name by default if availableFlorian Weimer
This flags another hazard for backporting changes to earlier branches. Reviewed-by: Sam James <sam@gentoo.org>
2025-05-26Turn on -Wfree-labels by default if availableFlorian Weimer
This flags a hazard for backporting changes to earlier branches. Reviewed-by: Sam James <sam@gentoo.org>
2025-03-21Makeconfig: Support $(+nolink-deps) in link flagsFlorian Weimer
This allows adding dependencies to rules, but not linking against them. This is more or less a reimplementation of .EXTRA_PREREQS feature from GNU make 4.3. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-03-21debug: Improve '%n' fortify detection (BZ 30932)Adhemerval Zanella
The 7bb8045ec0 path made the '%n' fortify check ignore EMFILE errors while trying to open /proc/self/maps, and this added a security issue where EMFILE can be attacker-controlled thus making it ineffective for some cases. The EMFILE failure is reinstated but with a different error message. Also, to improve the false positive of the hardening for the cases where no new files can be opened, the _dl_readonly_area now uses _dl_find_object to check if the memory area is within a writable ELF segment. The procfs method is still used as fallback. Checked on x86_64-linux-gnu and i686-linux-gnu. Reviewed-by: Arjun Shankar <arjun@redhat.com>
2025-02-21aarch64: Add GCS tests for dlopenYury Khrustalev
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2025-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert
2024-12-21Don't use glibc <tgmath.h> when testing with ClangH.J. Lu
Clang has its own <tgmath.h> and doesn't use <tgmath.h> from glibc. Pass "-I." to compiler only if $($(<F)-no-include-dot) are undefined. Define it to yes for tgmath tests when testing with Clang. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: Sam James <sam@gentoo.org>
2024-12-17Remove duplicated BUILD_CC in MakeconfigH.J. Lu
Remove the second ifndef BUILD_CC BUILD_CC = $(CC) endif in Makeconfig. Signed-off-by: H.J. Lu <hjl.tools@gmail.com> Reviewed-by: DJ Delorie <dj@redhat.com>
2024-10-01Disable _TIME_BITS if the compiler defaults to itAdhemerval Zanella
Even though building glibc with 64 bit time_t flags is not supported, and the usual way is to patch the build system to avoid it; some systems do enable it by default, and it increases the requirements to build glibc in such cases (it also does not help newcomers when trying to build glibc). The conform namespace and linknamespace tests also do not expect that flag to be set by default, so disable it as well. Checked with a build/check for major ABI and some (i386, arm, mipsel, hppa) with a toolchain that has LFS flags by default. Reviewed-by: DJ Delorie <dj@redhat.com>
2024-10-01Disable _FILE_OFFSET_BITS if the compiler defaults to itAdhemerval Zanella
Even though building glibc with LFS flags is not supported, and the the usual way is to patch the build system to avoid it [1]; some system do enable it by default, and it increases the requirements to build glibc in such cases (it also does not help newcomers when trying to build glibc). The conform namespace and linknamespace tests also do not expect that flag to be set by default, so disable it as well. Checked with a build/check for major ABI and some (i386, arm, mipsel, hppa) with a toolchain that has LFS flags by default. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=31624 Reviewed-by: DJ Delorie <dj@redhat.com>
2024-08-09Turn on -Wimplicit-fallthrough by default if availableFlorian Weimer
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2024-06-12tunables: sort tunables list (BZ 30027)DJ Delorie
Sort tunables list at the time it's generated. Note: adding new tunables will cause other tunable IDs to change, but that was the case before anyway. POSIX does not guarantee the order of "foo in bar" AWK operators, so the order was indeterminate before anyway. Even depending on the order to be the same across multiple calls, such as in this script, is undefined, so sorting the list resolves that also. Note that sorting is not dependent on the user's locale.
2024-05-21math: Add support for auto static math testsAdhemerval Zanella
It basically copy the already in place rules for dynamic tests for auto-generated math functions for all support types. To avoid the need to duplicate .inc files, a .SECONDEXPANSION rules is adeed for the gen-libm-test.py generation. New tests are added on the new rules 'libm-test-funcs-auto-static', 'libm-test-funcs-noauto-static', and 'libm-test-funcs-narrow-static'; similar to the non-static counterparts. To avoid add extra build and disk requirement, the new math static tests are only enable with a new define 'build-math-static-tests'. Reviewed-by: H.J. Lu <hjl.tools@gmail.com>
2024-05-21Compile libmvec with -fno-math-errnoJoe Ramsay
Rounding intrinsics may not be inlined without -fno-math-errno. libmvec is free to do what it likes with errno, so disable it for better performance. Tested with no regression on aarch64 and x86_64. Reviewed-by: Szabolcs Nagy <szabolcs.nagy@arm.com>
2024-05-09Force DT_RPATH for --enable-hardcoded-path-in-testsH.J. Lu
On Fedora 40/x86-64, linker enables --enable-new-dtags by default which generates DT_RUNPATH instead of DT_RPATH. Unlike DT_RPATH, DT_RUNPATH only applies to DT_NEEDED entries in the executable and doesn't applies to DT_NEEDED entries in shared libraries which are loaded via DT_NEEDED entries in the executable. Some glibc tests have libstdc++.so.6 in DT_NEEDED, which has libm.so.6 in DT_NEEDED. When DT_RUNPATH is generated, /lib64/libm.so.6 is loaded for such tests. If the newly built glibc is older than glibc 2.36, these tests fail with assert/tst-assert-c++: /export/build/gnu/tools-build/glibc-gitlab-release/build-x86_64-linux/libc.so.6: version `GLIBC_2.36' not found (required by /lib64/libm.so.6) assert/tst-assert-c++: /export/build/gnu/tools-build/glibc-gitlab-release/build-x86_64-linux/libc.so.6: version `GLIBC_ABI_DT_RELR' not found (required by /lib64/libm.so.6) Pass -Wl,--disable-new-dtags to linker when building glibc tests with --enable-hardcoded-path-in-tests. This fixes BZ #31719. Signed-off-by: H.J. Lu <hjl.tools@gmail.com>
2024-05-06Add crt1-2.0.o for glibc 2.0 compatibility testsH.J. Lu
Starting from glibc 2.1, crt1.o contains _IO_stdin_used which is checked by _IO_check_libio to provide binary compatibility for glibc 2.0. Add crt1-2.0.o for tests against glibc 2.0. Define tests-2.0 for glibc 2.0 compatibility tests. Add and update glibc 2.0 compatibility tests for stderr, matherr and pthread_kill. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2024-04-08Use crtbeginT.o and crtend.o for non-PIE static executablesH.J. Lu
When static PIE is enabled by default, we shouldn't use crtbeginS.o and crtendS.o for non-PIE static executables. Check $($(@F)-no-pie) to use crtbeginT.o and crtend.o to create non-PIE static executables. Reviewed-by: Sunil K Pandey <skpgkp2@gmail.com>
2024-01-01Update copyright dates with scripts/update-copyrightsPaul Eggert
2023-10-30crypt: Remove libcrypt supportAdhemerval Zanella
All the crypt related functions, cryptographic algorithms, and make requirements are removed, with only the exception of md5 implementation which is moved to locale folder since it is required by localedef for integrity protection (libc's locale-reading code does not check these, but localedef does generate them). Besides thec code itself, both internal documentation and the manual is also adjusted. This allows to remove both --enable-crypt and --enable-nss-crypt configure options. Checked with a build for all affected ABIs. Co-authored-by: Zack Weinberg <zack@owlfolio.org> Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2023-10-24Remove 'shadow' and merge into 'nss'Arjun Shankar
The majority of shadow routines are entry points for nss functionality. This commit removes the 'shadow' subdirectory and moves all functionality and tests to 'nss'. References to shadow/ are accordingly changed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2023-10-24Remove 'pwd' and merge into 'nss'Arjun Shankar
The majority of pwd routines are entry points for nss functionality. This commit removes the 'pwd' subdirectory and moves all functionality and tests to 'nss'. References to pwd/ are accordingly changed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2023-10-24Remove 'gshadow' and merge into 'nss'Arjun Shankar
The majority of gshadow routines are entry points for nss functionality. This commit removes the 'gshadow' subdirectory and moves all functionality and tests to 'nss'. References to gshadow/ are accordingly changed. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2023-10-24Remove 'grp' and merge into 'nss' and 'posix'Arjun Shankar
The majority of grp routines are entry points for nss functionality. This commit removes the 'grp' subdirectory and moves all nss-relevant functionality and all tests to 'nss', and the 'setgroups' stub into 'posix' (alongside the 'getgroups' stub). References to grp/ are accordingly changed. In addition, compat-initgroups.c, a fallback implementation of initgroups is renamed to initgroups-fallback.c so that the build system does not confuse it for nss_compat/compat-initgroups.c. Build time improves very slightly; e.g. down from an average of 45.5s to 44.5s on an 8-thread mobile x86_64 CPU. Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
2023-08-15configure: Add -Wall again to the default CFLAGSFlorian Weimer
Commit 78ceef25d64efeeb6067d1cb282a00466e637e2a ("configure: Remove --enable-all-warnings option") removed it due to a missing +. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2023-08-01configure: Remove --enable-all-warnings optionAdhemerval Zanella Netto
The option is not activelly tested and has bitrotten, to fix it would require a lot of work and multiple fixes. A better option would to evaluate each option and enable the warning if it makes sense. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2023-07-05Allow glibc to be built with _FORTIFY_SOURCEFrédéric Bérat
Add --enable-fortify-source option. It is now possible to enable fortification through a configure option. The level may be given as parameter, if none is provided, the configure script will determine what is the highest level possible that can be set considering GCC built-ins availability and set it. If level is explicitly set to 3, configure checks if the compiler supports the built-in function necessary for it or raise an error if it isn't. If the configure option isn't explicitly enabled, it _FORTIFY_SOURCE is forcibly undefined (and therefore disabled). The result of the configure checks are new variables, ${fortify_source} and ${no_fortify_source} that can be used to appropriately populate CFLAGS. A dedicated patch will follow to make use of this variable in Makefiles when necessary. Updated NEWS and INSTALL. Adding dedicated x86_64 variant that enables the configuration. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2023-03-29Remove --enable-tunables configure optionAdhemerval Zanella Netto
And make always supported. The configure option was added on glibc 2.25 and some features require it (such as hwcap mask, huge pages support, and lock elisition tuning). It also simplifies the build permutations. Changes from v1: * Remove glibc.rtld.dynamic_sort changes, it is orthogonal and needs more discussion. * Cleanup more code. Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2023-01-06Update copyright dates with scripts/update-copyrightsJoseph Myers
2022-12-09nis: Build libnsl with 64 bit time_tAdhemerval Zanella Netto
And remove the usage of glibc reserved names. Reviewed-by: DJ Delorie <dj@redhat.com>
2022-10-26Remove lingering libSegfault Makefile entriesAdhemerval Zanella
The library was removed by 65ccd641ba.
2022-09-13Makerules: fix MAKEFLAGS assignment for upcoming make-4.4 [BZ# 29564]Sergei Trofimovich
make-4.4 will add long flags to MAKEFLAGS variable: * WARNING: Backward-incompatibility! Previously only simple (one-letter) options were added to the MAKEFLAGS variable that was visible while parsing makefiles. Now, all options are available in MAKEFLAGS. This causes locale builds to fail when long options are used: $ make --shuffle ... make -C localedata install-locales make: invalid shuffle mode: '1662724426r' The change fixes it by passing eash option via whitespace and dashes. That way option is appended to both single-word form and whitespace separated form. While at it fixed --silent mode detection in $(MAKEFLAGS) by filtering out --long-options. Otherwise options like --shuffle flag enable silent mode unintentionally. $(silent-make) variable consolidates the checks. Resolves: BZ# 29564 CC: Paul Smith <psmith@gnu.org> CC: Siddhesh Poyarekar <siddhesh@gotplt.org> Signed-off-by: Sergei Trofimovich <slyich@gmail.com> Reviewed-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
2022-08-29Makeconfig: Set pie-ccflag to -fPIE by default [BZ# 29514]Richard Henderson
We should default to the larger code model, in order to support larger applications built with -static -pie. This should be consistent with pic-ccflag, which defaults to -fPIC. Remove the now redundant override from sysdeps/sparc/Makefile. Note that -fno-pie and -fno-PIE have the same effect. Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
2022-08-04Remove ldd libc4 supportAdhemerval Zanella
The older libc versions are obsolete for over twenty years now.
2022-05-18Enable DT_RELR in glibc shared libraries and PIEs automaticallyH.J. Lu
Enable DT_RELR in glibc shared libraries and position independent executables (PIE) automatically if linker supports -z pack-relative-relocs. Reviewed-by: Florian Weimer <fweimer@redhat.com>
2022-05-13stdio: Remove the usage of $(fno-unit-at-a-time) for errlist.cAdhemerval Zanella
The errlist.c is built with -fno-toplevel-reorder to avoid compiler to reorder the compat assembly directives due an assembler issue [1] (fixed on 2.39). This patch removes the compiler flags by split the compat symbol generation in two phases. First the _sys_errlist_internal internal without any compat symbol directive is preprocessed to generate an assembly source code. This generate assembly is then used as input on a platform agnostic errlist-data.S which then creates the compat definitions. This prevents compiler to move any compat directive prior the _sys_errlist_internal definition itself. Checked on a make check run-built-tests=no on all affected ABIs. [1] https://sourceware.org/bugzilla/show_bug.cgi?id=29012
2022-04-29Do not use --hash-style=both for building glibc shared objectsFlorian Weimer
The comment indicates that --hash-style=both was used to maintain compatibility with static dlopen, but we had many internal ABI changes since then, so this compatiblity does not add value anymore. Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2022-04-04Remove -z combreloc and HAVE_Z_COMBRELOCFangrui Song
-z combreloc has been the default regadless of the architecture since binutils commit f4d733664aabd7bd78c82895e030ec9779a92809 (2002). The configure check added in commit fdde83499a05 (2001) has long been unneeded. We can therefore treat HAVE_Z_COMBRELOC as always 1 and delete dead code paths in dl-machine.h files (many were copied from commit a711b01d34ca and ee0cb67ec238). Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>