This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Run more ld tests when not native


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


>From abc163a4647f77bfa449e09da4a85a71e747cf4c Mon Sep 17 00:00:00 2001
From: Thomas Schwinge <thomas@codesourcery.com>
Date: Fri, 29 Jun 2018 21:05:29 +0200
Subject: [PATCH] [ld, hurd] Remove 'ld-elf/elf.exp' XFAILs

... as a follow-up to commit d98164028637041c5de99af0d057bde3f168a8a8 "Run more
ld tests when not native", which replaced by a proper solution the following
mess before present in 'ld/configure.host':

    -*-*-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='[...]'
    -  HOSTING_LIBS='[...]'

	ld/
	* testsuite/ld-elf/elf.exp: Remove Hurd XFAILs.
---
 ld/ChangeLog                | 4 ++++
 ld/testsuite/ld-elf/elf.exp | 7 -------
 2 files changed, 4 insertions(+), 7 deletions(-)

diff --git a/ld/ChangeLog b/ld/ChangeLog
index c213622ff2..508858f2af 100644
--- a/ld/ChangeLog
+++ b/ld/ChangeLog
@@ -1,3 +1,7 @@
+2019-02-14  Thomas Schwinge  <thomas@codesourcery.com>
+
+	* testsuite/ld-elf/elf.exp: Remove Hurd XFAILs.
+
 2019-02-12  Nick Clifton  <nickc@redhat.com>
 
 	* po/fr.po: Updated French translation.
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index 60a261b86d..4a5ef8a219 100644
--- a/ld/testsuite/ld-elf/elf.exp
+++ b/ld/testsuite/ld-elf/elf.exp
@@ -257,13 +257,6 @@ if { [istarget *-*-linux*]
     ]
 }
 
-# <http://www.gnu.org/software/hurd/open_issues/binutils.html#static>
-# Be cautious to not XFAIL for *-*-linux-gnu*, *-*-kfreebsd-gnu*, etc.
-switch -regexp $target_triplet {
-    ^\[^-\]*-\[^-\]*-gnu.*$ {
-	set xfails "*-*-*"
-    }
-}
 run_ld_link_exec_tests $array_tests_static $xfails
 
 catch "exec rm -f tmpdir/preinit tmpdir/init tmpdir/fini tmpdir/init-mixed" status
-- 
2.19.2


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]