[U-Boot] ppc -Os and _restgpr_##_x errors

am i the only one seeing errors like: board/esd/cpciiser4/libcpciiser4.o: In function `board_early_init_f': board/esd/cpciiser4/cpciiser4.c:139: undefined reference to `_restgpr_26_x'
i'm using a gcc-4.5.x toolchain here. should we import crtsavres.S from Linux to fix this ? -mike

Dear Mike Frysinger,
In message 201111092310.56181.vapier@gentoo.org you wrote:
am i the only one seeing errors like: board/esd/cpciiser4/libcpciiser4.o: In function `board_early_init_f': board/esd/cpciiser4/cpciiser4.c:139: undefined reference to `_restgpr_26_x'
i'm using a gcc-4.5.x toolchain here. should we import crtsavres.S from Linux to fix this ?
No, we should not. You should switch to a compiler version where this problem has been fixed. See second entry at http://www.denx.de/wiki/U-Boot/GccBugsAndIssues
Best regards,
Wolfgang Denk

On Thursday 10 November 2011 00:32:45 Wolfgang Denk wrote:
Mike Frysinger wrote:
am i the only one seeing errors like: board/esd/cpciiser4/libcpciiser4.o: In function `board_early_init_f': board/esd/cpciiser4/cpciiser4.c:139: undefined reference to `_restgpr_26_x'
i'm using a gcc-4.5.x toolchain here. should we import crtsavres.S from Linux to fix this ?
No, we should not. You should switch to a compiler version where this problem has been fixed. See second entry at http://www.denx.de/wiki/U-Boot/GccBugsAndIssues
thanks ... upgrading to gcc-4.6.2 from gcc-4.5.3 fixed things. when i read the gcc thread, it sounded like it wasn't optional behavior, but i guess they changed that with gcc-4.6.x. -mike

On Wed, Nov 9, 2011 at 10:10 PM, Mike Frysinger vapier@gentoo.org wrote:
am i the only one seeing errors like: board/esd/cpciiser4/libcpciiser4.o: In function `board_early_init_f': board/esd/cpciiser4/cpciiser4.c:139: undefined reference to `_restgpr_26_x'
i'm using a gcc-4.5.x toolchain here. should we import crtsavres.S from Linux to fix this ?
Some projects fix this manually. For example kexec adds this:
https://github.com/horms/kexec-tools/blob/master/purgatory/arch/ppc/misc.S
Not that this is a good approach....
-M

On 11/10/2011 01:47 PM, McClintock Matthew-B29882 wrote:
On Wed, Nov 9, 2011 at 10:10 PM, Mike Frysinger vapier@gentoo.org wrote:
am i the only one seeing errors like: board/esd/cpciiser4/libcpciiser4.o: In function `board_early_init_f': board/esd/cpciiser4/cpciiser4.c:139: undefined reference to `_restgpr_26_x'
i'm using a gcc-4.5.x toolchain here. should we import crtsavres.S from Linux to fix this ?
Some projects fix this manually. For example kexec adds this:
https://github.com/horms/kexec-tools/blob/master/purgatory/arch/ppc/misc.S
Not that this is a good approach....
Shouldn't libgcc provide this?
-Scott

On Fri, Nov 11, 2011 at 2:12 PM, Scott Wood scottwood@freescale.com wrote:
Shouldn't libgcc provide this?
It's not being provided by certain toolchains...
-M

On Fri, Nov 11, 2011 at 2:12 PM, Scott Wood scottwood@freescale.com wrote:
Shouldn't libgcc provide this?
It's not being provided by certain toolchains...
-M
Well there is a reason why one should stick to ELDK ;-)
U-Boot mailing list U-Boot@lists.denx.de http://lists.denx.de/mailman/listinfo/u-boot

On Mon, Nov 14, 2011 at 3:42 PM, Marek Vasut marek.vasut@gmail.com wrote:
Well there is a reason why one should stick to ELDK ;-)
It depends on what version of GCC you want to use as well.
-M

Dear Scott Wood,
In message 4EBD81A2.7000402@freescale.com you wrote:
i'm using a gcc-4.5.x toolchain here. should we import crtsavres.S from Linux to fix this ?
...
Not that this is a good approach....
Shouldn't libgcc provide this?
If GCC generates such instruction sequences, it definitely should provide support for these in libgcc. Even better if it doesn't generate such code at all.
Best regards,
Wolfgang Denk
participants (5)
-
Marek Vasut
-
McClintock Matthew-B29882
-
Mike Frysinger
-
Scott Wood
-
Wolfgang Denk