This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [gold] PATCH: Filter out -Wp,-D_FORTIFY_SOURCE=. with -O0
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: binutils at sourceware dot org
- Date: Thu, 25 Oct 2012 05:54:23 -0700
- Subject: Re: [gold] PATCH: Filter out -Wp,-D_FORTIFY_SOURCE=. with -O0
- References: <20121025043723.GA19815@gmail.com> <m21ugm53e5.fsf@igel.home>
On Thu, Oct 25, 2012 at 2:04 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> "H.J. Lu" <hjl.tools@gmail.com> writes:
>
>> +LINK_NFORTIFY = `echo $(LINK) | sed -e "s/-Wp,-D_FORTIFY_SOURCE=[0-9]\+//"`
>
> \+ is not portable.
>
This patch avoids \+.
--
H.J.
---
diff --git a/gold/testsuite/Makefile.am b/gold/testsuite/Makefile.am
index 8bb16b6..8a66362 100644
--- a/gold/testsuite/Makefile.am
+++ b/gold/testsuite/Makefile.am
@@ -100,6 +100,11 @@ leb128_unittest_SOURCES = leb128_unittest.cc
endif NATIVE_OR_CROSS_LINKER
+LINK_NFORTIFY = `echo $(LINK) | sed -e 's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'`
+CXXLINK_NFORTIFY = `echo $(CXXLINK) | sed -e
's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'`
+COMPILE_NFORTIFY = `echo $(COMPILE) | sed -e
's/-Wp,-D_FORTIFY_SOURCE=[0-9[0-9]]*//'`
+CXXCOMPILE_NFORTIFY = `echo $(CXXCOMPILE) | sed -e
's/-Wp,-D_FORTIFY_SOURCE=[0-9][0-9]*//'`
+
# ---------------------------------------------------------------------
# These tests test the output of gold (end-to-end tests). In
# particular, they make sure that gold can link "difficult" object
@@ -117,17 +122,17 @@ if GCC
# supposed to (hence their names), but are used for many tests that
# don't actually involve analyzing input data.
flagstest_debug.o: constructor_test.cc
- $(CXXCOMPILE) -O0 -g -c -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -g -c -o $@ $<
flagstest_ndebug.o: constructor_test.cc
- $(CXXCOMPILE) -O0 -c -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -o $@ $<
check_SCRIPTS += incremental_test.sh
check_DATA += incremental_test.stdout
MOSTLYCLEANFILES += incremental_test
incremental_test_1.o: incremental_test_1.c
- $(COMPILE) -O0 -c -ffunction-sections -g -o $@ $<
+ $(COMPILE_NFORTIFY) -O0 -c -ffunction-sections -g -o $@ $<
incremental_test_2.o: incremental_test_2.c
- $(COMPILE) -O0 -c -ffunction-sections -g -o $@ $<
+ $(COMPILE_NFORTIFY) -O0 -c -ffunction-sections -g -o $@ $<
incremental_test: incremental_test_1.o incremental_test_2.o gcctestdir/ld
$(LINK) -Bgcctestdir/ -Wl,--incremental-full incremental_test_1.o
incremental_test_2.o -Wl,-debug 2> incremental_test.cmdline
incremental_test.stdout: incremental_test ../incremental-dump
@@ -137,9 +142,9 @@ check_SCRIPTS += gc_comdat_test.sh
check_DATA += gc_comdat_test.stdout
MOSTLYCLEANFILES += gc_comdat_test
gc_comdat_test_1.o: gc_comdat_test_1.cc
- $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -ffunction-sections -g -o $@ $<
gc_comdat_test_2.o: gc_comdat_test_2.cc
- $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -ffunction-sections -g -o $@ $<
gc_comdat_test: gc_comdat_test_1.o gc_comdat_test_2.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--gc-sections gc_comdat_test_1.o
gc_comdat_test_2.o
gc_comdat_test.stdout: gc_comdat_test
@@ -149,7 +154,7 @@ check_SCRIPTS += gc_tls_test.sh
check_DATA += gc_tls_test.stdout
MOSTLYCLEANFILES += gc_tls_test
gc_tls_test.o: gc_tls_test.cc
- $(CXXCOMPILE) -O0 -c -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -g -o $@ $<
gc_tls_test:gc_tls_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--gc-sections gc_tls_test.o
gc_tls_test.stdout: gc_tls_test
@@ -159,7 +164,7 @@ check_SCRIPTS += gc_orphan_section_test.sh
check_DATA += gc_orphan_section_test.stdout
MOSTLYCLEANFILES += gc_orphan_section_test
gc_orphan_section_test.o: gc_orphan_section_test.cc
- $(CXXCOMPILE) -O0 -c -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -g -o $@ $<
gc_orphan_section_test:gc_orphan_section_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--gc-sections gc_orphan_section_test.o
gc_orphan_section_test.stdout: gc_orphan_section_test
@@ -169,7 +174,7 @@ check_SCRIPTS += pr14265.sh
check_DATA += pr14265.stdout
MOSTLYCLEANFILES += pr14265
pr14265.o: pr14265.c
- $(COMPILE) -O0 -c -o $@ $<
+ $(COMPILE_NFORTIFY) -O0 -c -o $@ $<
pr14265: pr14265.o
$(LINK) -Bgcctestdir/ -Wl,--gc-sections -T $(srcdir)/pr14265.t -o $@ $<
pr14265.stdout: pr14265
@@ -179,7 +184,7 @@ check_SCRIPTS += icf_test.sh
check_DATA += icf_test.stdout
MOSTLYCLEANFILES += icf_test
icf_test.o: icf_test.cc
- $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -ffunction-sections -g -o $@ $<
icf_test: icf_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_test.o
icf_test.stdout: icf_test
@@ -189,7 +194,7 @@ check_SCRIPTS += icf_keep_unique_test.sh
check_DATA += icf_keep_unique_test.stdout
MOSTLYCLEANFILES += icf_keep_unique_test
icf_keep_unique_test.o: icf_keep_unique_test.cc
- $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -ffunction-sections -g -o $@ $<
icf_keep_unique_test: icf_keep_unique_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--icf=all
-Wl,--keep-unique,_Z11unique_funcv icf_keep_unique_test.o
icf_keep_unique_test.stdout: icf_keep_unique_test
@@ -199,7 +204,7 @@ check_SCRIPTS += icf_safe_test.sh
check_DATA += icf_safe_test_1.stdout icf_safe_test_2.stdout
MOSTLYCLEANFILES += icf_safe_test
icf_safe_test.o: icf_safe_test.cc
- $(CXXCOMPILE) -O0 -c -ffunction-sections -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -ffunction-sections -g -o $@ $<
icf_safe_test: icf_safe_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--icf=safe icf_safe_test.o
icf_safe_test_1.stdout: icf_safe_test
@@ -211,7 +216,7 @@ check_SCRIPTS += icf_safe_so_test.sh
check_DATA += icf_safe_so_test_1.stdout icf_safe_so_test_2.stdout
MOSTLYCLEANFILES += icf_safe_so_test
icf_safe_so_test.o: icf_safe_so_test.cc
- $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
icf_safe_so_test: icf_safe_so_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--icf=safe icf_safe_so_test.o -fPIC -shared
icf_safe_so_test_1.stdout: icf_safe_so_test
@@ -223,7 +228,7 @@ check_SCRIPTS += final_layout.sh
check_DATA += final_layout.stdout
MOSTLYCLEANFILES += final_layout
final_layout.o: final_layout.cc
- $(CXXCOMPILE) -O0 -c -ffunction-sections -fdata-sections -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -ffunction-sections -fdata-sections -g -o $@ $<
final_layout_sequence.txt:
(echo "*_Z3barv*" && echo ".text._Z3bazv" && echo "*_Z3foov*" &&
echo "*global_varb*" && echo "*global_vara*" && echo "*global_varc*")
> final_layout_sequence.txt
final_layout: final_layout.o final_layout_sequence.txt gcctestdir/ld
@@ -234,7 +239,7 @@ final_layout.stdout: final_layout
check_PROGRAMS += icf_virtual_function_folding_test
MOSTLYCLEANFILES += icf_virtual_function_folding_test
icf_virtual_function_folding_test.o: icf_virtual_function_folding_test.cc
- $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIE -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -ffunction-sections -fPIE -g -o $@ $<
icf_virtual_function_folding_test:
icf_virtual_function_folding_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--icf=all
icf_virtual_function_folding_test.o -pie
@@ -242,7 +247,7 @@ check_SCRIPTS += icf_preemptible_functions_test.sh
check_DATA += icf_preemptible_functions_test.stdout
MOSTLYCLEANFILES += icf_preemptible_functions_test
icf_preemptible_functions_test.o: icf_preemptible_functions_test.cc
- $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
icf_preemptible_functions_test: icf_preemptible_functions_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--icf=all
icf_preemptible_functions_test.o -fPIC -shared
icf_preemptible_functions_test.stdout: icf_preemptible_functions_test
@@ -252,7 +257,7 @@ check_SCRIPTS += icf_string_merge_test.sh
check_DATA += icf_string_merge_test.stdout
MOSTLYCLEANFILES += icf_string_merge_test
icf_string_merge_test.o: icf_string_merge_test.cc
- $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
icf_string_merge_test: icf_string_merge_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_string_merge_test.o
icf_string_merge_test.stdout: icf_string_merge_test
@@ -262,9 +267,9 @@ check_SCRIPTS += icf_sht_rel_addend_test.sh
check_DATA += icf_sht_rel_addend_test.stdout
MOSTLYCLEANFILES += icf_sht_rel_addend_test
icf_sht_rel_addend_test_1.o: icf_sht_rel_addend_test_1.cc
- $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
icf_sht_rel_addend_test_2.o: icf_sht_rel_addend_test_2.cc
- $(CXXCOMPILE) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -ffunction-sections -fPIC -g -o $@ $<
icf_sht_rel_addend_test: icf_sht_rel_addend_test_1.o
icf_sht_rel_addend_test_2.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--icf=all icf_sht_rel_addend_test_1.o
icf_sht_rel_addend_test_2.o
icf_sht_rel_addend_test.stdout: icf_sht_rel_addend_test
@@ -273,7 +278,7 @@ icf_sht_rel_addend_test.stdout: icf_sht_rel_addend_test
check_PROGRAMS += basic_test
check_PROGRAMS += basic_pic_test
basic_test.o: basic_test.cc
- $(CXXCOMPILE) -O0 -c -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -o $@ $<
basic_test: basic_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ basic_test.o
@@ -284,7 +289,7 @@ basic_static_test: basic_test.o gcctestdir/ld
endif
basic_pic_test.o: basic_test.cc
- $(CXXCOMPILE) -O0 -c -fpic -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -fpic -o $@ $<
basic_pic_test: basic_pic_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ basic_pic_test.o
@@ -296,7 +301,7 @@ endif
check_PROGRAMS += basic_pie_test
basic_pie_test.o: basic_test.cc
- $(CXXCOMPILE) -O0 -c -fpie -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -fpie -o $@ $<
basic_pie_test: basic_pie_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -pie basic_pie_test.o
@@ -902,9 +907,9 @@ check_SCRIPTS += debug_msg.sh
check_DATA += debug_msg.err
MOSTLYCLEANFILES += debug_msg.err
debug_msg.o: debug_msg.cc
- $(CXXCOMPILE) -O0 -g -c -w -o $@ $(srcdir)/debug_msg.cc
+ $(CXXCOMPILE_NFORTIFY) -O0 -g -c -w -o $@ $(srcdir)/debug_msg.cc
odr_violation1.o: odr_violation1.cc
- $(CXXCOMPILE) -O0 -g -c -w -o $@ $(srcdir)/odr_violation1.cc
+ $(CXXCOMPILE_NFORTIFY) -O0 -g -c -w -o $@ $(srcdir)/odr_violation1.cc
# Compile with different optimization flags to check that rearranged
# instructions don't cause a false positive.
odr_violation2.o: odr_violation2.cc
@@ -925,9 +930,9 @@ if HAVE_ZLIB
check_DATA += debug_msg_cdebug.err
MOSTLYCLEANFILES += debug_msg_cdebug.err
debug_msg_cdebug.o: debug_msg.cc gcctestdir/as
- $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c
-w -o $@ $(srcdir)/debug_msg.cc
+ $(CXXCOMPILE_NFORTIFY) -Bgcctestdir/ -O0 -g
-Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/debug_msg.cc
odr_violation1_cdebug.o: odr_violation1.cc gcctestdir/as
- $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c
-w -o $@ $(srcdir)/odr_violation1.cc
+ $(CXXCOMPILE_NFORTIFY) -Bgcctestdir/ -O0 -g
-Wa,--compress-debug-sections -c -w -o $@ $(srcdir)/odr_violation1.cc
odr_violation2_cdebug.o: odr_violation2.cc gcctestdir/as
$(CXXCOMPILE) -Bgcctestdir/ -O2 -g -Wa,--compress-debug-sections -c
-w -o $@ $(srcdir)/odr_violation2.cc
debug_msg_cdebug.err: debug_msg_cdebug.o odr_violation1_cdebug.o
odr_violation2_cdebug.o gcctestdir/ld
@@ -945,9 +950,9 @@ endif HAVE_ZLIB
check_DATA += debug_msg_so.err
MOSTLYCLEANFILES += debug_msg_so.err
debug_msg.so: debug_msg.cc gcctestdir/ld
- $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -shared -fPIC -w -o $@
$(srcdir)/debug_msg.cc
+ $(CXXCOMPILE_NFORTIFY) -Bgcctestdir/ -O0 -g -shared -fPIC -w -o $@
$(srcdir)/debug_msg.cc
odr_violation1.so: odr_violation1.cc gcctestdir/ld
- $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -shared -fPIC -w -o $@
$(srcdir)/odr_violation1.cc
+ $(CXXCOMPILE_NFORTIFY) -Bgcctestdir/ -O0 -g -shared -fPIC -w -o $@
$(srcdir)/odr_violation1.cc
odr_violation2.so: odr_violation2.cc gcctestdir/ld
$(CXXCOMPILE) -Bgcctestdir/ -O2 -g -shared -fPIC -w -o $@
$(srcdir)/odr_violation2.cc
debug_msg_so.err: debug_msg.so odr_violation1.so odr_violation2.so
gcctestdir/ld
@@ -964,9 +969,9 @@ debug_msg_so.err: debug_msg.so odr_violation1.so
odr_violation2.so gcctestdir/ld
check_DATA += debug_msg_ndebug.err
MOSTLYCLEANFILES += debug_msg_ndebug.err
debug_msg_ndebug.so: debug_msg.cc gcctestdir/ld
- $(CXXCOMPILE) -Bgcctestdir/ -O0 -g0 -shared -fPIC -w -o $@
$(srcdir)/debug_msg.cc
+ $(CXXCOMPILE_NFORTIFY) -Bgcctestdir/ -O0 -g0 -shared -fPIC -w -o $@
$(srcdir)/debug_msg.cc
odr_violation1_ndebug.so: odr_violation1.cc gcctestdir/ld
- $(CXXCOMPILE) -Bgcctestdir/ -O0 -g0 -shared -fPIC -w -o $@
$(srcdir)/odr_violation1.cc
+ $(CXXCOMPILE_NFORTIFY) -Bgcctestdir/ -O0 -g0 -shared -fPIC -w -o $@
$(srcdir)/odr_violation1.cc
odr_violation2_ndebug.so: odr_violation2.cc gcctestdir/ld
$(CXXCOMPILE) -Bgcctestdir/ -O2 -g0 -shared -fPIC -w -o $@
$(srcdir)/odr_violation2.cc
debug_msg_ndebug.err: debug_msg_ndebug.so odr_violation1_ndebug.so
odr_violation2_ndebug.so gcctestdir/ld
@@ -984,7 +989,7 @@ check_SCRIPTS += undef_symbol.sh
check_DATA += undef_symbol.err
MOSTLYCLEANFILES += undef_symbol.err
undef_symbol.o: undef_symbol.cc
- $(CXXCOMPILE) -O0 -g -c -fPIC $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -g -c -fPIC $<
undef_symbol.so: undef_symbol.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -shared undef_symbol.o
undef_symbol.err: undef_symbol_main.o undef_symbol.so gcctestdir/ld
@@ -1268,7 +1273,7 @@ MOSTLYCLEANFILES += ver_matching_test.stdout
ver_matching_def.so: ver_matching_def_pic.o
$(srcdir)/version_script.map gcctestdir/ld
$(CXXLINK) -O0 -Bgcctestdir/ -shared ver_matching_def_pic.o
-Wl,--version-script=$(srcdir)/version_script.map
ver_matching_def_pic.o: ver_matching_def.cc
- $(CXXCOMPILE) -O0 -c -fpic -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -fpic -o $@ $<
ver_matching_test.stdout: ver_matching_def.so
$(TEST_OBJDUMP) -T ver_matching_def.so | $(TEST_CXXFILT) >
ver_matching_test.stdout
@@ -1339,7 +1344,7 @@ script_test_8.stdout: script_test_8
check_SCRIPTS += script_test_9.sh
check_DATA += script_test_9.stdout
script_test_9.o: script_test_9.cc
- $(CXXCOMPILE) -O0 -c -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -o $@ $<
script_test_9: gcctestdir/ld $(srcdir)/script_test_9.t script_test_9.o
$(CXXLINK) -Bgcctestdir/ script_test_9.o -T $(srcdir)/script_test_9.t
script_test_9.stdout: script_test_9
@@ -1461,13 +1466,13 @@ plugin_test_7: plugin_test_7_1.o
plugin_test_7_1.syms plugin_test_7_2.o gcctestd
plugin_test_7.syms: plugin_test_7
$(TEST_READELF) -sW $< >$@ 2>/dev/null
plugin_test_7_1.o: plugin_test_7_1.c
- $(COMPILE) -DLTO -O0 -c -ffunction-sections -fdata-sections -o $@ $<
+ $(COMPILE_NFORTIFY) -DLTO -O0 -c -ffunction-sections -fdata-sections -o $@ $<
plugin_test_7_1_orig.o: plugin_test_7_1.c
- $(COMPILE) -O0 -c -ffunction-sections -fdata-sections -o $@ $<
+ $(COMPILE_NFORTIFY) -O0 -c -ffunction-sections -fdata-sections -o $@ $<
plugin_test_7_1.syms: plugin_test_7_1_orig.o
$(TEST_READELF) -sW $< >$@ 2>/dev/null
plugin_test_7_2.o: plugin_test_7_2.c
- $(COMPILE) -O0 -c -ffunction-sections -fdata-sections -o $@ $<
+ $(COMPILE_NFORTIFY) -O0 -c -ffunction-sections -fdata-sections -o $@ $<
plugin_test_7.err: plugin_test_7
# Test plugins with -r.
@@ -1501,7 +1506,7 @@ two_file_test_1c.o: two_file_test_1.o
plugin_test.so: plugin_test.o
$(LINK) -Bgcctestdir/ -shared plugin_test.o
plugin_test.o: plugin_test.c
- $(COMPILE) -O0 -c -fpic -o $@ $<
+ $(COMPILE_NFORTIFY) -O0 -c -fpic -o $@ $<
two_file_test_main.syms: two_file_test_main.o
$(TEST_READELF) -sW $< >$@ 2>/dev/null
@@ -1532,7 +1537,7 @@ unused.c:
check_SCRIPTS += plugin_final_layout.sh
check_DATA += plugin_final_layout.stdout plugin_final_layout_readelf.stdout
plugin_final_layout.o: plugin_final_layout.cc
- $(CXXCOMPILE) -O0 -c -ffunction-sections -fdata-sections -g -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -c -ffunction-sections -fdata-sections -g -o $@ $<
plugin_final_layout: plugin_final_layout.o plugin_section_order.so
gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--plugin,"./plugin_section_order.so"
plugin_final_layout.o
plugin_final_layout.stdout: plugin_final_layout
@@ -1543,7 +1548,7 @@ plugin_final_layout_readelf.stdout: plugin_final_layout
plugin_section_order.so: plugin_section_order.o
$(LINK) -Bgcctestdir/ -shared plugin_section_order.o
plugin_section_order.o: plugin_section_order.c
- $(COMPILE) -O0 -c -fpic -o $@ $<
+ $(COMPILE_NFORTIFY) -O0 -c -fpic -o $@ $<
endif PLUGINS
@@ -1987,7 +1992,7 @@ check_SCRIPTS += gdb_index_test_1.sh
check_DATA += gdb_index_test_1.stdout
MOSTLYCLEANFILES += gdb_index_test_1.stdout gdb_index_test_1
gdb_index_test.o: gdb_index_test.cc
- $(CXXCOMPILE) -O0 -g -gno-pubnames -c -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -g -gno-pubnames -c -o $@ $<
gdb_index_test_1: gdb_index_test.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--gdb-index $<
gdb_index_test_1.stdout: gdb_index_test_1
@@ -2000,7 +2005,7 @@ check_SCRIPTS += gdb_index_test_2.sh
check_DATA += gdb_index_test_2.stdout
MOSTLYCLEANFILES += gdb_index_test_2.stdout gdb_index_test_2
gdb_index_test_cdebug.o: gdb_index_test.cc
- $(CXXCOMPILE) -Bgcctestdir/ -O0 -g -Wa,--compress-debug-sections -c -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -Bgcctestdir/ -O0 -g
-Wa,--compress-debug-sections -c -o $@ $<
gdb_index_test_2: gdb_index_test_cdebug.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--gdb-index $<
gdb_index_test_2.stdout: gdb_index_test_2
@@ -2013,7 +2018,7 @@ check_SCRIPTS += gdb_index_test_3.sh
check_DATA += gdb_index_test_3.stdout
MOSTLYCLEANFILES += gdb_index_test_3.stdout gdb_index_test_3
gdb_index_test_3.o: gdb_index_test_3.c
- $(COMPILE) -O0 -g -c -o $@ $<
+ $(COMPILE_NFORTIFY) -O0 -g -c -o $@ $<
gdb_index_test_3: gdb_index_test_3.o gcctestdir/ld
$(LINK) -Bgcctestdir/ -Wl,--gdb-index,--fatal-warnings $<
gdb_index_test_3.stdout: gdb_index_test_3
@@ -2024,7 +2029,7 @@ check_SCRIPTS += gdb_index_test_4.sh
check_DATA += gdb_index_test_4.stdout
MOSTLYCLEANFILES += gdb_index_test_4.stdout gdb_index_test_4
gdb_index_test_pub.o: gdb_index_test.cc
- $(CXXCOMPILE) -O0 -g -gpubnames -c -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -g -gpubnames -c -o $@ $<
gdb_index_test_4: gdb_index_test_pub.o gcctestdir/ld
$(CXXLINK) -Bgcctestdir/ -Wl,--gdb-index $<
gdb_index_test_4.stdout: gdb_index_test_4
@@ -2038,15 +2043,15 @@ endif HAVE_PUBNAMES
if DEFAULT_TARGET_X86_64
two_file_test_1_v1_ndebug.o: two_file_test_1_v1.cc
- $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -g0 -c -o $@ $<
two_file_test_1_ndebug.o: two_file_test_1.cc
- $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -g0 -c -o $@ $<
two_file_test_1b_ndebug.o: two_file_test_1b.cc
- $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -g0 -c -o $@ $<
two_file_test_2_ndebug.o: two_file_test_2.cc
- $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -g0 -c -o $@ $<
two_file_test_main_ndebug.o: two_file_test_main.cc
- $(CXXCOMPILE) -O0 -g0 -c -o $@ $<
+ $(CXXCOMPILE_NFORTIFY) -O0 -g0 -c -o $@ $<
check_PROGRAMS += incremental_test_2
MOSTLYCLEANFILES += two_file_test_tmp_2.o