diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-08-28 10:50:37 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2018-09-04 11:03:55 +0100 |
commit | 7a812523a75266752f0c67f6eb1e4691bc09bd4a (patch) | |
tree | 81b6e365f65ea92a404a2a44eb0bc983ecfdf546 | |
parent | 03b6f92245a9f534ba33a69727e15d7084893187 (diff) | |
download | poky-7a812523a75266752f0c67f6eb1e4691bc09bd4a.tar.gz |
distutils-common-base.bbclass: Define commonly used compiler variables
This is inspired from
https://github.com/python/cpython/blob/master/configure.ac
Helps cross compiling python C modules in some cases where they do
not respect normal CFLAGS
Errors like using gcc to link when compiler is clang is fixed
(From OE-Core rev: 0ab1b35172a41021f5e27c5d17d1e131ce5befd7)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/classes/distutils-common-base.bbclass | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/classes/distutils-common-base.bbclass b/meta/classes/distutils-common-base.bbclass index 824a1b68b1..94b5fd426d 100644 --- a/meta/classes/distutils-common-base.bbclass +++ b/meta/classes/distutils-common-base.bbclass | |||
@@ -1,6 +1,18 @@ | |||
1 | export STAGING_INCDIR | 1 | export STAGING_INCDIR |
2 | export STAGING_LIBDIR | 2 | export STAGING_LIBDIR |
3 | 3 | ||
4 | # LDSHARED is the ld *command* used to create shared library | ||
5 | export LDSHARED = "${CCLD} -shared" | ||
6 | # LDXXSHARED is the ld *command* used to create shared library of C++ | ||
7 | # objects | ||
8 | export LDCXXSHARED = "${CXX} -shared" | ||
9 | # CCSHARED are the C *flags* used to create objects to go into a shared | ||
10 | # library (module) | ||
11 | export CCSHARED = "-fPIC -DPIC" | ||
12 | # LINKFORSHARED are the flags passed to the $(CC) command that links | ||
13 | # the python executable | ||
14 | export LINKFORSHARED = "{SECURITY_CFLAGS} -Xlinker -export-dynamic" | ||
15 | |||
4 | FILES_${PN} += "${libdir}/* ${libdir}/${PYTHON_DIR}/*" | 16 | FILES_${PN} += "${libdir}/* ${libdir}/${PYTHON_DIR}/*" |
5 | 17 | ||
6 | FILES_${PN}-staticdev += "\ | 18 | FILES_${PN}-staticdev += "\ |