diff options
author | Uwe Kleine-König <uwe@kleine-koenig.org> | 2012-09-02 22:18:16 +0200 |
---|---|---|
committer | Uwe Kleine-König <uwe@kleine-koenig.org> | 2012-09-02 23:25:12 +0200 |
commit | d59d232f8eafbea27b3ced8e9b7d8f936d772be7 (patch) | |
tree | b5f87dc1b2b596e89d83affc98215c50b317ae0f | |
parent | 6fa9b9babcc0425da544e899dfe4953639f277da (diff) | |
download | rt-tests-d59d232f8eafbea27b3ced8e9b7d8f936d772be7.tar.gz |
properly pass all needed options to the compiler
Notice: this object is not reachable from any branch.
debhelper provides CFLAGS and CPPFLAGS but not the options needed to
compile rt-tests. So make sure all needed and specified options make it to
the compiler
Notice: this object is not reachable from any branch.
-rw-r--r-- | debian/patches/fix-CFLAGS.patch | 44 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 45 insertions, 0 deletions
diff --git a/debian/patches/fix-CFLAGS.patch b/debian/patches/fix-CFLAGS.patch new file mode 100644 index 0000000..b1dba73 --- /dev/null +++ b/debian/patches/fix-CFLAGS.patch @@ -0,0 +1,44 @@ +From: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> +Subject: Makefile: be more friendly with user supplied CFLAGS + +For compilation to work + + -D_GNU_SOURCE -Isrc/include + +is needed to be passed to the compiler. For Debian packaging several +things are added but not these two from above. So be a bit more friendly +and add them unconditionally. There is no harm if they are included in +the user supplied CFLAGS and so passed twice. + +Moreover be a bit more correct about CFLAGS/CPPFLAGS. Both should be +passed to the compiler with CFLAGS taking options for the compiler and +CPPFLAGS taking options for the preprocessor. This is also needed for +Debian packaging where the helper scripts set CPPFLAGS. + +Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> +Forwarded: id:1346616775-11714-1-git-send-email-u.kleine-koenig@pengutronix.de +--- + Makefile | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +--- a/Makefile ++++ b/Makefile +@@ -20,7 +20,8 @@ + NUMA := 1 + endif + +-CFLAGS ?= -D_GNU_SOURCE -Wall -Wno-nonnull -Isrc/include ++CFLAGS ?= -Wall -Wno-nonnull ++CPPFLAGS += -D_GNU_SOURCE -Isrc/include + LDFLAGS ?= + + ifndef DEBUG +@@ -47,7 +48,7 @@ + VPATH += src/hackbench + + %.o: %.c +- $(CC) -D VERSION_STRING=$(VERSION_STRING) -c $< $(CFLAGS) ++ $(CC) -D VERSION_STRING=$(VERSION_STRING) -c $< $(CFLAGS) $(CPPFLAGS) + + # Pattern rule to generate dependency files from .c files + %.d: %.c diff --git a/debian/patches/series b/debian/patches/series index 9ca02ca..a6e64fb 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -5,3 +5,4 @@ debian_has_recent_glibc fix_comment_about_realtime_group.patch backfire-fix-build-failure-for-modern-kernels.patch support-compilation-with-hardening-flags.patch +fix-CFLAGS.patch |