summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch114
-rw-r--r--meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch140
-rw-r--r--meta/recipes-devtools/python/python3_3.5.6.bb1
-rw-r--r--meta/recipes-devtools/python/python_2.7.15.bb1
4 files changed, 256 insertions, 0 deletions
diff --git a/meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch b/meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch
new file mode 100644
index 0000000000..6e4f820913
--- /dev/null
+++ b/meta/recipes-devtools/python/python/0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch
@@ -0,0 +1,114 @@
1From 3f49be81e31c164654aeb10b65ebade982ca2ed8 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Mon, 22 Oct 2018 15:24:48 +0800
4Subject: [PATCH] python2: 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 python:
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 orignally from Li Zhou, I just rework it to new version
22
23Signed-off-by: Changqing Li <changqing.li@windriver.com>
24---
25 configure.ac | 18 +++++++++---------
26 1 file changed, 9 insertions(+), 9 deletions(-)
27
28diff --git a/configure.ac b/configure.ac
29index db1c940..dfcd89a 100644
30--- a/configure.ac
31+++ b/configure.ac
32@@ -684,7 +684,7 @@ AC_MSG_RESULT($with_cxx_main)
33 preset_cxx="$CXX"
34 if test -z "$CXX"
35 then
36- case "$CC" in
37+ case "$cc_basename" in
38 gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;;
39 cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;;
40 esac
41@@ -757,14 +757,14 @@ rmdir CaseSensitiveTestDir
42
43 case $MACHDEP in
44 bsdos*)
45- case $CC in
46+ case $cc_basename in
47 gcc) CC="$CC -D_HAVE_BSDI";;
48 esac;;
49 esac
50
51 case $ac_sys_system in
52 hp*|HP*)
53- case $CC in
54+ case $cc_basename in
55 cc|*/cc) CC="$CC -Ae";;
56 esac;;
57 SunOS*)
58@@ -1084,7 +1084,7 @@ then
59 fi
60
61 # Clang also needs -fwrapv
62- case $CC in
63+ case $cc_basename in
64 *clang*) WRAP="-fwrapv"
65 ;;
66 esac
67@@ -1304,7 +1304,7 @@ yes)
68 esac
69
70 # ICC needs -fp-model strict or floats behave badly
71-case "$CC" in
72+case "$cc_basename" in
73 *icc*)
74 BASECFLAGS="$BASECFLAGS -fp-model strict"
75 ;;
76@@ -1443,7 +1443,7 @@ else
77 fi],
78 [AC_MSG_RESULT(no)])
79 if test "$Py_LTO" = 'true' ; then
80- case $CC in
81+ case $cc_basename in
82 *clang*)
83 # Any changes made here should be reflected in the GCC+Darwin case below
84 LTOFLAGS="-flto"
85@@ -1508,7 +1508,7 @@ then
86 fi
87 fi
88 LLVM_PROF_ERR=no
89-case $CC in
90+case $cc_basename in
91 *clang*)
92 # Any changes made here should be reflected in the GCC+Darwin case below
93 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
94@@ -2322,7 +2322,7 @@ then
95 then CCSHARED="-fPIC"
96 else CCSHARED="-Kpic -belf"
97 fi;;
98- IRIX*/6*) case $CC in
99+ IRIX*/6*) case $cc_basename in
100 *gcc*) CCSHARED="-shared";;
101 *) CCSHARED="";;
102 esac;;
103@@ -2366,7 +2366,7 @@ then
104 then
105 LINKFORSHARED="-Wl,--export-dynamic"
106 fi;;
107- SunOS/5*) case $CC in
108+ SunOS/5*) case $cc_basename in
109 *gcc*)
110 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
111 then
112--
1132.7.4
114
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
diff --git a/meta/recipes-devtools/python/python3_3.5.6.bb b/meta/recipes-devtools/python/python3_3.5.6.bb
index b4f6e55535..d64cb18c38 100644
--- a/meta/recipes-devtools/python/python3_3.5.6.bb
+++ b/meta/recipes-devtools/python/python3_3.5.6.bb
@@ -44,6 +44,7 @@ SRC_URI += "\
44 file://0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch \ 44 file://0004-bpo-33570-TLS-1.3-ciphers-for-OpenSSL-1.1.1-GH-6976.patch \
45 file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch \ 45 file://0005-bpo-30714-ALPN-changes-for-OpenSSL-1.1.0f-2305.patch \
46 file://run-ptest \ 46 file://run-ptest \
47 file://0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch \
47 " 48 "
48 49
49inherit multilib_header python3native update-alternatives qemu ptest 50inherit multilib_header python3native update-alternatives qemu ptest
diff --git a/meta/recipes-devtools/python/python_2.7.15.bb b/meta/recipes-devtools/python/python_2.7.15.bb
index 7a6da884e5..f462d08725 100644
--- a/meta/recipes-devtools/python/python_2.7.15.bb
+++ b/meta/recipes-devtools/python/python_2.7.15.bb
@@ -33,6 +33,7 @@ SRC_URI += "\
33 file://float-endian.patch \ 33 file://float-endian.patch \
34 file://0001-closes-bpo-34540-Convert-shutil._call_external_zip-t.patch \ 34 file://0001-closes-bpo-34540-Convert-shutil._call_external_zip-t.patch \
35 file://0001-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch \ 35 file://0001-2.7-bpo-34623-Use-XML_SetHashSalt-in-_elementtree-GH.patch \
36 file://0001-python2-use-cc_basename-to-replace-CC-for-checking-c.patch \
36" 37"
37 38
38S = "${WORKDIR}/Python-${PV}" 39S = "${WORKDIR}/Python-${PV}"