binutils-gdb/libctf
Alan Modra ad77db1c02 CC_FOR_TARGET et al
The top level Makefile, the ld Makefile and others, define
CC_FOR_TARGET to be a compiler for the binutils target machine.  This
is the compiler that should be used for almost all tests with C
source.  There are _FOR_TARGET versions of CFLAGS, CXX, and CXXFLAGS
too.  This was all supposed to work with the testsuite .exp files
using CC for the target compiler, and CC_FOR_HOST for the host
compiler, with the makefiles passing CC=$CC_FOR_TARGET and
CC_FOR_HOST=$CC to the runtest invocation.

One exception to the rule of using CC_FOR_TARGET is the native-only ld
bootstrap test, which uses the newly built ld to link a copy of
itself.  Since the files being linked were created with the host
compiler, the boostrap test should use CC and CFLAGS, in case some
host compiler option provides needed libraries automatically.
However, bootstrap.exp used CC where it should have used CC_FOR_HOST.
I set about fixing that problem, then decided that playing games in
the makefiles with CC was a bad idea.  Not only is it confusing, but
other dejagnu code knows about CC_FOR_TARGET.  See dejagnu/target.exp.

So this patch gets rid of the makefile variable renaming and changes
all the .exp files to use the correct _FOR_TARGET variables.
CC_FOR_HOST and CFLAGS_FOR_HOST disappear.  A followup patch will
correct bootstrap.exp to use CFLAGS, and a number of other things I
noticed.

binutils/
	* testsuite/lib/binutils-common.exp (run_dump_test): Use
	CC_FOR_TARGET and CFLAGS_FOR_TARGET rather than CC and CFLAGS.
ld/
	* Makefile.am (check-DEJAGNU): Don't set CC to CC_FOR_TARGET
	and similar.  Pass variables with unchanged names.  Don't set
	CC_FOR_HOST or CFLAGS_FOR_HOST.
	* Makefile.in: Regenerate.
	* testsuite/config/default.exp: Update default CC and similar.
	(compiler_supports, plug_opt): Use CC_FOR_TARGET.
	* testsuite/ld-cdtest/cdtest.exp: Replace all uses of CC with
	CC_FOR_TARGET, and similarly for CFLAGS, CXX and CXXFLAGS.
	* testsuite/ld-auto-import/auto-import.exp: Likewise.
	* testsuite/ld-cygwin/exe-export.exp: Likewise.
	* testsuite/ld-elf/dwarf.exp: Likewise.
	* testsuite/ld-elf/indirect.exp: Likewise.
	* testsuite/ld-elf/shared.exp: Likewise.
	* testsuite/ld-elfcomm/elfcomm.exp: Likewise.
	* testsuite/ld-elfvers/vers.exp: Likewise.
	* testsuite/ld-elfvsb/elfvsb.exp: Likewise.
	* testsuite/ld-elfweak/elfweak.exp: Likewise.
	* testsuite/ld-gc/gc.exp: Likewise.
	* testsuite/ld-ifunc/ifunc.exp: Likewise.
	* testsuite/ld-mn10300/mn10300.exp: Likewise.
	* testsuite/ld-pe/pe-compile.exp: Likewise.
	* testsuite/ld-pe/pe-run.exp: Likewise.
	* testsuite/ld-pe/pe-run2.exp: Likewise.
	* testsuite/ld-pie/pie.exp: Likewise.
	* testsuite/ld-plugin/lto.exp: Likewise.
	* testsuite/ld-plugin/plugin.exp: Likewise.
	* testsuite/ld-scripts/crossref.exp: Likewise.
	* testsuite/ld-selective/selective.exp: Likewise.
	* testsuite/ld-sh/sh.exp: Likewise.
	* testsuite/ld-shared/shared.exp: Likewise.
	* testsuite/ld-srec/srec.exp: Likewise.
	* testsuite/ld-undefined/undefined.exp: Likewise.
	* testsuite/ld-unique/unique.exp: Likewise.
	* testsuite/ld-x86-64/tls.exp: Likewise.
	* testsuite/lib/ld-lib.exp: Likewise.
libctf/
	* Makefile.am (check-DEJAGNU): Don't set CC to CC_FOR_TARGET.
	Pass CC and CC_FOR_TARGET.  Don't set CC_FOR_HOST.
	* Makefile.in: Regenerate.
	* testsuite/config/default.exp: Update default CC and similar.
	* testsuite/lib/ctf-lib.exp (run_native_host_cmd): Use CC rather
	than CC_FOR_HOST.
	(run_lookup_test): Use CC_FOR_TARGET and CFLAGS_FOR_TARGET.
2021-09-03 16:26:09 +09:30
..
testsuite CC_FOR_TARGET et al 2021-09-03 16:26:09 +09:30
.gitignore libctf: restructure error handling to reduce relocations 2020-07-22 17:57:20 +01:00
aclocal.m4 Implement a workaround for GNU mak jobserver 2021-01-12 05:45:44 -08:00
ChangeLog Add markers for 2.37 branch 2021-07-03 14:50:57 +01:00
ChangeLog-2020 libctf: fix old ChangeLog typo 2021-01-05 14:53:40 +00:00
config.h.in libctf, dedup: add deduplicator 2020-07-22 18:02:19 +01:00
configure haiku tidy 2021-09-03 11:45:58 +09:30
configure.ac libctf: fix ELF-in-BFD checks in the presence of ASAN 2021-03-25 16:32:51 +00:00
ctf-archive.c libctf: fix GNU style for do {} while 2021-03-18 12:37:55 +00:00
ctf-create.c libctf, include: support an alternative encoding for nonrepresentable types 2021-05-06 09:30:59 +01:00
ctf-decl.c libctf, ld: dump enums: generally improve dump formatting 2021-01-05 14:53:39 +00:00
ctf-decls.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-dedup.c Use htab_eq_string in libctf 2021-05-09 12:28:32 +09:30
ctf-dump.c libctf, dump: do not emit size or alignment if it would error 2021-03-25 16:32:46 +00:00
ctf-endian.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-error.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-hash.c Use htab_eq_string in libctf 2021-05-09 12:28:32 +09:30
ctf-impl.h Use htab_eq_string in libctf 2021-05-09 12:28:32 +09:30
ctf-inlines.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-intl.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-labels.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-link.c libctf: fix some tabdamage and move some code around 2021-03-18 12:37:52 +00:00
ctf-lookup.c libctf: don't dereference out-of-bounds locations in the qualifier hashtab 2021-03-25 16:32:49 +00:00
ctf-open-bfd.c libctf: make ctf_bfdopen_ctfsect a debugger entry point 2021-03-25 16:32:49 +00:00
ctf-open.c ubsan: libctf: applying zero offset to null pointer 2021-09-03 11:45:58 +09:30
ctf-qsort_r.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-serialize.c libctf, serialize: functions with no args have a NULL dtd_vlen 2021-03-25 16:32:48 +00:00
ctf-sha1.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-sha1.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-string.c libctf: eliminate dtd_u, part 4: enums 2021-03-18 12:40:40 +00:00
ctf-subr.c Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
ctf-types.c libctf, include: support an alternative encoding for nonrepresentable types 2021-05-06 09:30:59 +01:00
ctf-util.c libctf, include: support unnamed structure members better 2021-01-05 14:53:40 +00:00
elf.h Update year range in copyright notice of binutils files 2021-01-01 10:31:05 +10:30
libctf.ver libctf, include: support an alternative encoding for nonrepresentable types 2021-05-06 09:30:59 +01:00
Makefile.am CC_FOR_TARGET et al 2021-09-03 16:26:09 +09:30
Makefile.in CC_FOR_TARGET et al 2021-09-03 16:26:09 +09:30
NEWS libctf, include: support an alternative encoding for nonrepresentable types 2021-05-06 09:30:59 +01:00
swap.h libctf: fix GNU style for do {} while 2021-03-18 12:37:55 +00:00