[Stackless] Problem building release27-maint in 64-bit linux.

Alexey Borzenkov snaury at gmail.com
Thu Aug 18 00:09:31 CEST 2011

On Fri, May 6, 2011 at 7:27 PM, Estevo <euccastro at yahoo.com> wrote:
> I got the following error trying to make release27-maint in a 64-bit
> gcc -pthread -c -fno-strict-aliasing -DSTACKLESS_FRHACK=0 -g -O2 -DNDEBUG -g
> -fwrapv -O3 -Wall -Wstrict-prototypes  -I. -IInclude -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:153:1: error: bp cannot be used in asm here
> make: *** [Stackless/core/slp_transfer.o] Erro 1

While working on greenlet and fixing switch-related problems, I found
that I cornered myself into the same issue with gcc (as opposed to
llvm-gcc used on OS X Lion). It seems that for whatever reasons gcc
doesn't allow clobbering rbp when it's using it for referencing stack

Coincidentally I managed to find a way to correctly save rbp (as well
as csr and cw), that works and compiles both with and without
-fomit-frame-pointers. In anyone is interested you can find my
slp_transfer for amd64 here:


If anyone can verify it's 100% correct (though redundant), then you
can maybe use it in stackless too.

More information about the Stackless mailing list