|
From: Paul F. <pj...@wa...> - 2026-03-13 20:36:17
|
Hi Florian On 2026-03-13 18:33, Florian Krohm wrote: > Greetings, > > I was attempting to build valgrind with clang on s390 and x86-64 and > am getting various failures in 'make check'. This is with clang 14.0.0 > which was released in 2022. Is there a min. version of clang that is > required? I mainly use LLVM 19 and 22 with FreeBSD 4.3 and 5.0. On macOS, with a much wider range of versions, it varies from Apple LLVM 10 on macOS 10.13 to 17 on macOS 26.3 (Apple uses a different numbering scheme, roughly add 2 for the equivalent upstream LLVM version). > If you're curious: > > s390 fails: > > xmas_tree.cpp:63:5: error: no matching function for call to 'operator > delete[]' > operator delete[](mem, badsize); > ^~~~~~~~~~~~~~~~~ That's a C++14 feature. clang++14 probably needs -fsized-deallocation. I'll add that shortly. > x86-64 fails: > ./memcheck/tests/amd64/fxsave-amd64.c et al. > /usr/bin/ld: fxsave_amd64-fxsave-amd64.o: relocation R_X86_64_32S > against symbol `vecZ' can not be used when making a PIE and /none/tests/amd64/cmpxchg.c and none/tests/x86/insn_sse.c > object; recompile with -fPIE clang defaults to building with PIE. Both of these are built with @FLAG_NO_PIE@ which should be -no-pie That looks like it is wrong. In my config.log I have configure:14805: clang-devel -c -no-pie -Werror conftest.c >&5 clang: error: argument unused during compilation: '-no-pie' [-Werror,-Wunused-command-line-argument] Same thing on macOS. If we do want no PIE then we should cpmpile with -fno-pie (with an f) and link with -no-pie (no f). We also seem to (mostly) use FLAG_NO_PIE with CFLAGS on amd64 but on LDFLAGS on x86. I'll do some tests with GCC to see if we really need this. The configure test fails with on my system with clang so it's doing nothing there. A+ Paul |