diff options
author | Michał Górny <mgorny@gentoo.org> | 2024-08-06 08:27:14 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2024-08-06 10:29:02 +0200 |
commit | 69190f6268a2a6942e5a266a45e2b353cf617569 (patch) | |
tree | 0b742a66bb18398ba86b8ed446c58405ee323711 /eclass | |
parent | toolchain-funcs.eclass: Add tc-has-64bit-time_t (diff) | |
download | gentoo-69190f6268a2a6942e5a266a45e2b353cf617569.tar.gz gentoo-69190f6268a2a6942e5a266a45e2b353cf617569.tar.bz2 gentoo-69190f6268a2a6942e5a266a45e2b353cf617569.zip |
eclass/tests/toolchain-funcs.sh: Cover tc-has-64bit-time_t
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Closes: https://github.com/gentoo/gentoo/pull/37142
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'eclass')
-rwxr-xr-x | eclass/tests/toolchain-funcs.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/eclass/tests/toolchain-funcs.sh b/eclass/tests/toolchain-funcs.sh index 6bfb00ff6bcb..0d6745862148 100755 --- a/eclass/tests/toolchain-funcs.sh +++ b/eclass/tests/toolchain-funcs.sh @@ -220,6 +220,26 @@ if type -P gcc &>/dev/null; then CC=gcc CFLAGS=-flto tc-is-lto [[ $? -eq 0 ]] tend $? + + case $(gcc -dumpmachine) in + i*86*-gnu*|arm*-gnu*|powerpc-*-gnu) + tbegin "tc-has-64bit-time_t (_TIME_BITS=32)" + CC=gcc CFLAGS="-U_TIME_BITS -D_TIME_BITS=32" tc-has-64bit-time_t + [[ $? -eq 1 ]] + tend $? + + tbegin "tc-has-64bit-time_t (_TIME_BITS=64)" + CC=gcc CFLAGS="-U_FILE_OFFSET_BITS -U_TIME_BITS -D_FILE_OFFSET_BITS=64 -D_TIME_BITS=64" tc-has-64bit-time_t + [[ $? -eq 0 ]] + tend $? + ;; + *) + tbegin "tc-has-64bit-time_t" + CC=gcc tc-has-64bit-time_t + [[ $? -eq 0 ]] + tend $? + ;; + esac fi if type -P clang &>/dev/null; then |