summaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/gcc/gcc-runtime.inc
diff options
context:
space:
mode:
authorKhem Raj <raj.khem@gmail.com>2016-05-11 10:35:45 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-05-13 13:41:32 +0100
commit9a309684cfff5e1de3dbcc9690fc73d344e63ecd (patch)
tree5776a42f1cdd7c05c0cf5fb07e7dad705d99e03f /meta/recipes-devtools/gcc/gcc-runtime.inc
parent7cabc9ec11385b1f7595a0536c6f88318162adbd (diff)
downloadpoky-9a309684cfff5e1de3dbcc9690fc73d344e63ecd.tar.gz
gcc-runtime, libgcc: Symlink c++ header and startup files in target_triplet for SDK use
We build SDKs such that gcc-cross-candian is built for only one target *-*-linux and then use -muclibc or -mmusl to let it compile code for other libc variants. This works fine when libc = glibc however it does not work for c++ programs when libc != glibc since there are c++ headers installed under ${includedir}/c++/${BINV}/${TARGET_SYS} which is fine when gcc-runtime and gcc-cross-candian uses same --target options gxx includedir searches in right triplet, but it fails with musl/uclibc since gcc will look for glibc based triplet but gcc-runtime will install them under musl/uclibc triplet. This patch symlinks the musl/uclibc triplet to glibc triplet when libc != glibc This fixes SDKs for musl/uclibc (From OE-Core rev: fcaaabb401fffcda4db9a7d1f927a2a404e4776d) Signed-off-by: Khem Raj <raj.khem@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-runtime.inc')
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc12
1 files changed, 12 insertions, 0 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index 8639c1c49e..99f50f8066 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -73,9 +73,21 @@ do_install () {
73 if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then 73 if [ "${TARGET_VENDOR_MULTILIB_ORIGINAL}" != "" -a "${TARGET_VENDOR}" != "${TARGET_VENDOR_MULTILIB_ORIGINAL}" ]; then
74 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS} 74 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR_MULTILIB_ORIGINAL}-${TARGET_OS}
75 fi 75 fi
76
77}
78
79do_install_append_class-target () {
76 if [ "${TARGET_OS}" = "linux-gnuspe" ]; then 80 if [ "${TARGET_OS}" = "linux-gnuspe" ]; then
77 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux 81 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-linux
78 fi 82 fi
83 if [ "${TCLIBC}" != "glibc" ]; then
84 case "${TARGET_OS}" in
85 "linux-musl" | "linux-uclibc" | "linux-*spe") extra_target_os="linux";;
86 "linux-musleabi" | "linux-uclibceabi") extra_target_os="linux-gnueabi";;
87 *) extra_target_os="linux";;
88 esac
89 ln -s ${TARGET_SYS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-$extra_target_os
90 fi
79 chown -R root:root ${D} 91 chown -R root:root ${D}
80} 92}
81 93