开发者

CFLAGS and gcc at configure not passed in makefile

I am trying to compile python 32 bit on OSX. In order to do so, I want to specify -m32, so I dutifully specified

CFLAGS='-m32' LDFLAGS='-m32' ./configure

The configure executes correctly, but when I invoke make, the gcc execution has no trace of the -m32 flag. In order to have it, I had to do a more aggressive开发者_如何学编程 approach:

CFLAGS='-m32' LDFLAGS='-m32' CC='gcc -m32' ./configure

I don't really understand why the CFLAGS I specify are not passed (the LDFLAGS are. I find LDFLAG=-m32 in the Makefile). Is it an error of the configure script, or am I doing this wrong ?

I'm using python 2.6.0 (don't ask)


Ok, I can reproduce that with Python-2.6. That seems to be a bug in that version, and is fixed in a newer one.

Still, I can tell you that it is common for various packages to override or filter CFLAGS of values considered unsafe and so on. This often covers -m32 as well.

Moreover, many packages simply ignore LDFLAGS (which is an error indeed). Thus, for the particular case of building 32-bit package versions, it is common to override CC like you did and leave CFLAGS and LDFLAGS alone.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜