[issue27490] ARM cross-compile: pgen built without $(CFLAGS) as $(LIBRARY) dependency

Martin Panter report at bugs.python.org
Tue Jul 12 23:13:57 EDT 2016


Martin Panter added the comment:

I don’t know the details of how Python uses CFLAGS etc, but according to <https://www.gnu.org/software/make/manual/html_node/Implicit-Variables.html#index-CFLAGS> and <https://www.gnu.org/software/make/manual/html_node/Catalogue-of-Rules.html#index-ld>, the general convention may be that CFLAGS and LDFLAGS are only for _compiler_ and _linker_ flags respectively, and CFLAGS may not be used for a link step.

Why don’t you either use CC="arm-none-eabi-gcc -mfloat-abi=hard", or LDFLAGS="-mfloat-abi=hard"? If these options work for you, perhaps what we really need is better documentation of how to build Python.

Ideally I would also like to make it so that compiling pgen is not necessary. But I think we can only use Gnu Make extensions if they are harmless in other operating systems (e.g. we have to keep the makefile compatible with BSD Make, though maybe it is okay to require Gnu Make for cross compiling).

In <https://bugs.python.org/issue26662#msg270162> I left some rambling thoughts on ways to make the file regeneration like pgen does less automatic and more up to the user to control.

----------
nosy: +martin.panter

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27490>
_______________________________________


More information about the Python-bugs-list mailing list