summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3
diff options
context:
space:
mode:
authorChangqing Li <changqing.li@windriver.com>2018-10-23 13:22:18 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-01-07 14:38:39 +0000
commit82315924b79b349b3798dd40786a19ee4f474cd4 (patch)
treebeabc1c48b7226f1a727d2d8487a1e9e0c651cb4 /meta/recipes-devtools/python/python3
parent6a080d90e5001bde30e8a1ade68a02bcd8a29df3 (diff)
downloadpoky-82315924b79b349b3798dd40786a19ee4f474cd4.tar.gz
python/python3: use cc_basename to replace CC for checking compiler
When working path contains "clang"/"gcc"/"icc", it might be part of $CC because of the "--sysroot" parameter. That could cause judgement error about clang/gcc/icc compilers. eg: if build under /yocto/builds/xicc/, bitbake python, $CC will contains xicc, will make $CC match *icc, but actuall xicc just folder name. When "*icc" is matched, below errors are reported when compiling python/python3: x86_64-wrs-linux-gcc: error: strict: No such file or directory x86_64-wrs-linux-gcc: error: unrecognized command line option '-fp-model' Here use cc_basename to replace CC for checking compiler to avoid such kind of issue. (From OE-Core rev: 96383efa2726ed1bf7893332d726112a8552fc24) Signed-off-by: Li Zhou <li.zhou@windriver.com> Signed-off-by: Changqing Li <changqing.li@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3')
-rw-r--r--meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch140
1 files changed, 140 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch b/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch
new file mode 100644
index 0000000000..ae473661ec
--- /dev/null
+++ b/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch
@@ -0,0 +1,140 @@
1From 564a5cc634028970dc2f9d8ecc0e464a4fb1dcb6 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Mon, 22 Oct 2018 15:19:51 +0800
4Subject: [PATCH] python3: use cc_basename to replace CC for checking compiler
5
6When working path contains "clang"/"gcc"/"icc", it might be part of $CC
7because of the "--sysroot" parameter. That could cause judgement error
8about clang/gcc/icc compilers. e.g.
9When "icc" is containded in working path, below errors are reported when
10compiling python3:
11x86_64-wrs-linux-gcc: error: strict: No such file or directory
12x86_64-wrs-linux-gcc: error: unrecognized command line option '-fp-model'
13
14Here use cc_basename to replace CC for checking compiler to avoid such
15kind of issue.
16
17Upstream-Status: Pending
18
19Signed-off-by: Li Zhou <li.zhou@windriver.com>
20
21patch originally from Li Zhou, I just rework it to new version
22
23Signed-off-by: Changqing Li <changqing.li@windriver.com>
24---
25 configure.ac | 23 ++++++++++++-----------
26 1 file changed, 12 insertions(+), 11 deletions(-)
27
28diff --git a/configure.ac b/configure.ac
29index 95c98d1..1b9589e 100644
30--- a/configure.ac
31+++ b/configure.ac
32@@ -54,6 +54,7 @@ AC_CONFIG_HEADER(pyconfig.h)
33 AC_CANONICAL_HOST
34 AC_SUBST(build)
35 AC_SUBST(host)
36+LT_INIT
37
38 # pybuilddir.txt will be created by --generate-posix-vars in the Makefile
39 rm -f pybuilddir.txt
40@@ -716,7 +717,7 @@ AC_MSG_RESULT($with_cxx_main)
41 preset_cxx="$CXX"
42 if test -z "$CXX"
43 then
44- case "$CC" in
45+ case "$cc_basename" in
46 gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
47 cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
48 clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;;
49@@ -978,14 +979,14 @@ rmdir CaseSensitiveTestDir
50
51 case $MACHDEP in
52 bsdos*)
53- case $CC in
54+ case $cc_basename in
55 gcc) CC="$CC -D_HAVE_BSDI";;
56 esac;;
57 esac
58
59 case $ac_sys_system in
60 hp*|HP*)
61- case $CC in
62+ case $cc_basename in
63 cc|*/cc) CC="$CC -Ae";;
64 esac;;
65 esac
66@@ -1310,7 +1311,7 @@ else
67 fi],
68 [AC_MSG_RESULT(no)])
69 if test "$Py_LTO" = 'true' ; then
70- case $CC in
71+ case $cc_basename in
72 *clang*)
73 # Any changes made here should be reflected in the GCC+Darwin case below
74 LTOFLAGS="-flto"
75@@ -1374,7 +1375,7 @@ then
76 fi
77 fi
78 LLVM_PROF_ERR=no
79-case $CC in
80+case $cc_basename in
81 *clang*)
82 # Any changes made here should be reflected in the GCC+Darwin case below
83 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
84@@ -1451,7 +1452,7 @@ then
85 WRAP="-fwrapv"
86 fi
87
88- case $CC in
89+ case $cc_basename in
90 *clang*)
91 cc_is_clang=1
92 ;;
93@@ -1553,7 +1554,7 @@ yes)
94
95 # ICC doesn't recognize the option, but only emits a warning
96 ## XXX does it emit an unused result warning and can it be disabled?
97- case "$CC" in
98+ case "$cc_basename" in
99 *icc*)
100 ac_cv_disable_unused_result_warning=no
101 ;;
102@@ -1808,7 +1809,7 @@ yes)
103 esac
104
105 # ICC needs -fp-model strict or floats behave badly
106-case "$CC" in
107+case "$cc_basename" in
108 *icc*)
109 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict"
110 ;;
111@@ -2574,7 +2575,7 @@ then
112 then CCSHARED="-fPIC"
113 else CCSHARED="-Kpic -belf"
114 fi;;
115- IRIX*/6*) case $CC in
116+ IRIX*/6*) case $cc_basename in
117 *gcc*) CCSHARED="-shared";;
118 *) CCSHARED="";;
119 esac;;
120@@ -2615,7 +2616,7 @@ then
121 then
122 LINKFORSHARED="-Wl,--export-dynamic"
123 fi;;
124- SunOS/5*) case $CC in
125+ SunOS/5*) case $cc_basename in
126 *gcc*)
127 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
128 then
129@@ -5187,7 +5188,7 @@ if test "$have_gcc_asm_for_x87" = yes; then
130 # Some versions of gcc miscompile inline asm:
131 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
132 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
133- case $CC in
134+ case $cc_basename in
135 *gcc*)
136 AC_MSG_CHECKING(for gcc ipa-pure-const bug)
137 saved_cflags="$CFLAGS"
138--
1392.7.4
140