* libgcc sparc-rtems config on gcc head
@ 2011-11-02 21:34 Joel Sherrill
2011-11-03 13:06 ` Rainer Orth
0 siblings, 1 reply; 11+ messages in thread
From: Joel Sherrill @ 2011-11-02 21:34 UTC (permalink / raw)
To: gcc, ro
Hi,
The sparc libgcc configure magic looks very
different on the head versus 4.6. sparc-rtems4.11
was not building because it was missing crti.
In 4.6, we got the makefile stub from sparc/t-crtin
but that no longer exists. It looks like the
rules are on t-sol2 now.
I made this change to libgcc/config.host and
it is getting further. Does this look like
what the intended change?
Index: config.host
===================================================================
--- config.host (revision 180798)
+++ config.host (working copy)
@@ -1028,7 +1028,7 @@
md_unwind_header=sparc/linux-unwind.h
;;
sparc-*-rtems*)
- tmake_file="sparc/t-elf t-crtfm t-rtems t-fdpbit"
+ tmake_file="sparc/t-elf t-crtfm t-sol2 t-rtems t-fdpbit"
extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
;;
sparc*-*-solaris2*)
--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libgcc sparc-rtems config on gcc head
2011-11-02 21:34 libgcc sparc-rtems config on gcc head Joel Sherrill
@ 2011-11-03 13:06 ` Rainer Orth
2011-11-03 13:50 ` Joel Sherrill
2011-11-03 14:04 ` Eric Botcazou
0 siblings, 2 replies; 11+ messages in thread
From: Rainer Orth @ 2011-11-03 13:06 UTC (permalink / raw)
To: Joel Sherrill; +Cc: gcc, Eric Botcazou
Hi Joel,
> The sparc libgcc configure magic looks very
> different on the head versus 4.6. sparc-rtems4.11
> was not building because it was missing crti.
>
> In 4.6, we got the makefile stub from sparc/t-crtin
> but that no longer exists. It looks like the
> rules are on t-sol2 now.
>
> I made this change to libgcc/config.host and
> it is getting further. Does this look like
> what the intended change?
>
> Index: config.host
> ===================================================================
> --- config.host (revision 180798)
> +++ config.host (working copy)
> @@ -1028,7 +1028,7 @@
> md_unwind_header=sparc/linux-unwind.h
> ;;
> sparc-*-rtems*)
> - tmake_file="sparc/t-elf t-crtfm t-rtems t-fdpbit"
> + tmake_file="sparc/t-elf t-crtfm t-sol2 t-rtems t-fdpbit"
> extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
> ;;
> sparc*-*-solaris2*)
No, I'd like to avoid non-Solaris targets using Solaris config fragments
if at all possible. AFAICS there's nothing Solaris-specific in
config/sparc/sol2-c[in].S. If so, the simplest solution would be to
rename the files to crt[in].S. On RTEMS, the generic crt[in].o rules in
Makefile.in would deal with building them, on Solaris I'd have to juggle
around the CUSTOM_CRTIN setting so it's only used on Solaris/x86.
Eric, am I missing something about the sparc/sol2-c[in].S files?
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libgcc sparc-rtems config on gcc head
2011-11-03 13:06 ` Rainer Orth
@ 2011-11-03 13:50 ` Joel Sherrill
2011-11-03 14:29 ` Rainer Orth
2011-11-03 14:04 ` Eric Botcazou
1 sibling, 1 reply; 11+ messages in thread
From: Joel Sherrill @ 2011-11-03 13:50 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc, Eric Botcazou
On 11/03/2011 08:06 AM, Rainer Orth wrote:
> Hi Joel,
>
>> The sparc libgcc configure magic looks very
>> different on the head versus 4.6. sparc-rtems4.11
>> was not building because it was missing crti.
>>
>> In 4.6, we got the makefile stub from sparc/t-crtin
>> but that no longer exists. It looks like the
>> rules are on t-sol2 now.
>>
>> I made this change to libgcc/config.host and
>> it is getting further. Does this look like
>> what the intended change?
>>
>> Index: config.host
>> ===================================================================
>> --- config.host (revision 180798)
>> +++ config.host (working copy)
>> @@ -1028,7 +1028,7 @@
>> md_unwind_header=sparc/linux-unwind.h
>> ;;
>> sparc-*-rtems*)
>> - tmake_file="sparc/t-elf t-crtfm t-rtems t-fdpbit"
>> + tmake_file="sparc/t-elf t-crtfm t-sol2 t-rtems t-fdpbit"
>> extra_parts="$extra_parts crti.o crtn.o crtfastmath.o"
>> ;;
>> sparc*-*-solaris2*)
> No, I'd like to avoid non-Solaris targets using Solaris config fragments
> if at all possible. AFAICS there's nothing Solaris-specific in
> config/sparc/sol2-c[in].S. If so, the simplest solution would be to
> rename the files to crt[in].S. On RTEMS, the generic crt[in].o rules in
> Makefile.in would deal with building them, on Solaris I'd have to juggle
> around the CUSTOM_CRTIN setting so it's only used on Solaris/x86.
>
I suspect this would take seconds for you and multiple
revisions from me to match what you have in your head. :)
Would you mind doing this? I am happy to provide quick
feedback.
> Eric, am I missing something about the sparc/sol2-c[in].S files?
>
> Rainer
>
--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libgcc sparc-rtems config on gcc head
2011-11-03 13:06 ` Rainer Orth
2011-11-03 13:50 ` Joel Sherrill
@ 2011-11-03 14:04 ` Eric Botcazou
2011-11-03 14:09 ` Rainer Orth
1 sibling, 1 reply; 11+ messages in thread
From: Eric Botcazou @ 2011-11-03 14:04 UTC (permalink / raw)
To: Rainer Orth; +Cc: Joel Sherrill, gcc
> No, I'd like to avoid non-Solaris targets using Solaris config fragments
> if at all possible. AFAICS there's nothing Solaris-specific in
> config/sparc/sol2-c[in].S. If so, the simplest solution would be to
> rename the files to crt[in].S. On RTEMS, the generic crt[in].o rules in
> Makefile.in would deal with building them, on Solaris I'd have to juggle
> around the CUSTOM_CRTIN setting so it's only used on Solaris/x86.
>
> Eric, am I missing something about the sparc/sol2-c[in].S files?
There is the same problem on i386, see:
http://gcc.gnu.org/ml/gcc-patches/2011-05/msg02334.html
Where did config/t-crtin go? Alternatively, why not just add the missing rules
to config/t-rtems?
--
Eric Botcazou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libgcc sparc-rtems config on gcc head
2011-11-03 14:04 ` Eric Botcazou
@ 2011-11-03 14:09 ` Rainer Orth
2011-11-03 14:38 ` Eric Botcazou
0 siblings, 1 reply; 11+ messages in thread
From: Rainer Orth @ 2011-11-03 14:09 UTC (permalink / raw)
To: Eric Botcazou; +Cc: Joel Sherrill, gcc
Eric Botcazou <ebotcazou@adacore.com> writes:
>> No, I'd like to avoid non-Solaris targets using Solaris config fragments
>> if at all possible. AFAICS there's nothing Solaris-specific in
>> config/sparc/sol2-c[in].S. If so, the simplest solution would be to
>> rename the files to crt[in].S. On RTEMS, the generic crt[in].o rules in
>> Makefile.in would deal with building them, on Solaris I'd have to juggle
>> around the CUSTOM_CRTIN setting so it's only used on Solaris/x86.
>>
>> Eric, am I missing something about the sparc/sol2-c[in].S files?
>
> There is the same problem on i386, see:
> http://gcc.gnu.org/ml/gcc-patches/2011-05/msg02334.html
The same solution seems to apply here: just rename the files to
crt[in].S and use the generic rules. They don't seem Solaris-specific
either.
> Where did config/t-crtin go? Alternatively, why not just add the missing rules
> to config/t-rtems?
The rules are generic and have been integrated into libgcc/Makefile.in,
but only used unless CUSTOM_CRTIN is set in a target fragment.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libgcc sparc-rtems config on gcc head
2011-11-03 13:50 ` Joel Sherrill
@ 2011-11-03 14:29 ` Rainer Orth
2011-11-03 14:35 ` Joel Sherrill
0 siblings, 1 reply; 11+ messages in thread
From: Rainer Orth @ 2011-11-03 14:29 UTC (permalink / raw)
To: Joel Sherrill; +Cc: gcc, Eric Botcazou
[-- Attachment #1: Type: text/plain, Size: 1232 bytes --]
Hi Joel,
>> No, I'd like to avoid non-Solaris targets using Solaris config fragments
>> if at all possible. AFAICS there's nothing Solaris-specific in
>> config/sparc/sol2-c[in].S. If so, the simplest solution would be to
>> rename the files to crt[in].S. On RTEMS, the generic crt[in].o rules in
>> Makefile.in would deal with building them, on Solaris I'd have to juggle
>> around the CUSTOM_CRTIN setting so it's only used on Solaris/x86.
>>
> I suspect this would take seconds for you and multiple
> revisions from me to match what you have in your head. :)
>
> Would you mind doing this? I am happy to provide quick
> feedback.
sure, could you give this one a try (untested)? Please note that it's a
git-style patch with renames, so you may have to perform those manually.
Thanks.
Rainer
2011-11-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* config/i386/sol2-ci.S: Rename to ...
* config/i386/crti.S: ... this.
* config/i386/sol2-cn.S: Rename to ...
* config/i386/crtn.S: ... this.
* config/sparc/sol2-ci.S: Rename to ...
* config/sparc/crti.S: ... this.
* config/sparc/sol2-cn.S: Rename to ...
* config/sparc/crtn.S: ... this.
* config/t-sol2 (CUSTOM_CRTIN): Remove.
(crti.o, crtn.o): Remove.
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: libgcc-crtin.patch --]
[-- Type: text/x-patch, Size: 2236 bytes --]
# HG changeset patch
# Parent 842d03d7a925718952de26cdcec4f361e68b956e
Use sol2-c[1n].S on more targets
diff --git a/libgcc/config/i386/sol2-ci.S b/libgcc/config/i386/crti.S
rename from libgcc/config/i386/sol2-ci.S
rename to libgcc/config/i386/crti.S
--- a/libgcc/config/i386/sol2-ci.S
+++ b/libgcc/config/i386/crti.S
@@ -1,4 +1,4 @@
-/* crti.s for Solaris 2, x86.
+/* crti.S for x86.
Copyright (C) 1993, 2008, 2009 Free Software Foundation, Inc.
Written By Fred Fish, Nov 1992
diff --git a/libgcc/config/i386/sol2-cn.S b/libgcc/config/i386/crtn.S
rename from libgcc/config/i386/sol2-cn.S
rename to libgcc/config/i386/crtn.S
--- a/libgcc/config/i386/sol2-cn.S
+++ b/libgcc/config/i386/crtn.S
@@ -1,4 +1,4 @@
-/* crtn.s for Solaris 2, x86.
+/* crtn.S for x86.
Copyright (C) 1993, 2008, 2009 Free Software Foundation, Inc.
Written By Fred Fish, Nov 1992
diff --git a/libgcc/config/sparc/sol2-ci.S b/libgcc/config/sparc/crti.S
rename from libgcc/config/sparc/sol2-ci.S
rename to libgcc/config/sparc/crti.S
--- a/libgcc/config/sparc/sol2-ci.S
+++ b/libgcc/config/sparc/crti.S
@@ -1,4 +1,4 @@
-! crti.s for solaris 2.0.
+! crti.S for SPARC
! Copyright (C) 1992, 2008, 2009, 2011 Free Software Foundation, Inc.
! Written By David Vinayak Henkel-Wallace, June 1992
diff --git a/libgcc/config/sparc/sol2-cn.S b/libgcc/config/sparc/crtn.S
rename from libgcc/config/sparc/sol2-cn.S
rename to libgcc/config/sparc/crtn.S
--- a/libgcc/config/sparc/sol2-cn.S
+++ b/libgcc/config/sparc/crtn.S
@@ -1,4 +1,4 @@
-! crtn.s for solaris 2.0.
+! crtn.S for SPARC
! Copyright (C) 1992, 2008, 2009, 2011 Free Software Foundation, Inc.
! Written By David Vinayak Henkel-Wallace, June 1992
diff --git a/libgcc/config/t-sol2 b/libgcc/config/t-sol2
--- a/libgcc/config/t-sol2
+++ b/libgcc/config/t-sol2
@@ -20,14 +20,8 @@
gmon.o: $(srcdir)/config/gmon-sol2.c
$(gcc_compile) -c $<
-CUSTOM_CRTIN = yes
-
# Assemble startup files.
crt1.o: $(srcdir)/config/$(cpu_type)/sol2-c1.S
$(crt_compile) -c $<
gcrt1.o: $(srcdir)/config/$(cpu_type)/sol2-c1.S
$(crt_compile) -c -DGCRT1 $<
-crti.o: $(srcdir)/config/$(cpu_type)/sol2-ci.S
- $(crt_compile) -c $<
-crtn.o: $(srcdir)/config/$(cpu_type)/sol2-cn.S
- $(crt_compile) -c $<
[-- Attachment #3: Type: text/plain, Size: 144 bytes --]
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libgcc sparc-rtems config on gcc head
2011-11-03 14:29 ` Rainer Orth
@ 2011-11-03 14:35 ` Joel Sherrill
0 siblings, 0 replies; 11+ messages in thread
From: Joel Sherrill @ 2011-11-03 14:35 UTC (permalink / raw)
To: Rainer Orth; +Cc: gcc, Eric Botcazou
On 11/03/2011 09:29 AM, Rainer Orth wrote:
> Hi Joel,
>
>>> No, I'd like to avoid non-Solaris targets using Solaris config fragments
>>> if at all possible. AFAICS there's nothing Solaris-specific in
>>> config/sparc/sol2-c[in].S. If so, the simplest solution would be to
>>> rename the files to crt[in].S. On RTEMS, the generic crt[in].o rules in
>>> Makefile.in would deal with building them, on Solaris I'd have to juggle
>>> around the CUSTOM_CRTIN setting so it's only used on Solaris/x86.
>>>
>> I suspect this would take seconds for you and multiple
>> revisions from me to match what you have in your head. :)
>>
>> Would you mind doing this? I am happy to provide quick
>> feedback.
> sure, could you give this one a try (untested)? Please note that it's a
> git-style patch with renames, so you may have to perform those manually.
>
It worked for sparc-rtems just renaming the files. The other edits
are for Solaris specific files or just clean up. As far as rtems is
concerned, the rename is OK. You judge for Solaris. Commit
when you are ready.
That gets rtems to this issue building libgcc2.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50979
Thanks.
> Thanks.
> Rainer
>
>
> 2011-11-03 Rainer Orth<ro@CeBiTec.Uni-Bielefeld.DE>
>
> * config/i386/sol2-ci.S: Rename to ...
> * config/i386/crti.S: ... this.
> * config/i386/sol2-cn.S: Rename to ...
> * config/i386/crtn.S: ... this.
> * config/sparc/sol2-ci.S: Rename to ...
> * config/sparc/crti.S: ... this.
> * config/sparc/sol2-cn.S: Rename to ...
> * config/sparc/crtn.S: ... this.
> * config/t-sol2 (CUSTOM_CRTIN): Remove.
> (crti.o, crtn.o): Remove.
>
--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libgcc sparc-rtems config on gcc head
2011-11-03 14:09 ` Rainer Orth
@ 2011-11-03 14:38 ` Eric Botcazou
2011-11-03 14:45 ` Rainer Orth
0 siblings, 1 reply; 11+ messages in thread
From: Eric Botcazou @ 2011-11-03 14:38 UTC (permalink / raw)
To: Rainer Orth; +Cc: Joel Sherrill, gcc
> The same solution seems to apply here: just rename the files to
> crt[in].S and use the generic rules. They don't seem Solaris-specific
> either.
The renaming for SPARC is OK if it is done for i386 as well, but this doesn't
really seem to be necessary, see below.
> The rules are generic and have been integrated into libgcc/Makefile.in,
> but only used unless CUSTOM_CRTIN is set in a target fragment.
s/unless/if/ I presume? config/t-sol2 has the rules though so config/t-rtems
could just copy them, at least for now.
--
Eric Botcazou
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libgcc sparc-rtems config on gcc head
2011-11-03 14:38 ` Eric Botcazou
@ 2011-11-03 14:45 ` Rainer Orth
2011-11-03 15:35 ` Joel Sherrill
0 siblings, 1 reply; 11+ messages in thread
From: Rainer Orth @ 2011-11-03 14:45 UTC (permalink / raw)
To: Eric Botcazou; +Cc: Joel Sherrill, gcc
Eric Botcazou <ebotcazou@adacore.com> writes:
>> The same solution seems to apply here: just rename the files to
>> crt[in].S and use the generic rules. They don't seem Solaris-specific
>> either.
>
> The renaming for SPARC is OK if it is done for i386 as well, but this doesn't
> really seem to be necessary, see below.
That's what my patch does. It would be good if Joel could test on
i386-rtems before comitting (as I will on Solaris/SPARC and x86, of
course).
>> The rules are generic and have been integrated into libgcc/Makefile.in,
>> but only used unless CUSTOM_CRTIN is set in a target fragment.
>
> s/unless/if/ I presume? config/t-sol2 has the rules though so config/t-rtems
No, if a t-* fragment sets CUSTOM_CRTIN, it's expected to provide its
own crt[in].o rules, just like the existing CUSTOM_CRTSTUFF does. If
crt[in].o is not included in extra_parts, the generic rules are
unused/harmless.
> could just copy them, at least for now.
True, but that's the sort of copy-and-paste programming I'd like to
reduce with this series of patches.
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libgcc sparc-rtems config on gcc head
2011-11-03 14:45 ` Rainer Orth
@ 2011-11-03 15:35 ` Joel Sherrill
2011-11-04 12:01 ` Rainer Orth
0 siblings, 1 reply; 11+ messages in thread
From: Joel Sherrill @ 2011-11-03 15:35 UTC (permalink / raw)
To: Rainer Orth; +Cc: Eric Botcazou, gcc
On 11/03/2011 09:44 AM, Rainer Orth wrote:
> Eric Botcazou<ebotcazou@adacore.com> writes:
>
>>> The same solution seems to apply here: just rename the files to
>>> crt[in].S and use the generic rules. They don't seem Solaris-specific
>>> either.
>> The renaming for SPARC is OK if it is done for i386 as well, but this doesn't
>> really seem to be necessary, see below.
> That's what my patch does. It would be good if Joel could test on
> i386-rtems before comitting (as I will on Solaris/SPARC and x86, of
> course).
>
i386-rtems builds fine after moving the files.
From my perspective, you can commit.
>>> The rules are generic and have been integrated into libgcc/Makefile.in,
>>> but only used unless CUSTOM_CRTIN is set in a target fragment.
>> s/unless/if/ I presume? config/t-sol2 has the rules though so config/t-rtems
> No, if a t-* fragment sets CUSTOM_CRTIN, it's expected to provide its
> own crt[in].o rules, just like the existing CUSTOM_CRTSTUFF does. If
> crt[in].o is not included in extra_parts, the generic rules are
> unused/harmless.
>
>> could just copy them, at least for now.
> True, but that's the sort of copy-and-paste programming I'd like to
> reduce with this series of patches.
>
Thank you. Avoiding cut and paste makes it easier
for targets like RTEMS where we really do try to rely
as much as possible on sharing. :)
> Rainer
>
--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: libgcc sparc-rtems config on gcc head
2011-11-03 15:35 ` Joel Sherrill
@ 2011-11-04 12:01 ` Rainer Orth
0 siblings, 0 replies; 11+ messages in thread
From: Rainer Orth @ 2011-11-04 12:01 UTC (permalink / raw)
To: Joel Sherrill; +Cc: Eric Botcazou, gcc
Joel,
>> That's what my patch does. It would be good if Joel could test on
>> i386-rtems before comitting (as I will on Solaris/SPARC and x86, of
>> course).
>>
> i386-rtems builds fine after moving the files.
>
> From my perspective, you can commit.
Thanks for the confirmation. I've run i386-pc-solaris2.{8, 11} and
sparc-sun-solaris2.{8, 11} bootstraps overnight. Solaris 8 builds
crt[in].o, while they are included on Solaris 11 and thus skipped in
libgcc. They completed without regressions (with the exception of
Solaris 8/SPARC where jc1 ICEs at one point, but that's unrelated).
I've now committed the patch.
>>>> The rules are generic and have been integrated into libgcc/Makefile.in,
>>>> but only used unless CUSTOM_CRTIN is set in a target fragment.
>>> s/unless/if/ I presume? config/t-sol2 has the rules though so config/t-rtems
>> No, if a t-* fragment sets CUSTOM_CRTIN, it's expected to provide its
>> own crt[in].o rules, just like the existing CUSTOM_CRTSTUFF does. If
>> crt[in].o is not included in extra_parts, the generic rules are
>> unused/harmless.
>>
>>> could just copy them, at least for now.
>> True, but that's the sort of copy-and-paste programming I'd like to
>> reduce with this series of patches.
>>
> Thank you. Avoiding cut and paste makes it easier
> for targets like RTEMS where we really do try to rely
> as much as possible on sharing. :)
Right, and it's less likely to miss new features...
Rainer
--
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2011-11-04 12:01 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-02 21:34 libgcc sparc-rtems config on gcc head Joel Sherrill
2011-11-03 13:06 ` Rainer Orth
2011-11-03 13:50 ` Joel Sherrill
2011-11-03 14:29 ` Rainer Orth
2011-11-03 14:35 ` Joel Sherrill
2011-11-03 14:04 ` Eric Botcazou
2011-11-03 14:09 ` Rainer Orth
2011-11-03 14:38 ` Eric Botcazou
2011-11-03 14:45 ` Rainer Orth
2011-11-03 15:35 ` Joel Sherrill
2011-11-04 12:01 ` Rainer Orth
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).