From 193ba57865784c6e36b0e481f4054578a187d3cf Mon Sep 17 00:00:00 2001 From: Mark Hatle Date: Thu, 30 Jan 2020 20:06:17 -0800 Subject: gcc-runtime: Fix C++ multilib headers The C++ headers are slightly different for different multilibs. The Yocto Project name (canonical arch) is different then the gcc multilib directory name. Put in code that will syncronize these two items, allows C++ support to function properly, avoiding conflicts in the process. Signed-off-by: Mark Hatle --- .../recipes-devtools/gcc/gcc-runtime_%.bbappend | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend index 873f83ea..75fa6419 100644 --- a/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend +++ b/meta-xilinx-standalone/recipes-devtools/gcc/gcc-runtime_%.bbappend @@ -55,6 +55,25 @@ do_install_append_xilinx-standalone_class-target() { if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then rm -rf ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS} fi + + # link the C++ header into the place that multilib gcc expects + # C++ compiler looks at usr/include/c++/version/canonical-arch/mlib + if [ "${TARGET_SYS_MULTILIB_ORIGINAL}" != "" -a "${TARGET_SYS_MULTILIB_ORIGINAL}" != "${TARGET_SYS}" ]; then + mlib=${BASE_LIB_tune-${DEFAULTTUNE}} + mlib=${mlib##lib/} + + link_name=${D}${includedir}/c++/${BINV}/${TARGET_SYS_MULTILIB_ORIGINAL}/${mlib} + target=${D}${includedir}/c++/${BINV}/${TARGET_SYS} + + echo mkdir -p $link_name + mkdir -p $link_name + for each in bits ext ; do + relpath=$(python3 -c "import os.path; print(os.path.relpath('$target/$each', '$(dirname $link_name/$each)'))") + + echo ln -s $relpath $link_name/$each + ln -s $relpath $link_name/$each + done + fi } FILES_${PN}-dbg_append_xilinx-standalone_class-target = "\ -- cgit v1.2.3-54-g00ecf