{glibc,gcc-runtime}: fix warnings about libssp for builds with security flags

This can be dropped if and when the toolchain gets built without libssp,
which is the default in oe-core. We don't need gcc's libssp anyway,
since glibc provides it already, and musl has the separate
libssp_nonshared lib to supplement, which is in oe-core.

JIRA: SB-12465

Signed-off-by: Christopher Larson <chris_larson@mentor.com>
This commit is contained in:
Christopher Larson
2019-02-06 22:11:39 +00:00
parent 3902c43070
commit d53aba601e
2 changed files with 17 additions and 1 deletions

View File

@@ -59,4 +59,17 @@ FILES_libgomp-dev += "\
"
BBCLASSEXTEND = ""
do_package[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
# gcc-runtime needs libc, but glibc's utilities need libssp in some cases, so
# short-circuit the interdependency here by manually specifying it rather than
# depending on the libc packagedata.
libc_rdep = "${@'${PREFERRED_PROVIDER_virtual/libc}' if '${PREFERRED_PROVIDER_virtual/libc}' else '${TCLIBC}'}"
RDEPENDS_libgomp += "${libc_rdep}"
RDEPENDS_libssp += "${libc_rdep}"
RDEPENDS_libstdc++ += "${libc_rdep}"
RDEPENDS_libatomic += "${libc_rdep}"
RDEPENDS_libquadmath += "${libc_rdep}"
RDEPENDS_libmpx += "${libc_rdep}"
do_package_write_ipk[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
do_package_write_deb[depends] += "virtual/${MLPREFIX}libc:do_packagedata"
do_package_write_rpm[depends] += "virtual/${MLPREFIX}libc:do_packagedata"

View File

@@ -225,5 +225,8 @@ do_package_write_ipk[depends] += "${MLPREFIX}libgcc:do_packagedata"
do_package_write_deb[depends] += "${MLPREFIX}libgcc:do_packagedata"
do_package_write_rpm[depends] += "${MLPREFIX}libgcc:do_packagedata"
# glibc may need libssp for -fstack-protector builds
do_packagedata[depends] += "gcc-runtime:do_packagedata"
FILES_${PN}-dev_remove = "${base_libdir}/*_nonshared.a ${libdir}/*_nonshared.a"
FILES_${PN}-dev += "${libdir}/libc_nonshared.a ${libdir}/libpthread_nonshared.a ${libdir}/libmvec_nonshared.a"