diff mbox

[build] Cleanup rs6000/t-ppccomm configurations (PR other/51022)

Message ID yddfwhhxy4p.fsf@manam.CeBiTec.Uni-Bielefeld.DE
State New
Headers show

Commit Message

Rainer Orth Nov. 21, 2011, 4:01 p.m. UTC
As reported in the PR, powerpc-rtems bootstrap (and certainly several
other powerpc targets) is currently broken since rs6000/ibm-ldouble.c
appears twice in LIB2ADD, once from rs6000/t-ppccomm and
rs6000/t-ppccomm-ldbl, which confuses make.

It took me a while to understand how we got into that situation.  Here's
what I found: before the toplevel libgcc move started, we had both
gcc/config/rs6000/t-ppccomm and libgcc/config/rs6000/t-ppccomm.  The
second is a superset of the first, in that it contains LIB2ADD_ST +=
crtsavfpr.S crtresfpr.S and many other similar files.

The set of targets using the gcc and libgcc files differs:

	gcc/config/rs6000/t-ppccomm	libgcc/config/rs6000/t-ppccomm

	  powerpc-*-freebsd*		powerpc-*-freebsd*
	  powerpc-*-eabispe*		powerpc-*-eabispe*
	  powerpc-*-eabisimaltivec*
	  powerpc-*-eabisim*
	  powerpc-*-elf*
	  powerpc-*-eabialtivec*
	  powerpc-xilinx-eabi*
	  powerpc-*-eabi*		powerpc-*-eabi*
	  powerpc-*-rtems*
	  powerpc-*-linux*		powerpc-*-linux*
	    | powerpc64-*-linux*	  | powerpc64-*-linux*
	  powerpc-*-gnu-gnualtivec*
	  powerpc-*-gnu*
	  powerpc-wrs-vxworks
	    | powerpc-wrs-vxworksae
	  powerpcle-*-elf*
	  powerpcle-*-eabisim*
	  powerpcle-*-eabi*

When I started the move, I introduced
libgcc/config/rs6000/t-ppccomm-ldbl since I couldn't simply use the
existing t-ppccomm file which is used on a far smaller set of targets.

To reach an end state matching what we had before the move, I propose to
instead create a separate t-savresfgpr (for {sav,res}{fpr,gpr,gprctr})
that only contains the additional files and add that to the targets that
had it before, and remove t-ppccomm-ldbl to avoid the duplication.

When checking this, I noticed that powerpc-vxworks had lost
rs6000/t-ppccomm, which the patch adds back.

I'd really appreciate if some affected targets could fully test the
patch.

Thanks.
        Rainer


2011-11-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	PR other/51022
	* config/rs6000/t-savresfgpr: New file.
	* config/rs6000/t-ppccomm (LIB2ADD_ST): Remove all but
	$(srcdir)/config/rs6000/eabi.S.
	* config/rs6000/t-ppccomm-ldbl: Remove.
	* config.host (powerpc-*-freebsd*): Add rs6000/t-savresfgpr to
	tmake_file.
	(powerpc-*-eabispe*): Likewise.
	(powerpc-*-eabi*): Likewise.
	(powerpc-*-linux*, powerpc64-*-linux*): Likewise.
	(powerpc-wrs-vxworks, powerpc-wrs-vxworksae): Add rs6000/t-ppccomm
	to tmake_file, remove rs6000/t-ppccomm-ldbl.
	(powerpc-*-eabisimaltivec*): Remove rs6000/t-ppccomm-ldbl from
	tmake_file.
	(powerpc-*-eabisim*): Likewise.
	(powerpc-*-elf*): Likewise.
	(powerpc-*-eabialtivec*): Likewise.
	(powerpc-xilinx-eabi*): Likewise.
	(powerpc-*-rtems*): Likewise.
	(powerpcle-*-elf*): Likewise.
	(powerpcle-*-eabisim*): Likewise.
	(powerpcle-*-eabi*): Likewise.

Comments

Paolo Bonzini Nov. 21, 2011, 5:23 p.m. UTC | #1
On 11/21/2011 05:01 PM, Rainer Orth wrote:
> As reported in the PR, powerpc-rtems bootstrap (and certainly several
> other powerpc targets) is currently broken since rs6000/ibm-ldouble.c
> appears twice in LIB2ADD, once from rs6000/t-ppccomm and
> rs6000/t-ppccomm-ldbl, which confuses make.
>
> It took me a while to understand how we got into that situation.  Here's
> what I found: before the toplevel libgcc move started, we had both
> gcc/config/rs6000/t-ppccomm and libgcc/config/rs6000/t-ppccomm.  The
> second is a superset of the first, in that it contains LIB2ADD_ST +=
> crtsavfpr.S crtresfpr.S and many other similar files.
>
> The set of targets using the gcc and libgcc files differs:
>
> 	gcc/config/rs6000/t-ppccomm	libgcc/config/rs6000/t-ppccomm
>
> 	  powerpc-*-freebsd*		powerpc-*-freebsd*
> 	  powerpc-*-eabispe*		powerpc-*-eabispe*
> 	  powerpc-*-eabisimaltivec*
> 	  powerpc-*-eabisim*
> 	  powerpc-*-elf*
> 	  powerpc-*-eabialtivec*
> 	  powerpc-xilinx-eabi*
> 	  powerpc-*-eabi*		powerpc-*-eabi*
> 	  powerpc-*-rtems*
> 	  powerpc-*-linux*		powerpc-*-linux*
> 	    | powerpc64-*-linux*	  | powerpc64-*-linux*
> 	  powerpc-*-gnu-gnualtivec*
> 	  powerpc-*-gnu*
> 	  powerpc-wrs-vxworks
> 	    | powerpc-wrs-vxworksae
> 	  powerpcle-*-elf*
> 	  powerpcle-*-eabisim*
> 	  powerpcle-*-eabi*
>
> When I started the move, I introduced
> libgcc/config/rs6000/t-ppccomm-ldbl since I couldn't simply use the
> existing t-ppccomm file which is used on a far smaller set of targets.
>
> To reach an end state matching what we had before the move, I propose to
> instead create a separate t-savresfgpr (for {sav,res}{fpr,gpr,gprctr})
> that only contains the additional files and add that to the targets that
> had it before, and remove t-ppccomm-ldbl to avoid the duplication.
>
> When checking this, I noticed that powerpc-vxworks had lost
> rs6000/t-ppccomm, which the patch adds back.
>
> I'd really appreciate if some affected targets could fully test the
> patch.

Wrong patch attached.

Paolo
David Edelsohn Nov. 28, 2011, 1:36 a.m. UTC | #2
On Mon, Nov 21, 2011 at 11:01 AM, Rainer Orth
<ro@cebitec.uni-bielefeld.de> wrote:
> As reported in the PR, powerpc-rtems bootstrap (and certainly several
> other powerpc targets) is currently broken since rs6000/ibm-ldouble.c
> appears twice in LIB2ADD, once from rs6000/t-ppccomm and
> rs6000/t-ppccomm-ldbl, which confuses make.
>
> It took me a while to understand how we got into that situation.  Here's
> what I found: before the toplevel libgcc move started, we had both
> gcc/config/rs6000/t-ppccomm and libgcc/config/rs6000/t-ppccomm.  The
> second is a superset of the first, in that it contains LIB2ADD_ST +=
> crtsavfpr.S crtresfpr.S and many other similar files.
>
> The set of targets using the gcc and libgcc files differs:
>
>        gcc/config/rs6000/t-ppccomm     libgcc/config/rs6000/t-ppccomm
>
>          powerpc-*-freebsd*            powerpc-*-freebsd*
>          powerpc-*-eabispe*            powerpc-*-eabispe*
>          powerpc-*-eabisimaltivec*
>          powerpc-*-eabisim*
>          powerpc-*-elf*
>          powerpc-*-eabialtivec*
>          powerpc-xilinx-eabi*
>          powerpc-*-eabi*               powerpc-*-eabi*
>          powerpc-*-rtems*
>          powerpc-*-linux*              powerpc-*-linux*
>            | powerpc64-*-linux*          | powerpc64-*-linux*
>          powerpc-*-gnu-gnualtivec*
>          powerpc-*-gnu*
>          powerpc-wrs-vxworks
>            | powerpc-wrs-vxworksae
>          powerpcle-*-elf*
>          powerpcle-*-eabisim*
>          powerpcle-*-eabi*
>
> When I started the move, I introduced
> libgcc/config/rs6000/t-ppccomm-ldbl since I couldn't simply use the
> existing t-ppccomm file which is used on a far smaller set of targets.
>
> To reach an end state matching what we had before the move, I propose to
> instead create a separate t-savresfgpr (for {sav,res}{fpr,gpr,gprctr})
> that only contains the additional files and add that to the targets that
> had it before, and remove t-ppccomm-ldbl to avoid the duplication.
>
> When checking this, I noticed that powerpc-vxworks had lost
> rs6000/t-ppccomm, which the patch adds back.
>
> I'd really appreciate if some affected targets could fully test the
> patch.
>
> Thanks.
>        Rainer
>
>
> 2011-11-20  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
>
>        PR other/51022
>        * config/rs6000/t-savresfgpr: New file.
>        * config/rs6000/t-ppccomm (LIB2ADD_ST): Remove all but
>        $(srcdir)/config/rs6000/eabi.S.
>        * config/rs6000/t-ppccomm-ldbl: Remove.
>        * config.host (powerpc-*-freebsd*): Add rs6000/t-savresfgpr to
>        tmake_file.
>        (powerpc-*-eabispe*): Likewise.
>        (powerpc-*-eabi*): Likewise.
>        (powerpc-*-linux*, powerpc64-*-linux*): Likewise.
>        (powerpc-wrs-vxworks, powerpc-wrs-vxworksae): Add rs6000/t-ppccomm
>        to tmake_file, remove rs6000/t-ppccomm-ldbl.
>        (powerpc-*-eabisimaltivec*): Remove rs6000/t-ppccomm-ldbl from
>        tmake_file.
>        (powerpc-*-eabisim*): Likewise.
>        (powerpc-*-elf*): Likewise.
>        (powerpc-*-eabialtivec*): Likewise.
>        (powerpc-xilinx-eabi*): Likewise.
>        (powerpc-*-rtems*): Likewise.
>        (powerpcle-*-elf*): Likewise.
>        (powerpcle-*-eabisim*): Likewise.
>        (powerpcle-*-eabi*): Likewise.

Okay.

I was hoping that other targets affected by the patch would test it as well.

Thanks, David
Alan Modra Nov. 28, 2011, 3:26 a.m. UTC | #3
On Sun, Nov 27, 2011 at 08:36:38PM -0500, David Edelsohn wrote:
> I was hoping that other targets affected by the patch would test it as well.

powerpc-linux and powerpc64-linux look good.
Rainer Orth Nov. 28, 2011, 4:15 p.m. UTC | #4
Alan Modra <amodra@gmail.com> writes:

> On Sun, Nov 27, 2011 at 08:36:38PM -0500, David Edelsohn wrote:
>> I was hoping that other targets affected by the patch would test it as well.
>
> powerpc-linux and powerpc64-linux look good.

Thanks for the confirmation.  However, Andreas Tobler pointed out in
private mail that I'd missed to reference rs6000/t-linux64 during the
libgcc migration.  Strange that this seems to have no ill effect.

	Rainer
Alan Modra Nov. 29, 2011, 4:03 a.m. UTC | #5
On Mon, Nov 28, 2011 at 05:15:08PM +0100, Rainer Orth wrote:
> Alan Modra <amodra@gmail.com> writes:
> 
> > On Sun, Nov 27, 2011 at 08:36:38PM -0500, David Edelsohn wrote:
> >> I was hoping that other targets affected by the patch would test it as well.
> >
> > powerpc-linux and powerpc64-linux look good.
> 
> Thanks for the confirmation.  However, Andreas Tobler pointed out in
> private mail that I'd missed to reference rs6000/t-linux64 during the
> libgcc migration.  Strange that this seems to have no ill effect.

Hmm, yeah, we should have that back in.  Lack of t-linux64 means we
get all the soft-fp functions that we never use, bloating libgcc.
Also, -mno-minimal-toc gives better code.  Even when -mminimal-toc
wouldn't be in force anyway the option selects -mcmodel=small.
David Edelsohn Dec. 6, 2011, 12:25 a.m. UTC | #6
On Mon, Nov 28, 2011 at 11:03 PM, Alan Modra <amodra@gmail.com> wrote:
> On Mon, Nov 28, 2011 at 05:15:08PM +0100, Rainer Orth wrote:
>> Alan Modra <amodra@gmail.com> writes:
>>
>> > On Sun, Nov 27, 2011 at 08:36:38PM -0500, David Edelsohn wrote:
>> >> I was hoping that other targets affected by the patch would test it as well.
>> >
>> > powerpc-linux and powerpc64-linux look good.
>>
>> Thanks for the confirmation.  However, Andreas Tobler pointed out in
>> private mail that I'd missed to reference rs6000/t-linux64 during the
>> libgcc migration.  Strange that this seems to have no ill effect.
>
> Hmm, yeah, we should have that back in.  Lack of t-linux64 means we
> get all the soft-fp functions that we never use, bloating libgcc.
> Also, -mno-minimal-toc gives better code.  Even when -mminimal-toc
> wouldn't be in force anyway the option selects -mcmodel=small.

Is this fixed or is someone writing a follow-up patch?

Thanks, David
Rainer Orth Dec. 6, 2011, 9:22 a.m. UTC | #7
David Edelsohn <dje.gcc@gmail.com> writes:

> On Mon, Nov 28, 2011 at 11:03 PM, Alan Modra <amodra@gmail.com> wrote:
>> On Mon, Nov 28, 2011 at 05:15:08PM +0100, Rainer Orth wrote:
>>> Alan Modra <amodra@gmail.com> writes:
>>>
>>> > On Sun, Nov 27, 2011 at 08:36:38PM -0500, David Edelsohn wrote:
>>> >> I was hoping that other targets affected by the patch would test it as well.
>>> >
>>> > powerpc-linux and powerpc64-linux look good.
>>>
>>> Thanks for the confirmation.  However, Andreas Tobler pointed out in
>>> private mail that I'd missed to reference rs6000/t-linux64 during the
>>> libgcc migration.  Strange that this seems to have no ill effect.
>>
>> Hmm, yeah, we should have that back in.  Lack of t-linux64 means we
>> get all the soft-fp functions that we never use, bloating libgcc.
>> Also, -mno-minimal-toc gives better code.  Even when -mminimal-toc
>> wouldn't be in force anyway the option selects -mcmodel=small.
>
> Is this fixed or is someone writing a follow-up patch?

Not yet: I've been away all weekend and am swamped until next weekend,
but still mean to fix this.

	Rainer
diff mbox

Patch

# HG changeset patch
# Parent 4ec0f566a9a8795dbe0d67024a347bd0ecd41e7a
Fix t-ppccomm bootstrap

diff --git a/libgcc/config/rs6000/t-ppccomm b/libgcc/config/rs6000/t-ppccomm
--- a/libgcc/config/rs6000/t-ppccomm
+++ b/libgcc/config/rs6000/t-ppccomm
@@ -29,13 +29,13 @@  LIB2ADD_ST += \
 
 # Assemble startup files.
 ecrti$(objext): $(srcdir)/config/rs6000/eabi-ci.S
-	$(crt_compile) -c ecrti.S
+	$(crt_compile) -c $<
 
 ecrtn$(objext): $(srcdir)/config/rs6000/eabi-cn.S
-	$(crt_compile) -c ecrtn.S
+	$(crt_compile) -c $<
 
 ncrti$(objext): $(srcdir)/config/rs6000/sol-ci.S
-	$(crt_compile) -c ncrti.S
+	$(crt_compile) -c $<
 
 ncrtn$(objext): $(srcdir)/config/rs6000/sol-cn.S
-	$(crt_compile) -c ncrtn.S
+	$(crt_compile) -c $<