summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2019-02-06 17:26:34 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-02-08 10:57:19 +0000
commite2c3247c233876ab090c9ce3d5325a6d46ab350f (patch)
treecf38957a3510be612cde924f6184a5251b968a43 /meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch
parentcd6c61a26177296e24b442e2eda1514b5f931c0a (diff)
downloadpoky-e2c3247c233876ab090c9ce3d5325a6d46ab350f.tar.gz
python3: upgrade to 3.7.2
I took the same approach as the recent perl upgrade: write recipe from scratch, taking the pieces from the old recipe only when they were proven to be necessary. The pgo, manifest and ptest features are all preserved. New features: - native and target recipes are now unified into one recipe - check_build_completeness.py runs right after do_compile() and verifies that all optional modules have been built (a notorious source of regressions) - a new approach to sysconfig.py and distutils/sysconfig.py returning values appropriate for native or target builds: we copy the configuration file to a separate folder, add that folder to sys.path (through environment variable that differs between native and target builds), and point python to the file through another environment variable. There were a few other patches where it was difficult to decide if the patch is still relevant, and how to test that it works correctly; please add those as-needed by testing the new python. (From OE-Core rev: 02714c105426b0d687620913c1a7401b386428b6) Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch')
-rw-r--r--meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch56
1 files changed, 0 insertions, 56 deletions
diff --git a/meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch b/meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch
deleted file mode 100644
index ae74ef531d..0000000000
--- a/meta/recipes-devtools/python/python3/Use-correct-CFLAGS-for-extensions-when-cross-compili.patch
+++ /dev/null
@@ -1,56 +0,0 @@
1From 7fd121bb7d6c25c2e0a1c31cf76fb9bd4a9794de Mon Sep 17 00:00:00 2001
2From: Markus Lehtonen <markus.lehtonen@linux.intel.com>
3Date: Tue, 14 Aug 2018 14:11:35 +0800
4Subject: [PATCH 1/2] Use correct CFLAGS for extensions when cross-compiling
5
6Take PY_CFLAGS_NODIST into account, like in native build. This is needed
7in order to to profile-optimized build. Also, pass EXTRA_CFLAGS to
8profile-optimized build.
9
10Upstream-Status: Pending
11
12Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
13---
14 Makefile.pre.in | 4 ++--
15 setup.py | 3 ++-
16 2 files changed, 4 insertions(+), 3 deletions(-)
17
18diff --git a/Makefile.pre.in b/Makefile.pre.in
19index e2d5d3d..84bc3ff 100644
20--- a/Makefile.pre.in
21+++ b/Makefile.pre.in
22@@ -478,7 +478,7 @@ profile-opt:
23 $(MAKE) profile-removal
24
25 build_all_generate_profile:
26- $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LIBS="$(LIBS)"
27+ $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(EXTRA_CFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LDFLAGS="$(LDFLAGS) $(PGO_PROF_GEN_FLAG) @LTOFLAGS@" LIBS="$(LIBS)"
28
29 run_profile_task:
30 : # FIXME: can't run for a cross build
31@@ -488,7 +488,7 @@ build_all_merge_profile:
32 $(LLVM_PROF_MERGER)
33
34 build_all_use_profile:
35- $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(PGO_PROF_USE_FLAG) @LTOFLAGS@" LDFLAGS="$(LDFLAGS) @LTOFLAGS@"
36+ $(MAKE) @DEF_MAKE_RULE@ CFLAGS_NODIST="$(CFLAGS) $(EXTRA_CFLAGS) $(PGO_PROF_USE_FLAG) @LTOFLAGS@" LDFLAGS="$(LDFLAGS) @LTOFLAGS@"
37
38 # Compile and run with gcov
39 .PHONY=coverage coverage-lcov coverage-report
40diff --git a/setup.py b/setup.py
41index add3346..65e83b1 100644
42--- a/setup.py
43+++ b/setup.py
44@@ -263,7 +263,8 @@ class PyBuildExt(build_ext):
45 # compilers
46 if compiler is not None:
47 if cross_compiling:
48- (ccshared,cflags) = (os.environ.get('CCSHARED') or '', os.environ.get('CFLAGS') or '')
49+ (ccshared,cflags) = (os.environ.get('CCSHARED') or '',
50+ (os.environ.get('CFLAGS') or '') + ' ' + sysconfig.get_config_var('PY_CFLAGS_NODIST'))
51 else:
52 (ccshared,cflags) = sysconfig.get_config_vars('CCSHARED','CFLAGS')
53 args['compiler_so'] = compiler + ' ' + ccshared + ' ' + cflags
54--
552.17.1
56