diff options
author | Khem Raj <raj.khem@gmail.com> | 2020-08-20 01:01:14 -0700 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-08-22 15:46:55 +0100 |
commit | dd14862946e3820f224b00bbd7772917b2aca3e3 (patch) | |
tree | a1d2943110e17676a73128d45bb7a7bdd33b360d /meta/recipes-devtools/gcc/gcc-cross-canadian.inc | |
parent | fd2081188ca0ebc4755a3473b64b22842333a722 (diff) | |
download | poky-dd14862946e3820f224b00bbd7772917b2aca3e3.tar.gz |
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]
(From OE-Core rev: e6fbac7aeabe00d8fb734992012dd629a8527b25)
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Leon Woestenberg <leon@sidebranch.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-devtools/gcc/gcc-cross-canadian.inc')
-rw-r--r-- | meta/recipes-devtools/gcc/gcc-cross-canadian.inc | 23 |
1 files changed, 23 insertions, 0 deletions
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 () { | |||
139 | chown -R root:root ${D} | 139 | chown -R root:root ${D} |
140 | 140 | ||
141 | cross_canadian_bindirlinks | 141 | cross_canadian_bindirlinks |
142 | |||
143 | for i in linux ${CANADIANEXTRAOS} | ||
144 | do | ||
145 | for v in ${CANADIANEXTRAVENDOR} | ||
146 | do | ||
147 | d=${D}${bindir}/../${TARGET_ARCH}$v-$i | ||
148 | install -d $d | ||
149 | for j in ${TARGET_PREFIX}gcc${EXEEXT} ${TARGET_PREFIX}g++${EXEEXT} | ||
150 | do | ||
151 | p=${TARGET_ARCH}$v-$i-`echo $j | sed -e s,${TARGET_PREFIX},,` | ||
152 | case $i in | ||
153 | *musl*) | ||
154 | rm -rf $d/$p | ||
155 | echo "#!/usr/bin/env sh" > $d/$p | ||
156 | echo "exec \`dirname \$0\`/../${TARGET_SYS}/$j -mmusl \$@" >> $d/$p | ||
157 | chmod 0755 $d/$p | ||
158 | ;; | ||
159 | *) | ||
160 | ;; | ||
161 | esac | ||
162 | done | ||
163 | done | ||
164 | done | ||
142 | } | 165 | } |
143 | 166 | ||
144 | ELFUTILS = "nativesdk-elfutils" | 167 | ELFUTILS = "nativesdk-elfutils" |