This is the mail archive of the binutils@sources.redhat.com 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]

Re: How to determine cause of ld testsuite failures?


On Fri, Feb 16, 2001 at 06:25:24PM +1100, Alan Modra wrote:
> Check HOSTING_CRT0 in ld/Makefile.  You probably need some changes to
> ld/configure.host or something.

Yep, I keep digging around and then remembered I had an old patch I dug
up (should have emailed back once I found this).

With an appropiate ChangeLog entry, how does this diff look for the 2_11
branch (and mainline)?


Index: ld/configure.host
===================================================================
RCS file: /cvs/src/src/ld/configure.host,v
retrieving revision 1.11
diff -u -r1.11 configure.host
--- configure.host	2001/01/12 12:43:10	1.11
+++ configure.host	2001/02/16 08:22:01
@@ -40,26 +40,12 @@
   HOSTING_LIBS='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
   ;;
 
-i[3456]86-*-freebsdelf*)
+i[3456]86-*-bsd* | i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12]\.* | i[34567]86-*-freebsd*aout* | i[3456]86-*-netbsd*)
   # The new BSD `make' has a bug: it doesn't pass empty arguments in
   # shell commands.  So we need to make this value non-empty in order
   # for the genscripts.sh call to work.  There's nothing magic about
   # the value `/lib'; it's just a dummy.
   NATIVE_LIB_DIRS=/lib
-  # Older versions of gcc do not use a specs file.  In those cases,
-  # gcc -print-file-name=specs will simply print specs.  We create a
-  # dummy specs files to handle this.
-  echo "-dynamic-linker /usr/libexec/ld-elf.so.1" > specs
-  HOSTING_CRT0='-dynamic-linker `egrep "ld[^ ]*\.so" \`${CC} --print-file-name=specs\` | 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='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
-  ;;
-
-i[3456]86-*-bsd* | i[3456]86-*-freebsd* | i[3456]86-*-netbsd*)
-  # The new BSD `make' has a bug: it doesn't pass empty arguments in
-  # shell commands.  So we need to make this value non-empty in order
-  # for the genscripts.sh call to work.  There's nothing magic about
-  # the value `/lib'; it's just a dummy.
-  NATIVE_LIB_DIRS=/lib
   HOSTING_CRT0=/usr/lib/crt0.o
   ;;
 
@@ -220,6 +206,16 @@
 sparc64-*-linux-gnu*)
   HOSTING_CRT0='-dynamic-linker /lib64/ld-linux.so.2 `${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='`if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `if [ -f ../gcc/libgcc.a ] ; then echo ../gcc/libgcc.a ; else ${CC} -print-libgcc-file-name; fi` `if [ -f ../gcc/crtend.o ]; then echo ../gcc/crtend.o; else ${CC} --print-file-name=crtend.o; fi` `${CC} --print-file-name=crtn.o`'
+  ;;
+
+*-*-freebsd*)
+  NATIVE_LIB_DIRS=/usr/lib
+  # Older versions of gcc do not use a specs file.  In those cases,
+  # gcc -print-file-name=specs will simply print specs.  We create a
+  # dummy specs files to handle this.
+  echo "-dynamic-linker `${CC} --print-file-name=ld-elf.so.1`" > specs
+  HOSTING_CRT0='-dynamic-linker `${CC} --print-file-name=ld-elf.so.1` `${CC} --print-file-name=crt1.o` `${CC} --print-file-name=crti.o` `${CC} --print-file-name=crtbegin.o`'
+  HOSTING_LIBS='`${CC} -print-libgcc-file-name` -L`dirname \`${CC} --print-file-name=libc.so\`` -lc `${CC} -print-libgcc-file-name` `${CC} --print-file-name=crtend.o` `${CC} --print-file-name=crtn.o`'
   ;;
 
 esac


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