summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch')
-rw-r--r--meta/recipes-devtools/python/python3/0001-python3-use-cc_basename-to-replace-CC-for-checking-c.patch67
1 files changed, 33 insertions, 34 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
index bfddc1ad52..bbeabe4389 100644
--- 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
@@ -1,4 +1,4 @@
1From 5f9eea2c4f8716830f6c8855a3e10872119fae32 Mon Sep 17 00:00:00 2001 1From ababc7b1db8c406910766e11cdd04cbef7a706c9 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com> 2From: Changqing Li <changqing.li@windriver.com>
3Date: Mon, 22 Oct 2018 15:19:51 +0800 3Date: Mon, 22 Oct 2018 15:19:51 +0800
4Subject: [PATCH] python3: use cc_basename to replace CC for checking compiler 4Subject: [PATCH] python3: use cc_basename to replace CC for checking compiler
@@ -14,40 +14,39 @@ x86_64-wrs-linux-gcc: error: unrecognized command line option '-fp-model'
14Here use cc_basename to replace CC for checking compiler to avoid such 14Here use cc_basename to replace CC for checking compiler to avoid such
15kind of issue. 15kind of issue.
16 16
17Upstream-Status: Pending 17Upstream-Status: Submitted [https://github.com/python/cpython/pull/96399]
18 18
19Signed-off-by: Li Zhou <li.zhou@windriver.com> 19Signed-off-by: Li Zhou <li.zhou@windriver.com>
20 20
21patch originally from Li Zhou, I just rework it to new version 21patch originally from Li Zhou, I just rework it to new version
22 22
23Signed-off-by: Changqing Li <changqing.li@windriver.com> 23Signed-off-by: Changqing Li <changqing.li@windriver.com>
24
25--- 24---
26 configure.ac | 19 ++++++++++--------- 25 configure.ac | 19 ++++++++++---------
27 1 file changed, 10 insertions(+), 9 deletions(-) 26 1 file changed, 10 insertions(+), 9 deletions(-)
28 27
29diff --git a/configure.ac b/configure.ac 28diff --git a/configure.ac b/configure.ac
30index d60f052..e491e24 100644 29index 384718d..5a1d58b 100644
31--- a/configure.ac 30--- a/configure.ac
32+++ b/configure.ac 31+++ b/configure.ac
33@@ -54,6 +54,7 @@ AC_CONFIG_HEADER(pyconfig.h) 32@@ -137,6 +137,7 @@ AC_CONFIG_HEADERS([pyconfig.h])
34 AC_CANONICAL_HOST 33 AC_CANONICAL_HOST
35 AC_SUBST(build) 34 AC_SUBST([build])
36 AC_SUBST(host) 35 AC_SUBST([host])
37+LT_INIT 36+LT_INIT
38 37
39 # pybuilddir.txt will be created by --generate-posix-vars in the Makefile 38 AS_VAR_IF([cross_compiling], [maybe],
40 rm -f pybuilddir.txt 39 [AC_MSG_ERROR([Cross compiling required --host=HOST-TUPLE and --build=ARCH])]
41@@ -689,7 +690,7 @@ AC_MSG_RESULT($with_cxx_main) 40@@ -896,7 +897,7 @@ AC_SUBST([CXX])
42 preset_cxx="$CXX" 41 preset_cxx="$CXX"
43 if test -z "$CXX" 42 if test -z "$CXX"
44 then 43 then
45- case "$CC" in 44- case "$CC" in
46+ case "$cc_basename" in 45+ case "$cc_basename" in
47 gcc) AC_PATH_TOOL(CXX, [g++], [g++], [notfound]) ;; 46 gcc) AC_PATH_TOOL([CXX], [g++], [g++], [notfound]) ;;
48 cc) AC_PATH_TOOL(CXX, [c++], [c++], [notfound]) ;; 47 cc) AC_PATH_TOOL([CXX], [c++], [c++], [notfound]) ;;
49 clang|*/clang) AC_PATH_TOOL(CXX, [clang++], [clang++], [notfound]) ;; 48 clang|*/clang) AC_PATH_TOOL([CXX], [clang++], [clang++], [notfound]) ;;
50@@ -975,7 +976,7 @@ rmdir CaseSensitiveTestDir 49@@ -1328,7 +1329,7 @@ rmdir CaseSensitiveTestDir
51 50
52 case $ac_sys_system in 51 case $ac_sys_system in
53 hp*|HP*) 52 hp*|HP*)
@@ -56,16 +55,16 @@ index d60f052..e491e24 100644
56 cc|*/cc) CC="$CC -Ae";; 55 cc|*/cc) CC="$CC -Ae";;
57 esac;; 56 esac;;
58 esac 57 esac
59@@ -1366,7 +1367,7 @@ else 58@@ -1854,7 +1855,7 @@ esac
60 fi], 59 ],
61 [AC_MSG_RESULT(no)]) 60 [AC_MSG_RESULT([no])])
62 if test "$Py_LTO" = 'true' ; then 61 if test "$Py_LTO" = 'true' ; then
63- case $CC in 62- case $CC in
64+ case $cc_basename in 63+ case $cc_basename in
65 *clang*) 64 *clang*)
66 AC_SUBST(LLVM_AR) 65 LDFLAGS_NOLTO="-fno-lto"
67 AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path}) 66 dnl Clang linker requires -flto in order to link objects with LTO information.
68@@ -1456,7 +1457,7 @@ then 67@@ -1983,7 +1984,7 @@ then
69 fi 68 fi
70 fi 69 fi
71 LLVM_PROF_ERR=no 70 LLVM_PROF_ERR=no
@@ -74,7 +73,7 @@ index d60f052..e491e24 100644
74 *clang*) 73 *clang*)
75 # Any changes made here should be reflected in the GCC+Darwin case below 74 # Any changes made here should be reflected in the GCC+Darwin case below
76 PGO_PROF_GEN_FLAG="-fprofile-instr-generate" 75 PGO_PROF_GEN_FLAG="-fprofile-instr-generate"
77@@ -1517,7 +1518,7 @@ esac 76@@ -2147,7 +2148,7 @@ AC_MSG_RESULT([$BOLT_APPLY_FLAGS])
78 # compiler and platform. BASECFLAGS tweaks need to be made even if the 77 # compiler and platform. BASECFLAGS tweaks need to be made even if the
79 # user set OPT. 78 # user set OPT.
80 79
@@ -83,25 +82,25 @@ index d60f052..e491e24 100644
83 *clang*) 82 *clang*)
84 cc_is_clang=1 83 cc_is_clang=1
85 ;; 84 ;;
86@@ -1653,7 +1654,7 @@ yes) 85@@ -2419,7 +2420,7 @@ yes)
87 86
88 # ICC doesn't recognize the option, but only emits a warning 87 # ICC doesn't recognize the option, but only emits a warning
89 ## XXX does it emit an unused result warning and can it be disabled? 88 ## XXX does it emit an unused result warning and can it be disabled?
90- case "$CC" in 89- AS_CASE([$CC],
91+ case "$cc_basename" in 90+ AS_CASE([$cc_basename],
92 *icc*) 91 [*icc*], [ac_cv_disable_unused_result_warning=no]
93 ac_cv_disable_unused_result_warning=no 92 [PY_CHECK_CC_WARNING([disable], [unused-result])])
94 ;; 93 AS_VAR_IF([ac_cv_disable_unused_result_warning], [yes],
95@@ -1993,7 +1994,7 @@ yes) 94@@ -2665,7 +2666,7 @@ yes)
96 ;; 95 ;;
97 esac 96 esac
98 97
99-case "$CC" in 98-case "$CC" in
100+case "$cc_basename" in 99+case "$cc_basename" in
101 *icc*) 100 *mpicc*)
102 # ICC needs -fp-model strict or floats behave badly 101 CFLAGS_NODIST="$CFLAGS_NODIST"
103 CFLAGS_NODIST="$CFLAGS_NODIST -fp-model strict" 102 ;;
104@@ -2765,7 +2766,7 @@ then 103@@ -3482,7 +3483,7 @@ then
105 then 104 then
106 LINKFORSHARED="-Wl,--export-dynamic" 105 LINKFORSHARED="-Wl,--export-dynamic"
107 fi;; 106 fi;;
@@ -110,12 +109,12 @@ index d60f052..e491e24 100644
110 *gcc*) 109 *gcc*)
111 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null 110 if $CC -Xlinker --help 2>&1 | grep export-dynamic >/dev/null
112 then 111 then
113@@ -5507,7 +5508,7 @@ if test "$have_gcc_asm_for_x87" = yes; then 112@@ -6803,7 +6804,7 @@ if test "$ac_cv_gcc_asm_for_x87" = yes; then
114 # Some versions of gcc miscompile inline asm: 113 # Some versions of gcc miscompile inline asm:
115 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491 114 # http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46491
116 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html 115 # http://gcc.gnu.org/ml/gcc/2010-11/msg00366.html
117- case $CC in 116- case $CC in
118+ case $cc_basename in 117+ case $cc_basename in
119 *gcc*) 118 *gcc*)
120 AC_MSG_CHECKING(for gcc ipa-pure-const bug) 119 AC_MSG_CHECKING([for gcc ipa-pure-const bug])
121 saved_cflags="$CFLAGS" 120 saved_cflags="$CFLAGS"