diff options
| author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-09-10 09:22:19 -0300 |
|---|---|---|
| committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-10-01 08:44:41 -0300 |
| commit | 4d8965f1304a205f7580fe23bb2d462828d1f8e5 (patch) | |
| tree | 2c192db93ee4c0d444f05156ef152a52a39aa3df /configure.ac | |
| parent | 3f1932ed2e6b643848ea7a42f9f15ed80552befb (diff) | |
| download | glibc-4d8965f1304a205f7580fe23bb2d462828d1f8e5.tar.xz glibc-4d8965f1304a205f7580fe23bb2d462828d1f8e5.zip | |
Disable _TIME_BITS if the compiler defaults to it
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>
Diffstat (limited to 'configure.ac')
| -rw-r--r-- | configure.ac | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 160c863416..d5a00461ff 100644 --- a/configure.ac +++ b/configure.ac @@ -1576,6 +1576,17 @@ AS_IF([test "$libc_cv_compiler_default_file_offset_bits" = yes], AC_SUBST(no_file_offset_bits_source) LIBC_CONFIG_VAR([no-file-offset-bits-source], [$no_file_offset_bits_source]) +dnl Check if compiler define _TIME_BITS by default +AC_PREPROC_IFELSE([AC_LANG_PROGRAM([[]], [[ +#ifndef _TIME_BITS +# error _TIME_BITS not defined +#endif]])], + [libc_cv_compiler_default_time_bits=yes], + [libc_cv_compiler_default_time_bits=no]) +AS_IF([test "$libc_cv_compiler_default_time_bits" = yes], + [no_time_bits_source="-U_TIME_BITS"]) +AC_SUBST(no_time_bits_source) +LIBC_CONFIG_VAR([no-time-bits-source], [$no_time_bits_source]) dnl Starting with binutils 2.35, GAS can attach multiple symbol versions dnl to one symbol (PR 23840). |
