]> git.ipfire.org Git - thirdparty/valgrind.git/commit
Compile code that gets linked with libc by adding -fhosted.
authorFlorian Krohm <flo2030@eich-krohm.de>
Thu, 15 May 2025 21:42:19 +0000 (21:42 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Thu, 15 May 2025 21:42:19 +0000 (21:42 +0000)
commitb429488ff5aa59bc684d48755bf6e6d866262cd7
treecefb5d03267e7dae510d343eeeb1ac940b3989e3
parent41f0f95d9415faa5f76fcab92f45ca05957c4032
Compile code that gets linked with libc by adding -fhosted.

The use of -fno-builtin interfers with -Wformat: no format warnings will
be given when both options are present. Because -fno-builtin means: when
you encounter a function that has the same name as a built-in function,
forget everything you know about that function.
That includes functions attributes. And without __attribute__((format...))
there will be no -Wformat warnings.

The fix is to append -fhosted when compiling something that gets linked
with libc. As command line options are processed left to right adding
-fhosted at the end overrides any earlier -fno-builtin option.

Fix compiler warnings.

Add some ugly ifdeffery to drd/drd_intercepts.c. I could not figure out how
to rewrite the offensive printf to avoid testcase breakage.
12 files changed:
auxprogs/Makefile.am
auxprogs/valgrind-di-server.c
auxprogs/valgrind-listener.c
coregrind/Makefile.am
coregrind/vgdb-invoker-ptrace.c
coregrind/vgdb.c
drd/drd_pthread_intercepts.c
helgrind/hg_intercepts.c
memcheck/tests/vbit-test/Makefile.am
memcheck/tests/vbit-test/irops.c
none/tests/s390x/disasm-test/Makefile.am
none/tests/s390x/disasm-test/opcode.c