Skip to content

Commit f0bcf4a

Browse files
art049claude
andcommitted
fix(callgrind/tests): use -fno-builtin-printf to prevent printf inlining
Replace -D_FORTIFY_SOURCE=0 with -fno-builtin-printf to prevent the compiler from treating printf as a builtin function that can be inlined. This ensures the inline tests only capture the intended inline function calls without printf appearing in the callgrind output. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent e4f4705 commit f0bcf4a

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

callgrind/tests/Makefile.am

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ AM_CFLAGS += $(AM_FLAG_M3264_PRI)
3434
AM_CXXFLAGS += $(AM_FLAG_M3264_PRI)
3535

3636
# Inline tests need -O2 to enable inlining and -g for debug info
37-
# Use -D_FORTIFY_SOURCE=0 to prevent glibc from inlining printf and other stdio functions
38-
inline_samefile_CFLAGS = $(AM_CFLAGS) -O2 -g -D_FORTIFY_SOURCE=0
39-
inline_crossfile_CFLAGS = $(AM_CFLAGS) -O2 -g -D_FORTIFY_SOURCE=0
37+
# Use -fno-builtin-printf to prevent compiler from inlining printf
38+
inline_samefile_CFLAGS = $(AM_CFLAGS) -O2 -g -fno-builtin-printf
39+
inline_crossfile_CFLAGS = $(AM_CFLAGS) -O2 -g -fno-builtin-printf
4040

4141
threads_LDADD = -lpthread

0 commit comments

Comments
 (0)