diff options
Diffstat (limited to 'package/python3')
-rw-r--r-- | package/python3/011-support-library-path-old-compilers.patch | 54 | ||||
-rw-r--r-- | package/python3/Config.in | 12 |
2 files changed, 6 insertions, 60 deletions
diff --git a/package/python3/011-support-library-path-old-compilers.patch b/package/python3/011-support-library-path-old-compilers.patch deleted file mode 100644 index 296e9febb9..0000000000 --- a/package/python3/011-support-library-path-old-compilers.patch +++ /dev/null @@ -1,54 +0,0 @@ -python3: 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. - -Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> - -Index: b/setup.py -=================================================================== ---- a/setup.py -+++ b/setup.py -@@ -427,6 +427,7 @@ - in_incdirs = False - inc_dirs = [] - lib_dirs = [] -+ compiler_has_library_path = False - try: - if ret >> 8 == 0: - with open(tmpfile) as fp: -@@ -438,6 +439,7 @@ - elif line.startswith("End of search list"): - in_incdirs = False - elif is_gcc and line.startswith("LIBRARY_PATH"): -+ compiler_has_library_path = True - for d in line.strip().split("=")[1].split(":"): - d = os.path.normpath(d) - if '/gcc/' not in d: -@@ -449,6 +451,15 @@ - finally: - os.unlink(tmpfile) - -+ if not compiler_has_library_path: -+ ret = os.system("%s -print-file-name=libc.a | sed -r -e 's:(usr/)?lib(32|64)?/([^/]*/)?libc\.a::' >%s" % (gcc, tmpfile)) -+ with open(tmpfile) as fp: -+ line = fp.readline().strip() -+ add_dir_to_list(self.compiler.library_dirs, -+ os.path.join(line, "usr", "lib")) -+ add_dir_to_list(self.compiler.library_dirs, -+ os.path.join(line, "lib")) -+ - def detect_modules(self): - # Ensure that /usr/local is always used, but the local build - # directories (i.e. '.' and 'Include') must be first. See issue diff --git a/package/python3/Config.in b/package/python3/Config.in index c3118c864e..e2f9077c4b 100644 --- a/package/python3/Config.in +++ b/package/python3/Config.in @@ -66,12 +66,6 @@ config BR2_PACKAGE_PYTHON3_OSSAUDIODEV help ossaudiodev module for Python3. -config BR2_PACKAGE_PYTHON3_PYEXPAT - select BR2_PACKAGE_EXPAT - bool "pyexpat" - help - pyexpat module for Python3. - config BR2_PACKAGE_PYTHON3_READLINE select BR2_PACKAGE_READLINE bool "readline" @@ -97,6 +91,12 @@ config BR2_PACKAGE_PYTHON3_SQLITE help SQLite database support +config BR2_PACKAGE_PYTHON3_PYEXPAT + select BR2_PACKAGE_EXPAT + bool "xml module" + help + pyexpat and xml libraries for Python3. + config BR2_PACKAGE_PYTHON3_ZLIB bool "zlib module" select BR2_PACKAGE_ZLIB |