From e6fbac7aeabe00d8fb734992012dd629a8527b25 Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Thu, 20 Aug 2020 01:01:14 -0700 Subject: gcc-cross-canadian: Install gcc/g++ wrappers for musl gcc needs -mmusl option to be passed in SDK since we ship crossdk compiler configured for glibc by default, this helps in creating correct compiler defaults for musl based SDK compilers [YOCTO #13459] Signed-off-by: Khem Raj Cc: Leon Woestenberg Signed-off-by: Richard Purdie --- meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'meta/recipes-devtools/gcc/gcc-cross-canadian.inc') diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc index db17ae4685..d3875c94d3 100644 --- a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc +++ b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc @@ -139,6 +139,29 @@ do_install () { chown -R root:root ${D} cross_canadian_bindirlinks + + for i in linux ${CANADIANEXTRAOS} + do + for v in ${CANADIANEXTRAVENDOR} + do + d=${D}${bindir}/../${TARGET_ARCH}$v-$i + install -d $d + for j in ${TARGET_PREFIX}gcc${EXEEXT} ${TARGET_PREFIX}g++${EXEEXT} + do + p=${TARGET_ARCH}$v-$i-`echo $j | sed -e s,${TARGET_PREFIX},,` + case $i in + *musl*) + rm -rf $d/$p + echo "#!/usr/bin/env sh" > $d/$p + echo "exec \`dirname \$0\`/../${TARGET_SYS}/$j -mmusl \$@" >> $d/$p + chmod 0755 $d/$p + ;; + *) + ;; + esac + done + done + done } ELFUTILS = "nativesdk-elfutils" -- cgit 1.2.3-korg