[OE-core] [PATCH v2] machine/arch-riscv: Fix newlib and baremetal builds

Alistair Francis alistair23 at gmail.com
Tue Nov 5 22:42:53 UTC 2019


On Tue, Nov 5, 2019 at 2:42 PM Khem Raj <raj.khem at gmail.com> wrote:
>
> On Tue, Nov 5, 2019 at 1:57 PM Alistair Francis
> <alistair.francis at wdc.com> wrote:
> >
> > Fix the following errors for newlib and baremetal libcs:
> >   ld: unrecognized option '--hash-style=sysv'
> >   ld: unrecognized option '--hash-style=gnu'
> >
> > Setting LINKER_HASH_STYLE to empty for just newlib and baremetal doesn't
> > work as GCC still ends up being built with --hash-style=gnu which causes
> > failures when using a built newlib SDK.
> >
> > Signed-off-by: Alistair Francis <alistair.francis at wdc.com>
> > ---
> >  meta/conf/machine/include/riscv/arch-riscv.inc | 3 +++
> >  1 file changed, 3 insertions(+)
> >
> > diff --git a/meta/conf/machine/include/riscv/arch-riscv.inc b/meta/conf/machine/include/riscv/arch-riscv.inc
> > index 19f8f3e211..f3edcc39f7 100644
> > --- a/meta/conf/machine/include/riscv/arch-riscv.inc
> > +++ b/meta/conf/machine/include/riscv/arch-riscv.inc
> > @@ -8,3 +8,6 @@ TUNE_CCARGS .= ""
> >
> >  # QEMU usermode fails with invalid instruction error (For riscv32)
> >  MACHINE_FEATURES_BACKFILL_CONSIDERED_append = "${@bb.utils.contains('TUNE_FEATURES', 'riscv32', ' qemu-usermode', '', d)}"
> > +
> > +# --hash-style is unsupported
> > +LINKER_HASH_STYLE = ""
>
> I think we still need to use newlib and baremetal overrides

That produces a SDK that doesn't work though.

Alistair

>
> > --
> > 2.23.0
> >


More information about the Openembedded-core mailing list