about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--malloc/Makefile2
-rw-r--r--malloc/tst-tcfree3.c3
2 files changed, 2 insertions, 3 deletions
diff --git a/malloc/Makefile b/malloc/Makefile
index c1db3347d8..f6cdf7bf0b 100644
--- a/malloc/Makefile
+++ b/malloc/Makefile
@@ -298,6 +298,8 @@ CPPFLAGS-malloc.c += -DUSE_TCACHE=1
 # Uncomment this for test releases.  For public releases it is too expensive.
 #CPPFLAGS-malloc.o += -DMALLOC_DEBUG=1
 
+CFLAGS-tst-tcfree3.c += -fno-builtin-malloc -fno-builtin-free
+
 sLIBdir := $(shell echo $(slibdir) | sed 's,lib\(\|64\)$$,\\\\$$LIB,')
 
 $(objpfx)mtrace: mtrace.pl
diff --git a/malloc/tst-tcfree3.c b/malloc/tst-tcfree3.c
index ce6d958f8a..30886b6f49 100644
--- a/malloc/tst-tcfree3.c
+++ b/malloc/tst-tcfree3.c
@@ -19,9 +19,6 @@
 #include <malloc.h>
 #include <string.h>
 
-/* Prevent GCC from optimizing away any malloc/free pairs.  */
-#pragma GCC optimize ("O0")
-
 static int
 do_test (void)
 {