summaryrefslogtreecommitdiff
path: root/ld/configure.host
diff options
context:
space:
mode:
Diffstat (limited to 'ld/configure.host')
-rw-r--r--ld/configure.host11
1 files changed, 10 insertions, 1 deletions
diff --git a/ld/configure.host b/ld/configure.host
index 3e88c27d2e..885da7e593 100644
--- a/ld/configure.host
+++ b/ld/configure.host
@@ -37,6 +37,15 @@ case "${host}" in
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`'
;;
+*-*-gnu*)
+ # When creating static executables, we ought to use crt0.o instead of crt1.o,
+ # <http://www.gnu.org/software/hurd/open_issues/binutils/testsuite.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`'
+ ;;
+
*-*-netbsd*)
# Different versions of NetBSD with the ELF object format use different
# sets of start/end files.
@@ -194,7 +203,7 @@ sparc64-*-solaris2* | sparcv9-*-solaris2*)
*-*-freebsd* | *-*-kfreebsd*-gnu | *-*-dragonfly*)
;;
-*-*-linux*)
+*-*-linux* | *-*-gnu*)
;;
*-*-netbsd*)