mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
ad77db1c02
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. |
||
---|---|---|
.. | ||
arch | ||
adjsw8.s | ||
fdpic-funcdesc-shared.d | ||
fdpic-funcdesc-shared.s | ||
fdpic-funcdesc-static.d | ||
fdpic-funcdesc-static.s | ||
fdpic-gotfuncdesc-shared.d | ||
fdpic-gotfuncdesc-shared.s | ||
fdpic-gotfuncdesc-static.d | ||
fdpic-gotfuncdesc-static.s | ||
fdpic-gotfuncdesci20-shared.d | ||
fdpic-gotfuncdesci20-shared.s | ||
fdpic-gotfuncdesci20-static.d | ||
fdpic-gotfuncdesci20-static.s | ||
fdpic-goti20-shared.d | ||
fdpic-goti20-shared.s | ||
fdpic-goti20-static.d | ||
fdpic-goti20-static.s | ||
fdpic-gotofffuncdesc-shared.d | ||
fdpic-gotofffuncdesc-shared.s | ||
fdpic-gotofffuncdesc-static.d | ||
fdpic-gotofffuncdesc-static.s | ||
fdpic-gotofffuncdesci20-shared.d | ||
fdpic-gotofffuncdesci20-shared.s | ||
fdpic-gotofffuncdesci20-static.d | ||
fdpic-gotofffuncdesci20-static.s | ||
fdpic-gotoffi20-shared.d | ||
fdpic-gotoffi20-shared.s | ||
fdpic-gotoffi20-static.d | ||
fdpic-gotoffi20-static.s | ||
fdpic-plt-be.d | ||
fdpic-plt-le.d | ||
fdpic-plt.s | ||
fdpic-plti20-be.d | ||
fdpic-plti20-le.d | ||
fdpic-stack-default.d | ||
fdpic-stack-set.d | ||
fdpic-stack-size.d | ||
fdpic-stack.s | ||
ld-r-1.d | ||
ldr1.s | ||
ldr2.s | ||
rd-sh.exp | ||
refdbg-0-dso.d | ||
refdbg-1.d | ||
refdbg.s | ||
refdbglib.s | ||
reloc1.d | ||
reloc1.s | ||
sh1.s | ||
sh2.c | ||
sh-vxworks.exp | ||
sh.exp | ||
shared-1.d | ||
shared-2.d | ||
start.s | ||
sub2l-1.d | ||
sub2l.s | ||
textrel1.s | ||
textrel2.s | ||
tlsbin-0-dso.d | ||
tlsbin-1.d | ||
tlsbin-2.d | ||
tlsbin-3.d | ||
tlsbin-4.d | ||
tlsbin.s | ||
tlsbinpic.s | ||
tlslib.s | ||
tlspic1.s | ||
tlspic2.s | ||
tlspic-1.d | ||
tlspic-2.d | ||
tlspic-3.d | ||
tlspic-4.d | ||
tlstpoff1.s | ||
tlstpoff2.s | ||
tlstpoff-1.d | ||
tlstpoff-2.d | ||
vxworks1-le.dd | ||
vxworks1-lib-le.dd | ||
vxworks1-lib.dd | ||
vxworks1-lib.nd | ||
vxworks1-lib.rd | ||
vxworks1-lib.s | ||
vxworks1-lib.td | ||
vxworks1-static.d | ||
vxworks1.dd | ||
vxworks1.ld | ||
vxworks1.rd | ||
vxworks1.s | ||
vxworks2-static.sd | ||
vxworks2.s | ||
vxworks2.sd | ||
vxworks3-le.dd | ||
vxworks3-lib-le.dd | ||
vxworks3-lib.dd | ||
vxworks3-lib.s | ||
vxworks3.dd | ||
vxworks3.s | ||
vxworks4.d | ||
vxworks4a.s | ||
vxworks4b.s | ||
weak1.d | ||
weak1.s |