diff options
author | Peter Korsgaard <jacmet@sunsite.dk> | 2011-01-25 16:24:46 +0100 |
---|---|---|
committer | Peter Korsgaard <jacmet@sunsite.dk> | 2011-01-25 16:24:46 +0100 |
commit | 0eef30440e9597b2c0b9c7a0340a3986a7ea2a65 (patch) | |
tree | f8e74a929418c8085bc09dd5606a10e356923c74 /package/python/python-2.7-011-no-rpath.patch | |
parent | 4c6a451ac9fab16abcda5834ed4a9b728091ab9e (diff) | |
parent | 6ea3c8bd4dabe2b11a8beecb6a641336e6e90f3c (diff) | |
download | buildroot-novena-0eef30440e9597b2c0b9c7a0340a3986a7ea2a65.tar.gz buildroot-novena-0eef30440e9597b2c0b9c7a0340a3986a7ea2a65.zip |
Merge branch 'for-2011.02/python-bump' of git://git.busybox.net/~tpetazzoni/git/buildroot
Diffstat (limited to 'package/python/python-2.7-011-no-rpath.patch')
-rw-r--r-- | package/python/python-2.7-011-no-rpath.patch | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/package/python/python-2.7-011-no-rpath.patch b/package/python/python-2.7-011-no-rpath.patch new file mode 100644 index 000000000..700c4be8d --- /dev/null +++ b/package/python/python-2.7-011-no-rpath.patch @@ -0,0 +1,75 @@ +Remove runtime library paths + +For some extensions (bsddb, sqlite and dbm), Python setup.py script +hardcode a runtime path (rpath) into the extension. However, this +runtime path is incorrect (because it points to the location of the +library directory on the development machine) and useless (because on +the target, all useful libraries are in a standard directory searched +by the dynamic loader). For those reasons, we just get rid of the +runtime paths in cross-compilation mode. + +Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> +--- + setup.py | 21 ++++++++++++++++++--- + 1 file changed, 18 insertions(+), 3 deletions(-) + +Index: Python-2.7.1/setup.py +=================================================================== +--- Python-2.7.1.orig/setup.py ++++ Python-2.7.1/setup.py +@@ -977,6 +977,12 @@ + print "bsddb lib dir:", dblib_dir, " inc dir:", db_incdir + db_incs = [db_incdir] + dblibs = [dblib] ++ ++ if os.environ.get('CROSS_COMPILING') == 'yes': ++ bsddb_runtime_library_dir = None ++ else: ++ bsddb_runtime_library_dir = dblib_dir ++ + # We add the runtime_library_dirs argument because the + # BerkeleyDB lib we're linking against often isn't in the + # system dynamic library search path. This is usually +@@ -986,7 +992,7 @@ + exts.append(Extension('_bsddb', ['_bsddb.c'], + depends = ['bsddb.h'], + library_dirs=dblib_dir, +- runtime_library_dirs=dblib_dir, ++ runtime_library_dirs=bsddb_runtime_library_dir, + include_dirs=db_incs, + libraries=dblibs)) + else: +@@ -1092,12 +1098,17 @@ + else: + sqlite_extra_link_args = () + ++ if os.environ.get('CROSS_COMPILING') == 'yes': ++ sqlite_runtime_library_dirs = None ++ else: ++ sqlite_runtime_library_dirs = sqlite_libdir ++ + exts.append(Extension('_sqlite3', sqlite_srcs, + define_macros=sqlite_defines, + include_dirs=["Modules/_sqlite", + sqlite_incdir], + library_dirs=sqlite_libdir, +- runtime_library_dirs=sqlite_libdir, ++ runtime_library_dirs=sqlite_runtime_library_dirs, + extra_link_args=sqlite_extra_link_args, + libraries=["sqlite3",])) + else: +@@ -1198,9 +1209,13 @@ + elif cand == "bdb": + if db_incs is not None: + print "building dbm using bdb" ++ if os.environ.get('CROSS_COMPILING') == 'yes': ++ db_runtime_library_dir = None ++ else: ++ db_runtime_library_dir = dblib_dir + dbmext = Extension('dbm', ['dbmmodule.c'], + library_dirs=dblib_dir, +- runtime_library_dirs=dblib_dir, ++ runtime_library_dirs=db_runtime_library_dir, + include_dirs=db_incs, + define_macros=[ + ('HAVE_BERKDB_H', None), |