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 | |
parent | 3f1932ed2e6b643848ea7a42f9f15ed80552befb (diff) | |
download | glibc-4d8965f1304a205f7580fe23bb2d462828d1f8e5.zip glibc-4d8965f1304a205f7580fe23bb2d462828d1f8e5.tar.gz glibc-4d8965f1304a205f7580fe23bb2d462828d1f8e5.tar.bz2 |
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')
-rwxr-xr-x | configure | 30 |
1 files changed, 30 insertions, 0 deletions
@@ -635,6 +635,7 @@ libc_cv_gcc_unwind_find_fde libc_extra_cppflags libc_extra_cflags libc_cv_cxx_thread_local +no_time_bits_source no_file_offset_bits_source fortify_source no_fortify_source @@ -7815,6 +7816,35 @@ fi config_vars="$config_vars no-file-offset-bits-source = $no_file_offset_bits_source" +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ + +int +main (void) +{ + +#ifndef _TIME_BITS +# error _TIME_BITS not defined +#endif + ; + return 0; +} +_ACEOF +if ac_fn_c_try_cpp "$LINENO" +then : + libc_cv_compiler_default_time_bits=yes +else case e in #( + e) libc_cv_compiler_default_time_bits=no ;; +esac +fi +rm -f conftest.err conftest.i conftest.$ac_ext +if test "$libc_cv_compiler_default_time_bits" = yes +then : + no_time_bits_source="-U_TIME_BITS" +fi + +config_vars="$config_vars +no-time-bits-source = $no_time_bits_source" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the assembler requires one version per symbol" >&5 printf %s "checking whether the assembler requires one version per symbol... " >&6; } |