poky/meta/classes/distutils-common-base.bbclass
Khem Raj 7a812523a7 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>
2018-09-04 11:03:55 +01:00

26 lines
778 B
Plaintext

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 += "\
${PYTHON_SITEPACKAGES_DIR}/*.a \
"
FILES_${PN}-dev += "\
${datadir}/pkgconfig \
${libdir}/pkgconfig \
${PYTHON_SITEPACKAGES_DIR}/*.la \
"