commit: 69190f6268a2a6942e5a266a45e2b353cf617569 Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Tue Aug 6 06:27:14 2024 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Tue Aug 6 08:29:02 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=69190f62
eclass/tests/toolchain-funcs.sh: Cover tc-has-64bit-time_t Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> Closes: https://github.com/gentoo/gentoo/pull/37142 Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> eclass/tests/toolchain-funcs.sh | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) 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
