Paolo Bonzini <bonz...@gnu.org> writes:

> On 11/07/2011 07:15 PM, Rainer Orth wrote:
>> Bernd Schmidt<ber...@codesourcery.com>  writes:
>> 
>>> On 11/03/11 20:20, Rainer Orth wrote:
>>>>
>>>>    * config/c6x/t-elf (LIB2ADDEH): Set.
>>>>    * config/c6x/t-c6x-elf: Remove.
>>>
>>> It builds now, but parts of libgcc are missing. There's no sign of
>>> muldf3, for examples.
>> 
>> I found the problem: before, LIB2ADD was passed in from gcc/config via
>> libgcc.mvars, and added to in t-softfp.  Now the order of the t-*
>> fragments has been kept the same, with the assignment to LIB2ADD in
>> c6x/t-elf overriding what has been constructed by t-softfp before.
>> 
>> The following patch did the trick for me, could you give it a try?
>
> Looks ok, but these look like they could also be broken.

Sorry it took me so long, but this weekend I finally had a close look
at both the explicit settings of LIB2ADD and LIB2FUNCS_EXCLUDE.  The
latter are unproblematic since the files affected are disjunct.  For
LIB2ADD, here are the problematic cases.  All others explicitly setting
LIB2ADD have no issues since there are no t-* fragments setting LIB2ADD
before.

i386/t-darwin64:LIB2ADD = $(srcdir)/config/darwin-64.c

  The file is currently unused, was lost in the migration for
  x86_64-*-darwin*.  The same settings are already in i386/t-darwin, so
  the file is superfluous and can be removed.

iq2000/t-iq2000:LIB2ADD = $(srcdir)/udivmod.c \

  This file is unused, now restored, otherwise no problem.

pa/t-pa64:LIB2ADD = $(srcdir)/config/pa/quadlib.c

  This overrides pa/t-hpux, originally we had pa/t-pa64 pa/t-pa-hpux
  without overrides, but the result is ok.

rs6000/t-darwin64:LIB2ADD = $(srcdir)/config/rs6000/darwin-tramp.S \

  Overrides rs6000/t-darwin, as it did before the move.

rs6000/t-lynx:LIB2ADD = $(srcdir)/config/rs6000/tramp.S

  This file is currently unused, but necessary.  t-lynx is also missing,
  but no settings left.

rs6000/t-netbsd:LIB2ADD = $(srcdir)/config/rs6000/tramp.S

  unused, necessary

sh/t-netbsd:LIB2ADD =

  The override poses no problem, but is unnecessary since nothing sets
  LIB2ADD before.

t-vxworks:LIB2ADD = $(srcdir)/config/vxlib.c $(srcdir)/config/vxlib-tls.c

  Ok, but missing from powerpc-wrs-vxworks which didn't add to tmake_file.

The following patch implements those observations.

Ok for mainline?

        Rainer


2011-11-20  Rainer Orth  <r...@cebitec.uni-bielefeld.de>

        libgcc:
        * config.host (iq2000*-*-elf*): Add iq2000/t-iq2000 to tmake_file.
        (powerpc-*-netbsd*): Add rs6000/t-netbsd to tmake_file.
        (powerpc-wrs-vxworks, powerpc-wrs-vxworksae): Add to tmake_file.
        (powerpc-*-lynxos*): Add rs6000/t-lynx to tmake_file.
        * config/i386/t-darwin64: Remove.
        * config/sh/t-netbsd (LIB2ADD): Remove.

# HG changeset patch
# Parent 5acb7cf614f2b6be2dd842aa54595488a6283198
Fix LIB2ADD overrides in libgcc

diff --git a/libgcc/config.host b/libgcc/config.host
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -672,7 +672,7 @@ ia64-hp-*vms*)
 	md_unwind_header=ia64/vms-unwind.h
 	;;
 iq2000*-*-elf*)
-	tmake_file=t-fdpbit
+	tmake_file="iq2000/t-iq2000 t-fdpbit"
 	# Don't use default.
 	extra_parts=
         ;;
@@ -856,7 +856,7 @@ powerpc-*-freebsd*)
 	extra_parts="$extra_parts crtbeginT.o ecrti.o ecrtn.o ncrti.o ncrtn.o"
 	;;
 powerpc-*-netbsd*)
-	tmake_file="$tmake_file rs6000/t-crtstuff"
+	tmake_file="$tmake_file rs6000/t-netbsd rs6000/t-crtstuff"
 	;;
 powerpc-*-eabispe*)
 	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-crtstuff t-crtstuff-pic"
@@ -896,10 +896,10 @@ powerpc-*-linux* | powerpc64-*-linux*)
 	md_unwind_header=rs6000/linux-unwind.h
 	;;
 powerpc-wrs-vxworks|powerpc-wrs-vxworksae)
-	tmake_file="rs6000/t-ppccomm-ldbl t-fdpbit"
+	tmake_file="$tmake_file rs6000/t-ppccomm-ldbl t-fdpbit"
 	;;
 powerpc-*-lynxos*)
-	tmake_file="$tmake_file t-fdpbit"
+	tmake_file="$tmake_file rs6000/t-lynx t-fdpbit"
 	;;
 powerpcle-*-elf*)
 	tmake_file="${tmake_file} rs6000/t-ppccomm rs6000/t-ppccomm-ldbl rs6000/t-crtstuff t-crtstuff-pic t-fdpbit"
diff --git a/libgcc/config/i386/t-darwin64 b/libgcc/config/i386/t-darwin64
deleted file mode 100644
--- a/libgcc/config/i386/t-darwin64
+++ /dev/null
@@ -1,2 +0,0 @@
-LIB2_SIDITI_CONV_FUNCS = yes
-LIB2ADD = $(srcdir)/config/darwin-64.c
diff --git a/libgcc/config/sh/t-netbsd b/libgcc/config/sh/t-netbsd
--- a/libgcc/config/sh/t-netbsd
+++ b/libgcc/config/sh/t-netbsd
@@ -1,5 +1,3 @@
 LIB1ASMFUNCS_CACHE = _ic_invalidate
 
-LIB2ADD =
-
 HOST_LIBGCC2_CFLAGS += -mieee

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

Reply via email to