diff options
Diffstat (limited to 'meta/recipes-devtools/python/python3/unixccompiler.patch')
-rw-r--r-- | meta/recipes-devtools/python/python3/unixccompiler.patch | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3/unixccompiler.patch b/meta/recipes-devtools/python/python3/unixccompiler.patch new file mode 100644 index 0000000000..b2229b4a57 --- /dev/null +++ b/meta/recipes-devtools/python/python3/unixccompiler.patch | |||
@@ -0,0 +1,33 @@ | |||
1 | Upstream-Status: Pending | ||
2 | |||
3 | The CC variable,sometimes like:"x86_64-poky-linux-gcc -m64 --sysroot=/${TMPDIR}/sysroots/qemux86-64", contains option information. | ||
4 | This will lead to wrong compiler name "qemux86-64" rather than "x86_64-poky-linux-gcc" when python finding the compiler name. | ||
5 | |||
6 | Secondly add -L=<path> this way linker will be able to resolve /usr/lib w.r.t sysroot and not | ||
7 | use hardcoded /usr/lib to look for libs which is wrong in cross compile environment and this will work | ||
8 | ok on native systems too since sysroot for native compilers is / | ||
9 | |||
10 | Signed-off-by: Mei Lei <lei.mei@intel.com> | ||
11 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
12 | Index: Python-3.3.2/Lib/distutils/unixccompiler.py | ||
13 | =================================================================== | ||
14 | --- Python-3.3.2.orig/Lib/distutils/unixccompiler.py 2013-05-15 09:32:54.000000000 -0700 | ||
15 | +++ Python-3.3.2/Lib/distutils/unixccompiler.py 2013-08-01 00:58:18.629056286 -0700 | ||
16 | @@ -202,7 +202,7 @@ | ||
17 | # ccompiler.py. | ||
18 | |||
19 | def library_dir_option(self, dir): | ||
20 | - return "-L" + dir | ||
21 | + return "-L=" + dir | ||
22 | |||
23 | def _is_gcc(self, compiler_name): | ||
24 | return "gcc" in compiler_name or "g++" in compiler_name | ||
25 | @@ -221,7 +221,7 @@ | ||
26 | # this time, there's no way to determine this information from | ||
27 | # the configuration data stored in the Python installation, so | ||
28 | # we use this hack. | ||
29 | - compiler = os.path.basename(sysconfig.get_config_var("CC")) | ||
30 | + compiler = sysconfig.get_config_var("CC") | ||
31 | if sys.platform[:6] == "darwin": | ||
32 | # MacOSX's linker doesn't understand the -R flag at all | ||
33 | return "-L" + dir | ||