- Package:
- src:libfixmath
- Source:
- src:libfixmath
- Submitter:
- John Paul Adrian Glaubitz
- Date:
- 2023-01-10 19:54:02 UTC
- Severity:
- normal
Hello! I just noticed that debian/rules adds the powerpc architecture to the UBSAN_ARCH arch list despite powerpc not supporting `__sync_val_compare_and_swap_8 [1]. This results in libfixmath trying to build the testsuite and consequently FTBFS [2]: [ 94%] Linking C executable tests_rn08 /usr/bin/cmake -E cmake_link_script CMakeFiles/tests_rn08.dir/link.txt --verbose=1 /usr/bin/cc -Wall -pedantic -Wextra -Werror=return-type -Wl,-z,relro -fsanitize=undefined CMakeFiles/tests_rn08.dir/tests/tests.c.o CMakeFiles/tests_rn08.dir/tests/tests_basic.c.o CMakeFiles/tests_rn08.dir/tests/tests_lerp.c.o CMakeFiles/tests_rn08.dir/tests/tests_macros.c.o CMakeFiles/tests_rn08.dir/tests/tests_sqrt.c.o CMakeFiles/tests_rn08.dir/tests/tests_str.c.o -o tests_rn08 liblibfixmath_rn08.a -lm -latomic /usr/bin/ld: /usr/lib/gcc/powerpc-linux-gnu/12/libubsan.so: undefined reference to `__sync_val_compare_and_swap_8' collect2: error: ld returned 1 exit status Could you please remove "powerpc" from the UBSAN_ARCH list? Thanks, Adrian
Hi, Am 10.01.23 um 20:30 schrieb John Paul Adrian Glaubitz: But libubsan.so exists, which was what was intended with this variable... Removing it there would effectively disabling building and running the tests... Regards, Rene
Hello! Yes, ubsan.so exists. But in some cases (i.e. some sanitizer checks) it requires __sync_val_compare_and_swap_8 which is not available on 32-bit PowerPC. However, __sync_val_compare_and_swap_8 is deprecated anyway and has been replaced with __atomic_compare_exchange(), so I assume that the ubsan version in gcc-12 is outdated. I think in LLVM, we actually replaced __sync_val_compare_and_swap with __atomic_ compare_exchange() at some point for this particular reasons. Adrian