python: do not rely only on LIBRARY_PATH for old compilers
commit616dd6245be75798fa6d9fd057a0fb5d7020dc97
authorThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 16 Apr 2014 21:36:08 +0000 (16 23:36 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Sun, 20 Apr 2014 16:35:53 +0000 (20 18:35 +0200)
treee0d6a39af56ec429e06117da3d6d69d360a62bad
parent6b1ca27b1a591ba82209b9f7bcd6b39536b41885
python: do not rely only on LIBRARY_PATH for old compilers

The cross-compilation improvements integrated in Python rely on the
compiler exposing a line starting with LIBRARY_PATH when called with
-E -v. This is used by Python setup.py to find the installation
locations of libraries.

However, this LIBRARY_PATH line is not shown by very old compilers,
such as the gcc 4.2.x compiler used on the AVR32 architecture. This
causes libraries installed in the sysroot, such as libffi, to not be
detected by the setup.py script.

To fix this problem, this patch adds addtional logic to setup.py,
which consists in deriving the library paths from the sysroot
location, if no LIBRARY_PATH field was found.

Fixes:

  http://autobuild.buildroot.org/results/1aa/1aad2d677dbf7b0a3cb0120a35f45123124f51ab/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/python/python-012-support-library-path-old-compilers.patch [new file with mode: 0644]