From: "Khem Raj" <raj.khem@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>, Leon Woestenberg <leon@sidebranch.com>
Subject: [PATCH V2 2/3] gcc-cross-canadian: Install gcc/g++ wrappers for musl
Date: Thu, 20 Aug 2020 01:01:14 -0700 [thread overview]
Message-ID: <20200820080115.2715139-2-raj.khem@gmail.com> (raw)
In-Reply-To: <20200820080115.2715139-1-raj.khem@gmail.com>
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 <raj.khem@gmail.com>
Cc: Leon Woestenberg <leon@sidebranch.com>
---
v2: Delete file before creating wrapper
.../gcc/gcc-cross-canadian.inc | 23 +++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian.inc b/meta/recipes-devtools/gcc/gcc-cross-canadian.inc
index 553ef7fe62..c5935b978d 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"
--
2.28.0
next prev parent reply other threads:[~2020-08-20 8:01 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 8:01 [PATCH V2 1/3] binutils: Let crosssdk gold linker generate 4096 btyes long .interp section Khem Raj
2020-08-20 8:01 ` Khem Raj [this message]
2020-08-20 21:07 ` [PATCH V2 2/3] gcc-cross-canadian: Install gcc/g++ wrappers for musl Leon Woestenberg
2020-08-20 22:51 ` Khem Raj
2020-08-21 10:51 ` [OE-core] " Richard Purdie
2020-08-21 19:51 ` Khem Raj
2020-08-20 8:01 ` [PATCH V2 3/3] gcc-cross-canadian: Correct the regexp to delete versioned gcc binary Khem Raj
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200820080115.2715139-2-raj.khem@gmail.com \
--to=raj.khem@gmail.com \
--cc=leon@sidebranch.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox