On 05.07.2023 17:10, Shawn Anastasio wrote: > 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 <[email protected]> >> >> --- 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.
What I did is check what gcc passes to ld when itself passed -mlittle or -mlittle-endian. > 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 <[email protected]> Thanks. Jan
