Closed sherpya closed 13 years ago
I've added a fix from shagkur to gcc, try rebuilding the toolchain with this new patch.
ok the patch works fine, I suggest you to do dos2unix on the patch since there are spurious \r
I was building git://github.com/grafchokolo/psgroove.git I think you can check it, since it does not resolve some symbols and some should be somehow in the free sdk (in psl1ght)
memcpy and memset: I dunno why it does not picks gcc builtins, I think because -Tldscript.ld -nostartfiles -nostdlib -nodefaultlibs
the other ones are lv1_xxxxx
I have a relatively fast linux box to try changes, I would be glad to help with some test
If you add --no-builtin to CFLAGS you can eliminate some of the errors.
the problem is all missing symbols are instead made in asm, for some reason the compiler mangles symbols with a dot, while the asm macro declaration is without the dot, adding the dot in the macro it works, so what is the correct mangling for symbols ? none or dot?
If you edit ppc_asm.h and change it to:
#define _GLOBAL(name) \
.section ".text"; \
.align 2 ; \
.global .name; \
.type name,@function; \
.name: \
Basically putting a '.' in front of both 'name' locations. Does that work?
I've also added . on .type line
Did this work for you?
in ppc_asm.h I have
#define _GLOBAL(name) \ .section ".text"; \ .align 2 ; \ .globl name; \ .type name,@function; \ name: \
I've changed it in:
#define _GLOBAL(name) \ .section ".text"; \ .align 2 ; \ .globl .name; \ .type .name,@function; \ .name: \
and it link correcly,I've noticed also while compiling others sources problems with the dot mangle, there is a reason for the dot?
I suspect that something has changed recently in the toolchain and that something is mangling by default where it hadn't before. There's probably a flag you could use to reverse the behavior but I'm not sure what it would be.
Is this issue still a problem?
I've reduced the testcase:
compile with ppu-gcc -Os testcase.c I get: testcase.c: In function 'func1': testcase.c:11:1: internal compiler error: in rs6000_savres_routine_name, at config/rs6000/rs6000.c:18375