]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
tests: move -D_FORTIFY_SOURCE to CPPFLAGS
authorMike Frysinger <vapier@gentoo.org>
Sun, 6 May 2012 22:37:57 +0000 (18:37 -0400)
committerMike Frysinger <vapier@gentoo.org>
Thu, 31 May 2012 18:31:08 +0000 (14:31 -0400)
The -D_FORTIFY_SOURCE flags are being added to the test-specific CFLAGS
values when they should be the test-specific CPPFLAGS values.  Otherwise
the values don't override the user-specified CPPFLAGS and might end up
breaking the tests.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
ChangeLog
debug/Makefile
wcsmbs/Makefile

index c9bd9b4ad15b948452ad3f23888fb98734c961ce..4d71f26e0356f12ad784f19d053af5f8fb8a91ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2012-05-31  Mike Frysinger  <vapier@gentoo.org>
+
+       * debug/Makefile (CFLAGS-tst-longjmp_chk.c): Delete
+       -D_FORTIFY_SOURCE=1.
+       (CPPFLAGS-tst-longjmp_chk.c): Define.
+       (CFLAGS-tst-longjmp_chk2.c): Delete -D_FORTIFY_SOURCE=1.
+       (CPPFLAGS-tst-longjmp_chk2.c): Define.
+       * wcsmbs/Makefile (CPPFLAGS-tst-wchar-h.c): Rename from
+       CFLAGS-tst-wchar-h.c.
+
 2012-05-31  Marek Polacek  <polacek@redhat.com>
 
        [BZ #14132]
index fb8c28572f40ec4581db009afcea8e5c27ca8970..4c01a66e39be9f7514a0e8219840dff73b49f92c 100644 (file)
@@ -79,10 +79,14 @@ CFLAGS-pread_chk.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-pread64_chk.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-recv_chk.c = -fexceptions -fasynchronous-unwind-tables
 CFLAGS-recvfrom_chk.c = -fexceptions -fasynchronous-unwind-tables
-CFLAGS-tst-longjmp_chk.c = -fexceptions -fasynchronous-unwind-tables \
-                          -D_FORTIFY_SOURCE=1
-CFLAGS-tst-longjmp_chk2.c = -fexceptions -fasynchronous-unwind-tables \
-                           -D_FORTIFY_SOURCE=1
+
+# Need to make sure the settings here override what configure might have
+# set up for us, so keep the CFLAGS/CPPFLAGS split logical as the order is:
+# <user CFLAGS> <test CFLAGS> <user CPPFLAGS> <test CPPFLAGS>
+CFLAGS-tst-longjmp_chk.c = -fexceptions -fasynchronous-unwind-tables
+CPPFLAGS-tst-longjmp_chk.c = -D_FORTIFY_SOURCE=1
+CFLAGS-tst-longjmp_chk2.c = -fexceptions -fasynchronous-unwind-tables
+CPPFLAGS-tst-longjmp_chk2.c = -D_FORTIFY_SOURCE=1
 
 # We know these tests have problems with format strings, this is what
 # we are testing.  Disable that warning.
index 99d3d28ae76ac5b7c2612c3e7d44603beb24fc19..983fd76f612c9d2abcfcd01c4a46f3bc5be860a1 100644 (file)
@@ -66,7 +66,7 @@ CFLAGS-wcstoull_l.c = $(strtox-CFLAGS)
 CFLAGS-wcstod_l.c = $(strtox-CFLAGS)
 CFLAGS-wcstold_l.c = $(strtox-CFLAGS)
 CFLAGS-wcstof_l.c = $(strtox-CFLAGS)
-CFLAGS-tst-wchar-h.c = -D_FORTIFY_SOURCE=2
+CPPFLAGS-tst-wchar-h.c = -D_FORTIFY_SOURCE=2
 
 CFLAGS-isoc99_wscanf.c += $(exceptions)
 CFLAGS-isoc99_fwscanf.c += $(exceptions)