Run more ld tests when not native

Thomas Schwinge thomas@codesourcery.com
Thu Feb 14 16:53:00 GMT 2019


Hi!

On Tue, 3 Jan 2017 00:04:53 +1030, Alan Modra <amodra@gmail.com> wrote:
> Many of the ld tests are not run for cross builds, in some cases
> because the test needs to run a newly linked executable, and in others
> simply because it was easier to write the test for native only.  Even
> when a test needs to run, it's good to compile and link to exercise
> the linker.  So that's what this patch does.  I've also rid us of
> the old ld_link procedure with all the HOSTING_CRT0 etc. setup.  It's
> much simpler to just link with $CC.

> --- a/ld/configure.host
> +++ b/ld/configure.host

> -#  HOSTING_CRT0		crt0.o file used for bootstrapping
> -#  HOSTING_LIBS		libraries used for bootstrapping

>  case "${host}" in

> -*-*-gnu*)
> -  # When creating static executables, we ought to use crt0.o instead of crt1.o,
> -  # <http://www.gnu.org/software/hurd/open_issues/binutils.html#static>,
> -  # but the testing infrastructure is not prepared for that.  This is not
> -  # relevant for most tests, and the few remaining ones have been XFAILed.
> -  HOSTING_CRT0='-dynamic-linker `${CC} --help --verbose 2>&1 | egrep "ld[^ ]*\.so" | sed -e "s,.*-dynamic-linker[ 	][ 	]*\(.*/ld[^ ]*\.so[^ 	]*\).*,\1,"` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `if [ -f ../gcc/crtbegin.o ]; then echo ../gcc/crtbegin.o; else ${CC} --print-file-name=crtbegin.o; fi`'
> -  HOSTING_LIBS='-L`dirname \`${CC} --print-file-name=libc.so\`` '"$HOSTING_LIBS"' `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
> -  ;;

Belatedly, thanks for cleaning up (that is, removing) this mess.  Thus
pushed to master the attached commit
abc163a4647f77bfa449e09da4a85a71e747cf4c "[ld, hurd] Remove
'ld-elf/elf.exp' XFAILs".


Grüße
 Thomas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-ld-hurd-Remove-ld-elf-elf.exp-XFAILs.patch
Type: text/x-diff
Size: 1957 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20190214/f106883b/attachment.bin>


More information about the Binutils mailing list