* [Bug target/44793] Code generated references undefined symbol
2010-07-02 20:13 [Bug target/44793] New: Code generated references undefined symbol joel at gcc dot gnu dot org
@ 2010-07-02 20:14 ` joel at gcc dot gnu dot org
2010-07-02 20:17 ` joel at gcc dot gnu dot org
` (9 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: joel at gcc dot gnu dot org @ 2010-07-02 20:14 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from joel at gcc dot gnu dot org 2010-07-02 20:14 -------
Created an attachment (id=21071)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21071&action=view)
bzip'ed test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44793
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44793] Code generated references undefined symbol
2010-07-02 20:13 [Bug target/44793] New: Code generated references undefined symbol joel at gcc dot gnu dot org
2010-07-02 20:14 ` [Bug target/44793] " joel at gcc dot gnu dot org
@ 2010-07-02 20:17 ` joel at gcc dot gnu dot org
2010-07-02 20:17 ` [Bug target/44793] New: " Andrew Pinski
` (8 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: joel at gcc dot gnu dot org @ 2010-07-02 20:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from joel at gcc dot gnu dot org 2010-07-02 20:16 -------
Works with 4.4.4
$ /opt/rtems-4.10/bin/powerpc-rtems4.10-gcc -mcpu=603e -Os pr44793.c -S
$ grep _res pr44793.s
$ /opt/rtems-4.10/bin/powerpc-rtems4.10-gcc --version
powerpc-rtems4.10-gcc (GCC) 4.4.4 20100429 (RTEMS
gcc-4.4.4-1.fc12/newlib-1.18.0-12.fc12)
--
joel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Known to work| |4.4.4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44793
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: [Bug target/44793] New: Code generated references undefined symbol
2010-07-02 20:13 [Bug target/44793] New: Code generated references undefined symbol joel at gcc dot gnu dot org
2010-07-02 20:14 ` [Bug target/44793] " joel at gcc dot gnu dot org
2010-07-02 20:17 ` joel at gcc dot gnu dot org
@ 2010-07-02 20:17 ` Andrew Pinski
2010-07-02 20:17 ` [Bug target/44793] " pinskia at gmail dot com
` (7 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: Andrew Pinski @ 2010-07-02 20:17 UTC (permalink / raw)
To: gcc-bugzilla; +Cc: gcc-bugs
These functions are part of PowerPC abi. So they should be provided by
either libgcc or the libc.
On Jul 2, 2010, at 1:12 PM, "joel at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org
> wrote:
> This was spotted on powerpc-rtems but likely impacts more targets.
> It is
> triggered by -Os. I will attach the preprocessed file.
>
> powerpc-rtems4.11-gcc (GCC) 4.5.0 20100414 (RTEMS
> gcc-4.5.0-10.fc12/newlib-1.18.0-10.fc12)
>
> $ powerpc-rtems4.11-gcc -mcpu=603e -Os -S j.c
> $ grep _rest j.s
> b _restgpr_31_x
> $ powerpc-rtems4.11-gcc -mcpu=603e -O0 -S j.c
> $ grep _rest j.s
> $ powerpc-rtems4.11-gcc -mcpu=603e -O1 -S j.c
> $ grep _rest j.s
> $ powerpc-rtems4.11-gcc -mcpu=603e -O2 -S j.c
> $ grep _rest j.s
> $
>
>
> --
> Summary: Code generated references undefined symbol
> Product: gcc
> Version: 4.5.0
> Status: UNCONFIRMED
> Severity: normal
> Priority: P3
> Component: target
> AssignedTo: unassigned at gcc dot gnu dot org
> ReportedBy: joel at gcc dot gnu dot org
> GCC host triplet: powerpc-rtems4.11
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44793
>
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44793] Code generated references undefined symbol
2010-07-02 20:13 [Bug target/44793] New: Code generated references undefined symbol joel at gcc dot gnu dot org
` (2 preceding siblings ...)
2010-07-02 20:17 ` [Bug target/44793] New: " Andrew Pinski
@ 2010-07-02 20:17 ` pinskia at gmail dot com
2010-07-02 20:31 ` joel at gcc dot gnu dot org
` (6 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gmail dot com @ 2010-07-02 20:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gmail dot com 2010-07-02 20:17 -------
Subject: Re: New: Code generated references undefined symbol
These functions are part of PowerPC abi. So they should be provided by
either libgcc or the libc.
On Jul 2, 2010, at 1:12 PM, "joel at gcc dot gnu dot org"
<gcc-bugzilla@gcc.gnu.org
> wrote:
> This was spotted on powerpc-rtems but likely impacts more targets.
> It is
> triggered by -Os. I will attach the preprocessed file.
>
> powerpc-rtems4.11-gcc (GCC) 4.5.0 20100414 (RTEMS
> gcc-4.5.0-10.fc12/newlib-1.18.0-10.fc12)
>
> $ powerpc-rtems4.11-gcc -mcpu=603e -Os -S j.c
> $ grep _rest j.s
> b _restgpr_31_x
> $ powerpc-rtems4.11-gcc -mcpu=603e -O0 -S j.c
> $ grep _rest j.s
> $ powerpc-rtems4.11-gcc -mcpu=603e -O1 -S j.c
> $ grep _rest j.s
> $ powerpc-rtems4.11-gcc -mcpu=603e -O2 -S j.c
> $ grep _rest j.s
> $
>
>
> --
> Summary: Code generated references undefined symbol
> Product: gcc
> Version: 4.5.0
> Status: UNCONFIRMED
> Severity: normal
> Priority: P3
> Component: target
> AssignedTo: unassigned at gcc dot gnu dot org
> ReportedBy: joel at gcc dot gnu dot org
> GCC host triplet: powerpc-rtems4.11
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44793
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44793
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44793] Code generated references undefined symbol
2010-07-02 20:13 [Bug target/44793] New: Code generated references undefined symbol joel at gcc dot gnu dot org
` (3 preceding siblings ...)
2010-07-02 20:17 ` [Bug target/44793] " pinskia at gmail dot com
@ 2010-07-02 20:31 ` joel at gcc dot gnu dot org
2010-07-05 1:19 ` [Bug target/44793] [4.5/4.6 Regression] libgcc does not include t-ppccomm on rtems pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: joel at gcc dot gnu dot org @ 2010-07-02 20:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from joel at gcc dot gnu dot org 2010-07-02 20:31 -------
We use newlib and it is not in any of the .a or .o files installed. I
see it in the file crtresgpr.S in gcc/config/rs6000 but only
config/rs6000/t-netbsd references it. Should this code from t-netbsd be copied
to t-rtems or moved out to a new t-XXX file which is included by multiple
targets? rtems can't be the only one in need of this.
LIB2FUNCS_STATIC_EXTRA = crtsavfpr.S crtresfpr.S \
crtsavgpr.S crtresgpr.S \
crtresxfpr.S crtresxgpr.S
tramp.S: $(srcdir)/config/rs6000/tramp.asm
cat $(srcdir)/config/rs6000/tramp.asm > tramp.S
crtsavfpr.S: $(srcdir)/config/rs6000/crtsavfpr.asm
cat $(srcdir)/config/rs6000/crtsavfpr.asm >crtsavfpr.S
crtresfpr.S: $(srcdir)/config/rs6000/crtresfpr.asm
cat $(srcdir)/config/rs6000/crtresfpr.asm >crtresfpr.S
crtsavgpr.S: $(srcdir)/config/rs6000/crtsavgpr.asm
cat $(srcdir)/config/rs6000/crtsavgpr.asm >crtsavgpr.S
crtresgpr.S: $(srcdir)/config/rs6000/crtresgpr.asm
cat $(srcdir)/config/rs6000/crtresgpr.asm >crtresgpr.S
crtresxfpr.S: $(srcdir)/config/rs6000/crtresxfpr.asm
cat $(srcdir)/config/rs6000/crtresxfpr.asm >crtresxfpr.S
crtresxgpr.S: $(srcdir)/config/rs6000/crtresxgpr.asm
cat $(srcdir)/config/rs6000/crtresxgpr.asm >crtresxgpr.S
# It is important that crtbegin.o, etc., aren't surprised by stuff in .sdata.
CRTSTUFF_T_CFLAGS += -msdata=none
CRTSTUFF_T_CFLAGS_S += -msdata=none
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44793
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44793] [4.5/4.6 Regression] libgcc does not include t-ppccomm on rtems
2010-07-02 20:13 [Bug target/44793] New: Code generated references undefined symbol joel at gcc dot gnu dot org
` (4 preceding siblings ...)
2010-07-02 20:31 ` joel at gcc dot gnu dot org
@ 2010-07-05 1:19 ` pinskia at gcc dot gnu dot org
2010-07-05 3:31 ` corsepiu at gcc dot gnu dot org
` (4 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2010-07-05 1:19 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from pinskia at gcc dot gnu dot org 2010-07-05 01:18 -------
Neither.
rtems should be moved to the new style libgcc config and include
./config/rs6000/t-ppccomm .
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
GCC host triplet|powerpc-rtems4.11 |
GCC target triplet| |powerpc-rtems4.11
Summary|Code generated references |[4.5/4.6 Regression] libgcc
|undefined symbol |does not include t-ppccomm
| |on rtems
Target Milestone|--- |4.5.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44793
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44793] [4.5/4.6 Regression] libgcc does not include t-ppccomm on rtems
2010-07-02 20:13 [Bug target/44793] New: Code generated references undefined symbol joel at gcc dot gnu dot org
` (5 preceding siblings ...)
2010-07-05 1:19 ` [Bug target/44793] [4.5/4.6 Regression] libgcc does not include t-ppccomm on rtems pinskia at gcc dot gnu dot org
@ 2010-07-05 3:31 ` corsepiu at gcc dot gnu dot org
2010-07-05 4:17 ` corsepiu at gcc dot gnu dot org
` (3 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: corsepiu at gcc dot gnu dot org @ 2010-07-05 3:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from corsepiu at gcc dot gnu dot org 2010-07-05 03:30 -------
(In reply to comment #5)
> rtems should be moved to the new style libgcc config and include
> ./config/rs6000/t-ppccomm .
Hmm. Doesn't RTEMS already do so?
>From config.gcc:
...
powerpc-*-rtems*)
tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h
newlib-stdint.h rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/rtems.h
rtems.h"
extra_options="${extra_options} rs6000/sysv4.opt"
tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t-rtems
t-rtems rs6000/t-ppccomm"
;;
...
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44793
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44793] [4.5/4.6 Regression] libgcc does not include t-ppccomm on rtems
2010-07-02 20:13 [Bug target/44793] New: Code generated references undefined symbol joel at gcc dot gnu dot org
` (6 preceding siblings ...)
2010-07-05 3:31 ` corsepiu at gcc dot gnu dot org
@ 2010-07-05 4:17 ` corsepiu at gcc dot gnu dot org
2010-07-22 8:54 ` rguenth at gcc dot gnu dot org
` (2 subsequent siblings)
10 siblings, 0 replies; 13+ messages in thread
From: corsepiu at gcc dot gnu dot org @ 2010-07-05 4:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #7 from corsepiu at gcc dot gnu dot org 2010-07-05 04:17 -------
(In reply to comment #6)
> (In reply to comment #5)
> > rtems should be moved to the new style libgcc config and include
> > ./config/rs6000/t-ppccomm .
>
> Hmm. Doesn't RTEMS already do so?
Did you mean libgcc/config.host?
In there, powerpc-*linux is the only target using libgcc/config/rs6000/t-ppccom
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44793
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44793] [4.5/4.6 Regression] libgcc does not include t-ppccomm on rtems
2010-07-02 20:13 [Bug target/44793] New: Code generated references undefined symbol joel at gcc dot gnu dot org
` (7 preceding siblings ...)
2010-07-05 4:17 ` corsepiu at gcc dot gnu dot org
@ 2010-07-22 8:54 ` rguenth at gcc dot gnu dot org
2010-07-31 9:35 ` rguenth at gcc dot gnu dot org
2010-08-08 20:31 ` joel at gcc dot gnu dot org
10 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-22 8:54 UTC (permalink / raw)
To: gcc-bugs
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P4
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44793
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44793] [4.5/4.6 Regression] libgcc does not include t-ppccomm on rtems
2010-07-02 20:13 [Bug target/44793] New: Code generated references undefined symbol joel at gcc dot gnu dot org
` (8 preceding siblings ...)
2010-07-22 8:54 ` rguenth at gcc dot gnu dot org
@ 2010-07-31 9:35 ` rguenth at gcc dot gnu dot org
2010-08-08 20:31 ` joel at gcc dot gnu dot org
10 siblings, 0 replies; 13+ messages in thread
From: rguenth at gcc dot gnu dot org @ 2010-07-31 9:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #8 from rguenth at gcc dot gnu dot org 2010-07-31 09:29 -------
GCC 4.5.1 is being released, adjusting target milestone.
--
rguenth at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|4.5.1 |4.5.2
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44793
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Bug target/44793] [4.5/4.6 Regression] libgcc does not include t-ppccomm on rtems
2010-07-02 20:13 [Bug target/44793] New: Code generated references undefined symbol joel at gcc dot gnu dot org
` (9 preceding siblings ...)
2010-07-31 9:35 ` rguenth at gcc dot gnu dot org
@ 2010-08-08 20:31 ` joel at gcc dot gnu dot org
10 siblings, 0 replies; 13+ messages in thread
From: joel at gcc dot gnu dot org @ 2010-08-08 20:31 UTC (permalink / raw)
To: gcc-bugs
------- Comment #9 from joel at gcc dot gnu dot org 2010-08-08 20:31 -------
Created an attachment (id=21439)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=21439&action=view)
First attempt at fix
Is this what you have in mind? I think it worked since the desired symbols
are now in libgcc.a.
Is there some other remnant in config.gcc or gcc/config/rs6000/*rtems* that
needs cleaning?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44793
^ permalink raw reply [flat|nested] 13+ messages in thread