mirror of
https://git.yoctoproject.org/poky
synced 2026-04-01 23:02:21 +02:00
This patch fixes the problem where the CPP compiler cannot find include files. The compiler is configured to look for the files in places that do not exist. When querying the CPP for search paths, we observe messages such as these: multilib configuration: MACHINE="qemumips64" require conf/multilib.conf MULTILIBS = "multilib:lib64 multilib:lib32" DEFAULTTUNE = "mips64-n32" DEFAULTTUNE_virtclass-multilib-lib64 = "mips64" DEFAULTTUNE_virtclass-multilib-lib32 = "mips32r2" ignoring nonexistent directory "<path>/sysroots/mips64-n32-poky-linux-gnun32/usr/include/c++/6.2.0/mips64-poky-linux/32 single lib configuration: MACHINE="qemumips64" DEFAULTTUNE = "mips64-n32" ignoring nonexistent directory "<path>/sysroots/mips64-n32-poky-linux-gnun32/usr/include/c++/6.2.0/mips64-poky-linux/ To fix this, create a symlink of the name CPP expects and point it to the corresponding "gnun32" directory. [YOCTO#10142] (From OE-Core rev: 55115f90f909d27599c686852e73df321ad1edff) Signed-off-by: Juro Bystricky <juro.bystricky@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
246 lines
8.2 KiB
PHP
246 lines
8.2 KiB
PHP
require gcc-configure-common.inc
|
|
|
|
SUMMARY = "Runtime libraries from GCC"
|
|
|
|
# Over-ride the LICENSE set by gcc-${PV}.inc to remove "& GPLv3"
|
|
# All gcc-runtime packages are now covered by the runtime exception.
|
|
LICENSE = "GPL-3.0-with-GCC-exception"
|
|
|
|
CXXFLAGS_remove = "-fvisibility-inlines-hidden"
|
|
|
|
EXTRA_OECONF_PATHS = "\
|
|
--with-gxx-include-dir=${includedir}/c++/${BINV} \
|
|
--with-sysroot=/not/exist \
|
|
--with-build-sysroot=${STAGING_DIR_TARGET} \
|
|
"
|
|
|
|
EXTRA_OECONF_append_linuxstdbase = " --enable-clocale=gnu"
|
|
|
|
RUNTIMELIBITM = "libitm"
|
|
RUNTIMELIBITM_mips = ""
|
|
RUNTIMELIBITM_mipsel = ""
|
|
RUNTIMELIBITM_mips64 = ""
|
|
RUNTIMELIBITM_mips64el = ""
|
|
RUNTIMELIBITM_nios2 = ""
|
|
RUNTIMELIBITM_microblaze = ""
|
|
|
|
RUNTIMETARGET = "libssp libstdc++-v3 libgomp libatomic ${RUNTIMELIBITM} \
|
|
${@bb.utils.contains_any('FORTRAN', [',fortran',',f77'], 'libquadmath', '', d)} \
|
|
"
|
|
|
|
# ?
|
|
# libiberty
|
|
# libmudflap
|
|
# libgfortran needs separate recipe due to libquadmath dependency
|
|
|
|
do_configure () {
|
|
export CXX="${CXX} -nostdinc++ -nostdlib++"
|
|
mtarget=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
|
|
target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
|
|
hardlinkdir ${STAGING_INCDIR_NATIVE}/gcc-build-internal-$mtarget ${B}
|
|
for d in libgcc ${RUNTIMETARGET}; do
|
|
echo "Configuring $d"
|
|
rm -rf ${B}/$target/$d/
|
|
mkdir -p ${B}/$target/$d/
|
|
cd ${B}/$target/$d/
|
|
chmod a+x ${S}/$d/configure
|
|
relpath=${@os.path.relpath("${S}/$d", "${B}/$target/$d")}
|
|
$relpath/configure ${CONFIGUREOPTS} ${EXTRA_OECONF}
|
|
done
|
|
}
|
|
|
|
do_compile () {
|
|
target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
|
|
for d in libgcc ${RUNTIMETARGET}; do
|
|
cd ${B}/$target/$d/
|
|
oe_runmake MULTIBUILDTOP=${B}/$target/$d/
|
|
done
|
|
}
|
|
|
|
do_install () {
|
|
target=`echo ${TARGET_SYS} | sed -e s#-${SDKPKGSUFFIX}##`
|
|
for d in ${RUNTIMETARGET}; do
|
|
cd ${B}/$target/$d/
|
|
oe_runmake 'DESTDIR=${D}' MULTIBUILDTOP=${B}/$target/$d/ install
|
|
done
|
|
rm -rf ${D}${infodir}/libgomp.info ${D}${infodir}/dir
|
|
rm -rf ${D}${infodir}/libitm.info ${D}${infodir}/dir
|
|
rm -rf ${D}${infodir}/libquadmath.info ${D}${infodir}/dir
|
|
if [ -d ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude ]; then
|
|
rmdir --ignore-fail-on-non-empty -p ${D}${libdir}/gcc/${TARGET_SYS}/${BINV}/finclude
|
|
fi
|
|
if [ -d ${D}${infodir} ]; then
|
|
rmdir --ignore-fail-on-non-empty -p ${D}${infodir}
|
|
fi
|
|
if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
|
|
ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}
|
|
fi
|
|
|
|
}
|
|
|
|
do_install_append_class-target () {
|
|
if [ "${TARGET_OS}" = "linux-gnuspe" ]; then
|
|
ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
|
|
fi
|
|
|
|
if [ "${TARGET_OS}" = "linux-gnun32" ]; then
|
|
if [ "${MULTILIBS}" != "" ]; then
|
|
mkdir ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-pokymllib64-linux
|
|
ln -s ../${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}-pokymllib64-linux/32
|
|
else
|
|
ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
|
|
fi
|
|
fi
|
|
|
|
if [ "${TCLIBC}" != "glibc" ]; then
|
|
case "${TARGET_OS}" in
|
|
"linux-musl" | "linux-uclibc" | "linux-*spe") extra_target_os="linux";;
|
|
"linux-musleabi" | "linux-uclibceabi") extra_target_os="linux-gnueabi";;
|
|
*) extra_target_os="linux";;
|
|
esac
|
|
ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
|
|
fi
|
|
chown -R root:root ${D}
|
|
}
|
|
|
|
INHIBIT_DEFAULT_DEPS = "1"
|
|
DEPENDS = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++ libgcc"
|
|
PROVIDES = "virtual/${TARGET_PREFIX}compilerlibs"
|
|
|
|
BBCLASSEXTEND = "nativesdk"
|
|
|
|
PACKAGES = "\
|
|
${PN}-dbg \
|
|
libstdc++ \
|
|
libstdc++-precompile-dev \
|
|
libstdc++-dev \
|
|
libstdc++-staticdev \
|
|
libg2c \
|
|
libg2c-dev \
|
|
libssp \
|
|
libssp-dev \
|
|
libssp-staticdev \
|
|
libmudflap \
|
|
libmudflap-dev \
|
|
libmudflap-staticdev \
|
|
libquadmath \
|
|
libquadmath-dev \
|
|
libquadmath-staticdev \
|
|
libgomp \
|
|
libgomp-dev \
|
|
libgomp-staticdev \
|
|
libatomic \
|
|
libatomic-dev \
|
|
libatomic-staticdev \
|
|
libitm \
|
|
libitm-dev \
|
|
libitm-staticdev \
|
|
"
|
|
|
|
# The base package doesn't exist, so we clear the recommends.
|
|
RRECOMMENDS_${PN}-dbg = ""
|
|
|
|
# include python debugging scripts
|
|
FILES_${PN}-dbg += "\
|
|
${libdir}/libstdc++.so.*-gdb.py \
|
|
${datadir}/gcc-${BINV}/python/libstdcxx \
|
|
"
|
|
|
|
FILES_libg2c = "${target_libdir}/libg2c.so.*"
|
|
SUMMARY_libg2c = "Companion runtime library for g77"
|
|
FILES_libg2c-dev = "\
|
|
${libdir}/libg2c.so \
|
|
${libdir}/libg2c.a \
|
|
${libdir}/libfrtbegin.a \
|
|
"
|
|
SUMMARY_libg2c-dev = "Companion runtime library for g77 - development files"
|
|
|
|
FILES_libstdc++ = "${libdir}/libstdc++.so.*"
|
|
SUMMARY_libstdc++ = "GNU standard C++ library"
|
|
FILES_libstdc++-dev = "\
|
|
${includedir}/c++/ \
|
|
${libdir}/libstdc++.so \
|
|
${libdir}/libstdc++*.la \
|
|
${libdir}/libsupc++.la \
|
|
"
|
|
SUMMARY_libstdc++-dev = "GNU standard C++ library - development files"
|
|
FILES_libstdc++-staticdev = "\
|
|
${libdir}/libstdc++*.a \
|
|
${libdir}/libsupc++.a \
|
|
"
|
|
SUMMARY_libstdc++-staticdev = "GNU standard C++ library - static development files"
|
|
|
|
FILES_libstdc++-precompile-dev = "${includedir}/c++/${TARGET_SYS}/bits/*.gch"
|
|
SUMMARY_libstdc++-precompile-dev = "GNU standard C++ library - precompiled header files"
|
|
|
|
FILES_libssp = "${libdir}/libssp.so.*"
|
|
SUMMARY_libssp = "GNU stack smashing protection library"
|
|
FILES_libssp-dev = "\
|
|
${libdir}/libssp*.so \
|
|
${libdir}/libssp*_nonshared.a \
|
|
${libdir}/libssp*.la \
|
|
${libdir}/gcc/${TARGET_SYS}/${BINV}/include/ssp \
|
|
"
|
|
SUMMARY_libssp-dev = "GNU stack smashing protection library - development files"
|
|
FILES_libssp-staticdev = "${libdir}/libssp*.a"
|
|
SUMMARY_libssp-staticdev = "GNU stack smashing protection library - static development files"
|
|
|
|
FILES_libquadmath = "${libdir}/libquadmath*.so.*"
|
|
SUMMARY_libquadmath = "GNU quad-precision math library"
|
|
FILES_libquadmath-dev = "\
|
|
${libdir}/gcc/${TARGET_SYS}/${BINV}/include/quadmath* \
|
|
${libdir}/libquadmath*.so \
|
|
${libdir}/libquadmath.la \
|
|
"
|
|
SUMMARY_libquadmath-dev = "GNU quad-precision math library - development files"
|
|
FILES_libquadmath-staticdev = "${libdir}/libquadmath.a"
|
|
SUMMARY_libquadmath-staticdev = "GNU quad-precision math library - static development files"
|
|
|
|
# NOTE: mudflap has been removed as of gcc 4.9 and has been superseded by the address sanitiser
|
|
FILES_libmudflap = "${libdir}/libmudflap*.so.*"
|
|
SUMMARY_libmudflap = "Pointer debugging library for gcc"
|
|
FILES_libmudflap-dev = "\
|
|
${libdir}/libmudflap*.so \
|
|
${libdir}/libmudflap.la \
|
|
"
|
|
SUMMARY_libmudflap-dev = "Pointer debugging library for gcc - development files"
|
|
FILES_libmudflap-staticdev = "${libdir}/libmudflap.a"
|
|
SUMMARY_libmudflap-staticdev = "Pointer debugging library for gcc - static development files"
|
|
|
|
FILES_libgomp = "${libdir}/libgomp*${SOLIBS}"
|
|
SUMMARY_libgomp = "GNU OpenMP parallel programming library"
|
|
FILES_libgomp-dev = "\
|
|
${libdir}/libgomp*${SOLIBSDEV} \
|
|
${libdir}/libgomp*.la \
|
|
${libdir}/libgomp.spec \
|
|
${libdir}/gcc/${TARGET_SYS}/${BINV}/include/omp.h \
|
|
"
|
|
SUMMARY_libgomp-dev = "GNU OpenMP parallel programming library - development files"
|
|
FILES_libgomp-staticdev = "${libdir}/libgomp*.a"
|
|
SUMMARY_libgomp-staticdev = "GNU OpenMP parallel programming library - static development files"
|
|
|
|
FILES_libatomic = "${libdir}/libatomic.so.*"
|
|
SUMMARY_libatomic = "GNU C++11 atomics support library"
|
|
FILES_libatomic-dev = "\
|
|
${libdir}/libatomic.so \
|
|
${libdir}/libatomic.la \
|
|
"
|
|
SUMMARY_libatomic-dev = "GNU C++11 atomics support library - development files"
|
|
FILES_libatomic-staticdev = "${libdir}/libatomic.a"
|
|
SUMMARY_libatomic-staticdev = "GNU C++11 atomics support library - static development files"
|
|
|
|
FILES_libitm = "${libdir}/libitm.so.*"
|
|
SUMMARY_libitm = "GNU transactional memory support library"
|
|
FILES_libitm-dev = "\
|
|
${libdir}/libitm.so \
|
|
${libdir}/libitm.la \
|
|
${libdir}/libitm.spec \
|
|
"
|
|
SUMMARY_libitm-dev = "GNU transactional memory support library - development files"
|
|
FILES_libitm-staticdev = "${libdir}/libitm.a"
|
|
SUMMARY_libitm-staticdev = "GNU transactional memory support library - static development files"
|
|
|
|
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"
|