All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sbsa-acs: Adjust target tuple for clang
@ 2021-06-10  7:22 Khem Raj
  2021-06-10  9:13 ` [meta-arm] " Ross Burton
  0 siblings, 1 reply; 3+ messages in thread
From: Khem Raj @ 2021-06-10  7:22 UTC (permalink / raw)
  To: meta-arm; +Cc: Khem Raj, Jon Mason, Ross Burton

Current settings assume glibc tuples and hence when building with musl C
library clang can not find correct cross tools and system headers and
libraries

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Jon Mason <jon.mason@arm.com>
Cc: Ross Burton <ross.burton@arm.com>
---
 meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb b/meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb
index 173cfa7..20d6534 100644
--- a/meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb
+++ b/meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb
@@ -24,6 +24,11 @@ EDK2_EXTRA_BUILD = "--module ShellPkg/Application/sbsa-acs/uefi_app/SbsaAvs.inf"
 
 PACKAGES_PATH .= ":${S}/edk2-libc"
 
+do_configure_prepend_libc-musl() {
+    sed -i -e "s/-target arm-linux-gnueabi/-target arm-linux-musleabi/g" ${S}/BaseTools/Conf/tools_def.template
+    sed -i -e "s/-target aarch64-linux-gnu/-target aarch64-linux-musl/g" ${S}/BaseTools/Conf/tools_def.template
+}
+
 do_install() {
     install -d ${D}/firmware
     install ${B}/Build/${EDK2_PLATFORM}/${EDK2_BUILD_MODE}_${EDK_COMPILER}/*/Sbsa.efi ${D}/firmware/
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [meta-arm] [PATCH] sbsa-acs: Adjust target tuple for clang
  2021-06-10  7:22 [PATCH] sbsa-acs: Adjust target tuple for clang Khem Raj
@ 2021-06-10  9:13 ` Ross Burton
  2021-06-10 13:56   ` Khem Raj
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Burton @ 2021-06-10  9:13 UTC (permalink / raw)
  To: Khem Raj; +Cc: meta-arm

As those files are part of EDK2 not ACS, this should be in the
edk2-firmware recipe itself.

Which leads to the questions 1) why is this a problem on acs and not
edk2-firmware, and 2) how can we fix this upstream?

Ross

On Thu, 10 Jun 2021 at 08:22, Khem Raj <raj.khem@gmail.com> wrote:
>
> Current settings assume glibc tuples and hence when building with musl C
> library clang can not find correct cross tools and system headers and
> libraries
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Jon Mason <jon.mason@arm.com>
> Cc: Ross Burton <ross.burton@arm.com>
> ---
>  meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb | 5 +++++
>  1 file changed, 5 insertions(+)
>
> diff --git a/meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb b/meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb
> index 173cfa7..20d6534 100644
> --- a/meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb
> +++ b/meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb
> @@ -24,6 +24,11 @@ EDK2_EXTRA_BUILD = "--module ShellPkg/Application/sbsa-acs/uefi_app/SbsaAvs.inf"
>
>  PACKAGES_PATH .= ":${S}/edk2-libc"
>
> +do_configure_prepend_libc-musl() {
> +    sed -i -e "s/-target arm-linux-gnueabi/-target arm-linux-musleabi/g" ${S}/BaseTools/Conf/tools_def.template
> +    sed -i -e "s/-target aarch64-linux-gnu/-target aarch64-linux-musl/g" ${S}/BaseTools/Conf/tools_def.template
> +}
> +
>  do_install() {
>      install -d ${D}/firmware
>      install ${B}/Build/${EDK2_PLATFORM}/${EDK2_BUILD_MODE}_${EDK_COMPILER}/*/Sbsa.efi ${D}/firmware/
> --
> 2.32.0
>
>
> 
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [meta-arm] [PATCH] sbsa-acs: Adjust target tuple for clang
  2021-06-10  9:13 ` [meta-arm] " Ross Burton
@ 2021-06-10 13:56   ` Khem Raj
  0 siblings, 0 replies; 3+ messages in thread
From: Khem Raj @ 2021-06-10 13:56 UTC (permalink / raw)
  To: Ross Burton; +Cc: meta-arm

On Thu, Jun 10, 2021 at 2:13 AM Ross Burton <ross@burtonini.com> wrote:
>
> As those files are part of EDK2 not ACS, this should be in the
> edk2-firmware recipe itself.
>
> Which leads to the questions 1) why is this a problem on acs and not
> edk2-firmware, and 2) how can we fix this upstream?
>

this patch did not fix the issue entirely see
https://errors.yoctoproject.org/Errors/Details/586266/

the issue is that when cross compiling with OE we have to match
-target option to
TARGET_SYS variable. So some sed stuff which can insert TARGET_SYS would
be required.  Upstream assumes cross compile tuples, which is
limiting, they could
offer an option to accept it from environment in that case we can set
it via recipe.

> Ross
>
> On Thu, 10 Jun 2021 at 08:22, Khem Raj <raj.khem@gmail.com> wrote:
> >
> > Current settings assume glibc tuples and hence when building with musl C
> > library clang can not find correct cross tools and system headers and
> > libraries
> >
> > Signed-off-by: Khem Raj <raj.khem@gmail.com>
> > Cc: Jon Mason <jon.mason@arm.com>
> > Cc: Ross Burton <ross.burton@arm.com>
> > ---
> >  meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb | 5 +++++
> >  1 file changed, 5 insertions(+)
> >
> > diff --git a/meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb b/meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb
> > index 173cfa7..20d6534 100644
> > --- a/meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb
> > +++ b/meta-arm/recipes-test/sbsa-acs/sbsa-acs_3.0.bb
> > @@ -24,6 +24,11 @@ EDK2_EXTRA_BUILD = "--module ShellPkg/Application/sbsa-acs/uefi_app/SbsaAvs.inf"
> >
> >  PACKAGES_PATH .= ":${S}/edk2-libc"
> >
> > +do_configure_prepend_libc-musl() {
> > +    sed -i -e "s/-target arm-linux-gnueabi/-target arm-linux-musleabi/g" ${S}/BaseTools/Conf/tools_def.template
> > +    sed -i -e "s/-target aarch64-linux-gnu/-target aarch64-linux-musl/g" ${S}/BaseTools/Conf/tools_def.template
> > +}
> > +
> >  do_install() {
> >      install -d ${D}/firmware
> >      install ${B}/Build/${EDK2_PLATFORM}/${EDK2_BUILD_MODE}_${EDK_COMPILER}/*/Sbsa.efi ${D}/firmware/
> > --
> > 2.32.0
> >
> >
> > 
> >

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-06-10 13:57 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-10  7:22 [PATCH] sbsa-acs: Adjust target tuple for clang Khem Raj
2021-06-10  9:13 ` [meta-arm] " Ross Burton
2021-06-10 13:56   ` Khem Raj

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.