about summary refs log tree commit diff
path: root/Makerules
diff options
context:
space:
mode:
authorSiddhesh Poyarekar <siddhesh@sourceware.org>2022-01-12 23:34:23 +0530
committerSiddhesh Poyarekar <siddhesh@sourceware.org>2022-03-11 20:36:24 +0530
commitf8c2f620f1929ad78cb0a247601bec972f140c51 (patch)
treedd7291dfa4c13835b4f9cb76be03ec00dd270d16 /Makerules
parentd6a58bd81d07322ff5da8f419d8620ef037b6a36 (diff)
downloadglibc-f8c2f620f1929ad78cb0a247601bec972f140c51.tar.gz
glibc-f8c2f620f1929ad78cb0a247601bec972f140c51.tar.xz
glibc-f8c2f620f1929ad78cb0a247601bec972f140c51.zip
debug: Autogenerate _FORTIFY_SOURCE tests
Rename debug/tst-chk1.c to debug/tst-fortify.c and add make hackery to
autogenerate tests with different macros enabled to build and run the
same test with different configurations as well as different
fortification levels.

The change also ends up expanding the -lfs tests to include
_FORTIFY_SOURCE=3.

Signed-off-by: Siddhesh Poyarekar <siddhesh@sourceware.org>
Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>
(cherry picked from commit db27f1251b008280a29d540b4f8ab2a38a0d80af)
Diffstat (limited to 'Makerules')
-rw-r--r--Makerules6
1 files changed, 6 insertions, 0 deletions
diff --git a/Makerules b/Makerules
index 596fa68376..7fbe85719a 100644
--- a/Makerules
+++ b/Makerules
@@ -424,6 +424,12 @@ $(objpfx)%$o: $(objpfx)%.c $(before-compile); $$(compile-command.c)
 endef
 object-suffixes-left := $(all-object-suffixes)
 include $(o-iterator)
+
+define o-iterator-doit
+$(objpfx)%$o: $(objpfx)%.cc $(before-compile); $$(compile-command.cc)
+endef
+object-suffixes-left := $(all-object-suffixes)
+include $(o-iterator)
 endif
 
 # Generate .dT files as we compile.