Commit Graph

10 Commits

Author SHA1 Message Date
Alan Modra 827041555a Update year range in copyright notice of binutils files 2019-01-01 22:06:53 +10:30
Alan Modra 5acaada745 Make gold testsuite work with CC and CXX specifying -B
The patch allows the gold testsuite to pass when using something like
the following configure line, which works for the rest of the binutils
testsuite.  At least, it does if you don't configure your gcc with any
of the options that force a particular path to as or ld.

gccdir="/home/alan/build/gcc/prev-"
gccsrc="/home/alan/src/gcc.git"
gcctarg="x86_64-linux"
CC="${gccdir}gcc/xgcc -B${gccdir}gcc/" \
CXX="${gccdir}gcc/xg++ -B${gccdir}gcc/ -I${gccdir}$gcctarg/libstdc++-v3/include -I${gccdir}$gcctarg/libstdc++-v3/include/$gcctarg -I${gccsrc}/libstdc++-v3/libsupc++ -L${gccdir}$gcctarg/libstdc++-v3/src/.libs/" \
~/src/binutils-gdb/configure ...

gold's -Bgcctestdir/ option must come before the -B supplied by $CC
or $CXX, in order to pick up the linker we want to test.  Also when
using a not-yet-installed gcc, it is necessary to provide a collect-ld
in gcctestdir/ as otherwise a collect-ld script in -B${gccdir}gcc/
will be used and the wrong linker tested.

Besides this, the patch fixes some bugs: The $COMPILE -D_FORTIFY_SOURCE
edit was wrong (but worked for usual values), and the $CXXLINK_S edit
unnecessarily but harmlessly used extra backslash quoting.  See
posix shell documentation regarding quoting, or
www.gnu.org/software/bash/manual/bashref.html#Command-Substitution

Also, -Bgcctestdir/ in one place makes it less likely a new test will
be added that accidentally lacks the option.

	* Makefile.am (gcctestdir1/ld): Use $@ and absolute paths.
	(gcctestdir1/collect-ld): New.
	(ld1_DEPENDENCIES): Add gcctestdir1/collect-ld.
	(ld1_LDFLAGS): Remove -Bgcctestdir1/.
	(editcc1, ld1_LINK): Define.
	(gcctestdir2/ld, gcctestdir2/collect-ld, ld2_DEPENDENCIES),
	(ld2_LDFLAGS, editcc2, ld2_LINK),
	(ld1_r_DEPENDENCIES, ld1_r_LDFLAGS, ld1_r_LINK),
	(gcctestdir2-r/ld, gcctestdir2-r/collect-ld, ld2_r_DEPENDENCIES),
	(ld2_r_LDFLAGS, editcc2r, ld2_r_LINK),
	(gcctestdir3/ld, gcctestdir3/collect-ld, ld3_DEPENDENCIES),
	(ld3_LDFLAGS, editcc3, ld3_LINK),
	(gcctestdir4/ld, gcctestdir4/collect-ld, ld4_DEPENDENCIES),
	(ld4_LDFLAGS, editcc4, ld4_LINK): Similarly.
	* Makefile.in: Regenerate.
	* testsuite/Makefile.am (editcc): Define sed command to put
	our -B option first.  Remove other occurrences of -Bgcctestdir/
	throughout file.
	(editcc1): Define for -D_FORTIFY_SOURCE stripping.
	(editcc2): Define for -static-libgcc/libstdc++ stripping.
	(LINK1, CXXLINK1): Don't use CCLD or CXXLD.
	(CCLD, CXXLD, COMPILE, LINK, CXXCOMPILE, CXXLINK, CXXLINK_S): Define
	using editcc macros.
	(gcctestdir/collect-ld): New rule, add as a dependency of..
	(gcctestdir/ld): ..this.  Use $@ and abs_top_buildir.
	(gcctestdir/as): Use $@.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/incremental_test.sh (actual): Match collect-ld too.
2018-11-08 11:20:34 +10:30
Alan Modra 219d1afa89 Update year range in copyright notice of binutils files 2018-01-03 17:49:56 +10:30
Alan Modra 2571583aed Update year range in copyright notice of all files. 2017-01-02 14:08:56 +10:30
Alan Modra 6f2750feaf Copyright update for binutils 2016-01-01 23:00:01 +10:30
Alan Modra b90efa5b79 ChangeLog rotatation and copyright year update 2015-01-02 00:53:45 +10:30
Alan Modra 4b95cf5c0c Update copyright years 2014-03-05 22:16:15 +10:30
Cary Coutant 8c21d9d382 * debug.h (DEBUG_INCREMENTAL): New flag.
(debug_string_to_enum): Add DEBUG_INCREMENTAL).
	* gold.cc (queue_initial_tasks): Check parameters for incremental link
	mode.
	* incremental.cc (report_command_line): Ignore all forms of
	--incremental.
	* layout.cc (Layout::Layout): Check parameters for incremental link
	mode.
	* options.cc (General_options::parse_incremental): New function.
	(General_options::parse_no_incremental): New function.
	(General_options::parse_incremental_full): New function.
	(General_options::parse_incremental_update): New function.
	(General_options::incremental_mode_): New data member.
	(General_options::finalize): Check incremental_mode_.
	* options.h (General_options): Update help text for --incremental.
	Add --no-incremental, --incremental-full, --incremental-update.
	(General_options::Incremental_mode): New enum type.
	(General_options::incremental_mode): New function.
	(General_options::incremental_mode_): New data member.
	* parameters.cc (Parameters::incremental_mode_): New data member.
	(Parameters::set_options): Set incremental_mode_.
	(Parameters::set_incremental_full): New function.
	(Parameters::incremental): New function.
	(Parameters::incremental_update): New function.
	(set_parameters_incremental_full): New function.
	* parameters.h (Parameters::set_incremental_full): New function.
	(Parameters::incremental): New function.
	(Parameters::incremental_update): New function.
	(Parameters::incremental_mode_): New data member.
	(set_parameters_incremental_full): New function.
	* plugin.cc (Plugin_manager::add_input_file): Check parameters for
	incremental link mode.
	* reloc.cc (Sized_relobj::do_read_relocs): Likewise.
	(Sized_relobj::do_relocate_sections): Likewise.
	* testsuite/Makefile.am (incremental_test): Use --incremental-full
	option.
	* testsuite/Makefile.in: Regenerate.
	* testsuite/incremental_test.sh: Filter all forms of --incremental.
2010-10-14 22:10:22 +00:00
Cary Coutant d1238d12e3 gold/ChangeLog:
* testsuite/incremental_test.sh: Rewrite.
	* testsuite/incremental_test_1.c: Rewrite.
	* testsuite/incremental_test_2.c: Rewrite.
2010-08-12 22:18:15 +00:00
Rafael Ávila de Espíndola 325e6408a8 2009-12-02 Rafael Avila de Espindola <espindola@google.com>
* testsuite/Makefile.am: Add the incremental_test.sh test.
	* testsuite/incremental_test.sh: New.
	* testsuite/incremental_test_1.c: New.
	* testsuite/incremental_test_2.c: New.
2009-12-02 14:51:22 +00:00