This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
[PATCH] Define NOT_IN_libc when compiling benchmark programs
- From: Siddhesh Poyarekar <siddhesh at redhat dot com>
- To: libc-alpha at sourceware dot org
- Date: Tue, 16 Apr 2013 17:44:01 +0530
- Subject: [PATCH] Define NOT_IN_libc when compiling benchmark programs
Hi,
The benchmark programs ought to be build with -DNOT_IN_libc=1. I
found out that they're not when copying over the string benchmarks.
Here's a patch the fixes it. OK to commit?
Siddhesh
* benchtests/Makefile: Include cppflags-iterator.mk to add
-DNOT_IN_libc=1 to CPPFLAGS of all benchmark programs.
diff --git a/benchtests/Makefile b/benchtests/Makefile
index 6c0e033..120c47a 100644
--- a/benchtests/Makefile
+++ b/benchtests/Makefile
@@ -118,6 +118,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 bench-timing.h Makefile
run-bench = $(test-wrapper-env) \