Re: [OE-core] -mmusl missing in SDK / CMake MUSL toolchain
Hello Fred, > This append at the top of toolchain-script.bbclass is thus without effect: > TARGET_CC_ARCH_append_libc-musl = " -mmusl" > > This works: > > TARGET_CC_ARCH_append_linux-musl = " -mmusl" > > FYI, > Sounds like you ran into the SDK / musl problem > Thanks, I have updated https://bugzilla.yoctoproject.org/show_bug.cgi?id=13459 with my findings so far. Regards, Leon. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#141649): https://lists.openembedded.org/g/openembedded-core/message/141649 Mute This Topic: https://lists.openembedded.org/mt/76245876/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] -mmusl missing in SDK / CMake MUSL toolchain
On Wed, Aug 19, 2020, at 5:02 PM, Leon Woestenberg wrote: > RFC: > > During the creation of the environment script for the canadian cross > SDK in toolchain-script.bbclass, > for a MUSL C library target, the OVERRIDES contains libc-glibc instead > of libc-musl. > > OVERRIDES=task-generate-content:linux-musl:x86-64:pn-meta-environment-qemux86-64:qemuall:qemux86-64:nodistro:class-cross-canadian:libc-glibc:forcevariable > > This can be easily inspected by adding these lines to the script > creation (Thanks to Richard for the suggestion on IRC). > > echo 'export TARGET_CC_ARCH=${TARGET_CC_ARCH}' >> $script > echo 'export OVERRIDES=${OVERRIDES}' >> $script > > This append at the top of toolchain-script.bbclass is thus without effect: > TARGET_CC_ARCH_append_libc-musl = " -mmusl" > > This works: > > TARGET_CC_ARCH_append_linux-musl = " -mmusl" > > (notice linux instead of libc, as linux-musl stays present in OVERRIDES.) > > I have a (minimal) test case here. Run make in the cloned repo. > https://github.com/likewise/oe-musl-sdk-cmake > FYI, Sounds like you ran into the SDK / musl problem sdk: compiler targets glibc, even though rootfs uses musl-libc https://bugzilla.yoctoproject.org/show_bug.cgi?id=13459 Using TCLIB=musl results in SDKs producing incompatible binaries https://bugzilla.yoctoproject.org/show_bug.cgi?id=13766 -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#141648): https://lists.openembedded.org/g/openembedded-core/message/141648 Mute This Topic: https://lists.openembedded.org/mt/76245876/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] -mmusl missing in SDK / CMake MUSL toolchain
RFC: During the creation of the environment script for the canadian cross SDK in toolchain-script.bbclass, for a MUSL C library target, the OVERRIDES contains libc-glibc instead of libc-musl. OVERRIDES=task-generate-content:linux-musl:x86-64:pn-meta-environment-qemux86-64:qemuall:qemux86-64:nodistro:class-cross-canadian:libc-glibc:forcevariable This can be easily inspected by adding these lines to the script creation (Thanks to Richard for the suggestion on IRC). echo 'export TARGET_CC_ARCH=${TARGET_CC_ARCH}' >> $script echo 'export OVERRIDES=${OVERRIDES}' >> $script This append at the top of toolchain-script.bbclass is thus without effect: TARGET_CC_ARCH_append_libc-musl = " -mmusl" This works: TARGET_CC_ARCH_append_linux-musl = " -mmusl" (notice linux instead of libc, as linux-musl stays present in OVERRIDES.) I have a (minimal) test case here. Run make in the cloned repo. https://github.com/likewise/oe-musl-sdk-cmake Regards, -- Leon p.s. sorry for the HTML sig earlier. -- Leon Woestenberg l...@sidebranch.com T: +31 40 711 42 76 M: +31 6 472 30 372 Sidebranch Embedded Systems Eindhoven, The Netherlands http://www.sidebranch.com On Mon, Aug 17, 2020 at 5:28 PM Leon Woestenberg via lists.openembedded.org wrote: > > Hello all, > > Compared with a BitBake/CMake built of a C application, the SDK/CMake > approach lacks the "-mmusl" flag. The resulting binaries of the SDK do not > load on the target (wrong runtime linker/loader). > > Minimal test case here (dunfell), just run make will show PASS / FAIL for > BitBake and SDK approach: > > https://github.com/likewise/oe-musl-sdk-cmake > > Has something to do with TARGET_CC_ARCH not propagating, investigation > further... > > > Regards, > > Leon. > -- > -- > Leon Woestenberg > l...@sidebranch.com > T: +31 40 711 42 76 > M: +31 6 472 30 372 > > Sidebranch Embedded Systems > Eindhoven, The Netherlands > http://www.sidebranch.com > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#141646): https://lists.openembedded.org/g/openembedded-core/message/141646 Mute This Topic: https://lists.openembedded.org/mt/76245876/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-
[OE-core] -mmusl missing in SDK / CMake MUSL toolchain
Hello all, Compared with a BitBake/CMake built of a C application, the SDK/CMake approach lacks the "-mmusl" flag. The resulting binaries of the SDK do not load on the target (wrong runtime linker/loader). Minimal test case here (dunfell), just run make will show PASS / FAIL for BitBake and SDK approach: https://github.com/likewise/oe-musl-sdk-cmake Has something to do with TARGET_CC_ARCH not propagating, investigation further... Regards, Leon. -- -- Leon Woestenberg l...@sidebranch.com T: +31 40 711 42 76 M: +31 6 472 30 372 Sidebranch Embedded Systems Eindhoven, The Netherlands http://www.sidebranch.com -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#141577): https://lists.openembedded.org/g/openembedded-core/message/141577 Mute This Topic: https://lists.openembedded.org/mt/76245876/21656 Group Owner: openembedded-core+ow...@lists.openembedded.org Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-