Summary: | gcc-4.1.0 and 4.1.1-pre20060517 fail to compile stackless python | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Santiago Gala <sgala> |
Component: | New packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED INVALID | ||
Severity: | normal | CC: | lu_zero |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | PPC | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | generated with gcc -E |
Description
Santiago Gala
2006-05-21 08:04:35 UTC
try 4.1.1 ... if that fails, re-open with some preprocessed code for us to test with or some instructions on how to reproduce with 4.1.1: LC_ALL=C LANG=C make gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -O3 -Wall -Wstrict-prototypes -I. -I./Include -I./Stackless -DPy_BUILD_CORE -fno-omit-frame-pointer -O2 -I. -o Stackless/core/slp_transfer.o ./Stackless/core/slp_transfer.c ./Stackless/core/slp_transfer.c: In function 'slp_transfer': ./Stackless/core/slp_transfer.c:150: error: 31 cannot be used in asm here ./Stackless/core/slp_transfer.c:150: error: 31 cannot be used in asm here make: *** [Stackless/core/slp_transfer.o] Error 1 sgala@marlow ~/Code/stackless $ LC_ALL=C LANG=C gcc -pthread -c -fno-strict-aliasing -DNDEBUG -g -Wall -Wstrict-prototypes -I. -I./Include -I./Stackless -DPy_BUILD_CORE -fno-omit-frame-pointer -I. -o Stackless/core/slp_transfer.o ./Stackless/core/slp_transfer.c /tmp/ccr0UZXn.s: Assembler messages: /tmp/ccr0UZXn.s:65: Error: syntax error; found `(' but expected `,' /tmp/ccr0UZXn.s:65: Error: junk at end of line: `(31),1' Created attachment 89702 [details]
generated with gcc -E
with preprocessed output, not sure if this is enough It seems to be an interaction between -fno-omit-frame-pointer and some sort of tail recursion elimination in return slp_switch(); at the very end of a function. It only compiles without -fno-omit-frame-pointer *and* optimization, so that omit-frame-pointer is done. no, the ppc macro code is wrong in a few places for example: Greenlet/switch_ppc_macosx.h: __asm__ ("mr %0, r1" : "=g" (stackref) : ); this says that gcc is allowed to use register or memory for stackref ... but the "mr" instruction only works with registers change the constraint to "r" from "g" and it should work fine see the gcc manual for more info: http://gcc.gnu.org/onlinedocs/gcc-4.1.1/gcc/Simple-Constraints.html#Simple-Constraints |