about summary refs log tree commit diff
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@redhat.com>2013-04-16 18:34:03 +0530
committerSiddhesh Poyarekar <siddhesh@redhat.com>2013-04-16 18:34:03 +0530
commit4856bcd2df33adfc36c762a48853ec613c0d2f68 (patch)
tree4f4a3b8edea3142ed89a91d83684c931ecdce6e6
parenta2964074322106ab2350cdefa676de3664083b0a (diff)
downloadglibc-4856bcd2df33adfc36c762a48853ec613c0d2f68.tar.gz
glibc-4856bcd2df33adfc36c762a48853ec613c0d2f68.tar.xz
glibc-4856bcd2df33adfc36c762a48853ec613c0d2f68.zip
Define NOT_IN_libc when compiling benchmark programs
-rw-r--r--ChangeLog3
-rw-r--r--benchtests/Makefile6
2 files changed, 9 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 8b53c33981..ca232e7a68 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2013-04-16  Siddhesh Poyarekar  <siddhesh@redhat.com>
 
+	* benchtests/Makefile: Include cppflags-iterator.mk to add
+	-DNOT_IN_libc=1 to CPPFLAGS of all benchmark programs.
+
 	* Makefile.in (bench-clean): New target.
 	* benchtests/Makefile (bench-clean): Likewise.
 
diff --git a/benchtests/Makefile b/benchtests/Makefile
index 097d3c3560..5d3de5db0b 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -114,6 +114,12 @@ include ../Rules
 
 binaries-bench := $(addprefix $(objpfx)bench-,$(bench))
 
+# This makes sure CPPFLAGS-nonlib and CFLAGS-nonlib are passed
+# for all these modules.
+cpp-srcs-left := $(binaries-bench:=.c)
+lib := nonlib
+include $(patsubst %,$(..)cppflags-iterator.mk,$(cpp-srcs-left))
+
 bench-deps := bench-skeleton.c Makefile
 
 run-bench = $(test-wrapper-env) \