[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] ppc: make also linking work with big-endian tool chain



On 7/5/23 9:44 AM, Jan Beulich wrote:
> Telling just the compiler to produce little-endian objects isn't enough.
> 
> Signed-off-by: Jan Beulich <jbeulich@xxxxxxxx>
> 
> --- a/xen/arch/ppc/arch.mk
> +++ b/xen/arch/ppc/arch.mk
> @@ -7,6 +7,8 @@ ppc-march-$(CONFIG_POWER_ISA_3_00) := po
>  CFLAGS += -m64 -mlittle-endian -mcpu=$(ppc-march-y)
>  CFLAGS += -mstrict-align -mcmodel=large -mabi=elfv2 -mno-altivec -mno-vsx
>  
> +LDFLAGS += -m elf64lppc

Looking around, it seems GNU ld also has a -EL flag:

  -EL Link little-endian objects.  This affects the default output format.

Linux's build system passes both -EL and -m elf64lppc, though I'm
wondering if -EL alone would be enough.

In any case, this doesn't break the build with my ppc64le toolchain, so
if this fixes issues you're seeing with BE toolchains then it's fine
with me.

>  # TODO: Drop override when more of the build is working
>  override ALL_OBJS-y = arch/$(SRCARCH)/built_in.o
>  override ALL_LIBS-y =

Acked-by: Shawn Anastasio <sanastasio@xxxxxxxxxxxxxxxxxxxxx>




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.