diff options
author | Khem Raj <raj.khem@gmail.com> | 2018-08-25 16:14:27 -0700 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2018-08-28 10:48:07 -0700 |
commit | 4835cadb099621a1510834e2d653864ba7a78a6d (patch) | |
tree | e30663a04b280c8978b8c69ab8e06594dfb87a6b | |
parent | a5439ff9627d309f6980947f5ee573d85e672228 (diff) | |
download | openembedded-core-contrib-4835cadb099621a1510834e2d653864ba7a78a6d.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
Signed-off-by: Khem Raj <raj.khem@gmail.com>
-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 @@ export STAGING_INCDIR export STAGING_LIBDIR +# LDSHARED is the ld *command* used to create shared library +export LDSHARED = "${CCLD} -shared" +# LDXXSHARED is the ld *command* used to create shared library of C++ +# objects +export LDCXXSHARED = "${CXX} -shared" +# CCSHARED are the C *flags* used to create objects to go into a shared +# library (module) +export CCSHARED = "-fPIC -DPIC" +# LINKFORSHARED are the flags passed to the $(CC) command that links +# the python executable +export LINKFORSHARED = "{SECURITY_CFLAGS} -Xlinker -export-dynamic" + FILES_${PN} += "${libdir}/* ${libdir}/${PYTHON_DIR}/*" FILES_${PN}-staticdev += "\ |