[PATCH] D136044: [compiler-rt][builtins] Skip building (b)float16 support on i386-freebsd
Dimitry Andric via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 23 10:11:07 PST 2023
dim added a comment.
Ugh, this is really a messy situation. `COMPILER_RT_HAS_FLOAT16` (as a CMake feature) is also used in `compiler-rt/test/builtins/CMakeLists.txt`, where it is unconditionally used for each arch. I received some failures in buildbots, e.g.:
- https://lab.llvm.org/buildbot/#/builders/197/builds/3839
- https://lab.llvm.org/buildbot/#/builders/179/builds/5395
- https://lab.llvm.org/buildbot/#/builders/178/builds/3783
- https://lab.llvm.org/buildbot/#/builders/185/builds/2856
And these fail either with something similar to:
******************** TEST 'Builtins-aarch64-linux :: trunctfhf2_test.c' FAILED ********************
Script:
--
: 'RUN: at line 1'; /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/./bin/clang -gline-tables-only -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -DCOMPILER_RT_HAS_FLOAT16 -fno-builtin -I /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/compiler-rt/lib/builtins -nodefaultlibs /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/llvm/compiler-rt/test/builtins/Unit/trunctfhf2_test.c /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/./lib/clang/16/lib/aarch64-unknown-linux-gnu/libclang_rt.builtins.a -lc -lm -o /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/projects/compiler-rt/test/builtins/Unit/AARCH64LinuxConfig/Output/trunctfhf2_test.c.tmp && /home/tcwg-buildbot/worker/clang-aarch64-sve-vla/stage1/projects/compiler-rt/test/builtins/Unit/AARCH64LinuxConfig/Output/trunctfhf2_test.c.tmp
--
Exit Code: 1
Command Output (stderr):
--
/usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x25
/tmp/lit-tmp-o2gvd3a7/trunctfhf2_test-59b745.o: in function `test__trunctfhf2':
trunctfhf2_test.c:(.text+0x18): undefined reference to `__trunctfhf2'
clang-16: error: linker command failed with exit code 1 (use -v to see invocation)
--
********************
or with an unexpected value:
******************** TEST 'Builtins-armhf-linux :: truncdfhf2_test.c' FAILED ********************
Script:
--
: 'RUN: at line 1'; C:/buildbot/as-builder-1/x-armv7l/build/./bin/clang.exe -gline-tables-only -gcodeview -gcolumn-info -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET -DCOMPILER_RT_HAS_FLOAT16 -fno-builtin -I C:/buildbot/as-builder-1/x-armv7l/llvm-project/compiler-rt\lib\builtins -nodefaultlibs C:\buildbot\as-builder-1\x-armv7l\llvm-project\compiler-rt\test\builtins\Unit\truncdfhf2_test.c C:/buildbot/as-builder-1/x-armv7l/build/./lib/clang/16/lib/armv7-unknown-linux-gnueabihf\libclang_rt.builtins.a -lc -lm -o C:\buildbot\as-builder-1\x-armv7l\build\runtimes\runtimes-armv7-unknown-linux-gnueabihf-bins\compiler-rt\test\builtins\Unit\ARMHFLinuxConfig\Output\truncdfhf2_test.c.tmp && "C:/Python310/python.exe" "C:/buildbot/as-builder-1/x-armv7l/llvm-project/llvm/utils/remote-exec.py" --host=ubuntu at jetson6.lab.llvm.org C:\buildbot\as-builder-1\x-armv7l\build\runtimes\runtimes-armv7-unknown-linux-gnueabihf-bins\compiler-rt\test\builtins\Unit\ARMHFLinuxConfig\Output\truncdfhf2_test.c.tmp
--
Exit Code: 1
Command Output (stdout):
--
$ ":" "RUN: at line 1"
$ "C:/buildbot/as-builder-1/x-armv7l/build/./bin/clang.exe" "-gline-tables-only" "-gcodeview" "-gcolumn-info" "-Wthread-safety" "-Wthread-safety-reference" "-Wthread-safety-beta" "-fomit-frame-pointer" "-DCOMPILER_RT_ARMHF_TARGET" "-DCOMPILER_RT_HAS_FLOAT16" "-fno-builtin" "-I" "C:/buildbot/as-builder-1/x-armv7l/llvm-project/compiler-rt\lib\builtins" "-nodefaultlibs" "C:\buildbot\as-builder-1\x-armv7l\llvm-project\compiler-rt\test\builtins\Unit\truncdfhf2_test.c" "C:/buildbot/as-builder-1/x-armv7l/build/./lib/clang/16/lib/armv7-unknown-linux-gnueabihf\libclang_rt.builtins.a" "-lc" "-lm" "-o" "C:\buildbot\as-builder-1\x-armv7l\build\runtimes\runtimes-armv7-unknown-linux-gnueabihf-bins\compiler-rt\test\builtins\Unit\ARMHFLinuxConfig\Output\truncdfhf2_test.c.tmp"
$ "C:/Python310/python.exe" "C:/buildbot/as-builder-1/x-armv7l/llvm-project/llvm/utils/remote-exec.py" "--host=ubuntu at jetson6.lab.llvm.org" "C:\buildbot\as-builder-1\x-armv7l\build\runtimes\runtimes-armv7-unknown-linux-gnueabihf-bins\compiler-rt\test\builtins\Unit\ARMHFLinuxConfig\Output\truncdfhf2_test.c.tmp"
# command output:
error in test__truncdfhf2(nan) = 0000, expected 0x7e00
error: command failed with exit status: 1
--
********************
Unfortunately I cannot reproduce them. I tried with a Ubuntu 20.04 on aarch64 VM, but it succeeds with all tests. I have no idea what is different in the buildbot configuration.
If anybody has any clue about this, please let me know. Otherwise I'll probably put yet another kludge on top of the existing kludge, to avoid changing behavior for any platform other than FreeBSD.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D136044/new/
https://reviews.llvm.org/D136044
More information about the llvm-commits
mailing list