llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.49k stars 11.78k forks source link

cross-compile configure does not propagate flags to configures run from Makefile #17247

Open llvmbot opened 11 years ago

llvmbot commented 11 years ago
Bugzilla Link 16873
Version 3.2
OS Linux
Reporter LLVM Bugzilla Contributor
CC @compnerd,@echristo

Extended Description

When configuring LLVM 3.2 for cross compilation, additional flags may be required (such as --with-python=/usr/bin/python2.7). The generated Makefile contains a further configure call in cross-compile-build-tools, but this configure is not aware of the --with-python specified on the command line and fails.

Reproduce:

  1. have an unsupported /usr/bin/python, such as 3.2, and a working version in /usr/bin/python2.7 or such
  2. configure llvm 3.2 for crosscompilation (configure --host=i686-mingw32 --with-python=/usr/bin/python2.7)
  3. make

Make will run further configures, which will be unable to find a working python and fail.

llvmbot commented 11 years ago

I have confirmed on trunk that --with-python is not propagated to BuildToos/Makefile.config.

I think configure--with-python may be aware of $PYTHON, rather than propagating --with-python to BuildTools/configure.

To detect python,

1) use --with-python, if specified. 2) consider and honor $PYTHON. 3) detect appropriate version of python in configure.

FYI, I suppose Daniel is working for python scripts to make compatible to py3.