From: "Alejandro Hernandez Samaniego" <alhe@linux.microsoft.com>
To: openembedded-core@lists.openembedded.org
Cc: Khem Raj <raj.khem@gmail.com>,
Leon Woestenberg <leon@sidebranch.com>,
Richard Purdie <richard.purdie@linuxfoundation.org>,
Alejandro Hernandez Samaniego <alhe@linux.microsoft.com>
Subject: [PATCH] gcc-cross-canadian: Install gcc/g++ wrappers for musl
Date: Thu, 27 May 2021 11:02:45 -0600 [thread overview]
Message-ID: <20210527170245.2179602-1-alhe@linux.microsoft.com> (raw)
From: Khem Raj <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]
(From OE-Core rev: e6fbac7aeabe00d8fb734992012dd629a8527b25)
Cc: Leon Woestenberg <leon@sidebranch.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Alejandro Hernandez Samaniego <alhe@linux.microsoft.com>
---
.../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.25.1
reply other threads:[~2021-05-27 17:02 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210527170245.2179602-1-alhe@linux.microsoft.com \
--to=alhe@linux.microsoft.com \
--cc=leon@sidebranch.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
--cc=richard.purdie@linuxfoundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.