From: Paul F. <pj...@wa...> - 2025-05-07 19:58:25
|
On 07/05/2025 18:55, Florian Krohm wrote: > Greetings. > > I noticed that the presence of -fno-builtin suppresses -Wformat warnings. > First I thought this to be a GCC bug but it is not. Strange. I don't see any relationship between the two. > -fno-builtin was added to Makefile.all.am in e8ce3f7abb mentioning > explicitly this to be needed for an LLVM workaround. The attached > patch moves this option to the COMPILER_IS_CLANG section and fixes the > fallout. > > AM_CFLAGS_PSO_BASE is not being changed because doing so causes > memcheck/tests/wcpncpy and drd/tests/sem_open_traced to fail. > > Regtested on x86_64-linux-gnu and s390x-ibm-linux-gnu with no failures. > > OK ? No. On openSUSE Leap 15.6 amd64 with GCC 14.2 I get link errors. We would need to provide a 'strlen' implementation at least for amd64 Linux. Here are the errors: ../coregrind/link_tool_exe_linux 0x58000000 gcc-14 -o memcheck-amd64-linux -m64 -O2 -g -Wall -Wmissing-prototypes -Wshadow -Wpointer-arith -Wstrict-prototypes -Wmissing-declarations -Wno-unused-result -Wcast-align -Wcast-qual -Wwrite-strings -Wempty-body -Wformat -Wformat-signedness -Wformat-security -Wignored-qualifiers -Wmissing-parameter-type -Wlogical-op -Wenum-conversion -Wimplicit-fallthrough=2 -Wold-style-declaration -finline-functions -fno-stack-protector -fno-strict-aliasing -fomit-frame-pointer -O2 -static -nodefaultlibs -nostartfiles -u _start -m64 memcheck_amd64_linux-mc_leakcheck.o memcheck_amd64_linux-mc_malloc_wrappers.o memcheck_amd64_linux-mc_main.o memcheck_amd64_linux-mc_main_asm.o memcheck_amd64_linux-mc_translate.o memcheck_amd64_linux-mc_machine.o memcheck_amd64_linux-mc_errors.o ../coregrind/libcoregrind-amd64-linux.a ../VEX/libvex-amd64-linux.a -lgcc ../coregrind/libgcc-sup-amd64-linux.a /usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: ../coregrind/libcoregrind-amd64-linux.a(libcoregrind_amd64_linux_a-m_libcbase.o): in function `vgPlain_strlen': /home/paulf/scratch/valgrind/coregrind/m_libcbase.c:263:(.text+0xc8e): undefined reference to `strlen' /usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: /home/paulf/scratch/valgrind/coregrind/m_libcbase.c:263:(.text+0x106b): undefined reference to `strlen' /usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: /home/paulf/scratch/valgrind/coregrind/m_libcbase.c:263:(.text+0x10db): undefined reference to `strlen' /usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: /home/paulf/scratch/valgrind/coregrind/m_libcbase.c:263:(.text+0x1175): undefined reference to `strlen' /usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: /home/paulf/scratch/valgrind/coregrind/m_libcbase.c:263:(.text+0x13fd): undefined reference to `strlen' /usr/lib64/gcc/x86_64-suse-linux/14/../../../../x86_64-suse-linux/bin/ld: ../coregrind/libcoregrind-amd64-linux.a(libcoregrind_amd64_linux_a-m_libcbase.o):/home/paulf/scratch/valgrind/coregrind/m_libcbase.c:263: more undefined references to `strlen' follow A+ Paul |