ppc: make also linking work with big-endian tool chain
PATCH 1/1 ppc: make also linking work with big-endian tool chain
Telling just the compiler to produce little-endian objects isn't enough.
xen/arch/ppc/arch.mk +2 -0
@@ -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 + # TODO: Drop override when more of the build is working override ALL_OBJS-y = arch/$(SRCARCH)/built_in.o override ALL_LIBS-y =
xen/arch/ppc/arch.mk ppc-march-$(CONFIG_POWER_ISA_3_00) := po · line 10
Quoted 11 lines · Jan Beulich
Telling just the compiler to produce little-endian objects isn't enough.
Signed-off-by Jan Beulich <[email protected]>xen/arch/ppc/arch.mk +1
-0@@ -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.
xen/arch/ppc/arch.mk ppc-march-$(CONFIG_POWER_ISA_3_00) := po · line 14
Quoted 3 lines
xen/arch/ppc/arch.mk +0
-0# TODO: Drop override when more of the build is working override ALL_OBJS-y = arch/$(SRCARCH)/built_in.o override ALL_LIBS-y =
Quoted 11 lines · Shawn Anastasio
Quoted 10 lines · Jan Beulich
Telling just the compiler to produce little-endian objects isn't enough.
Signed-off-by Jan Beulich <[email protected]>xen/arch/ppc/arch.mk +0
-0@@ -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
Quoted 8 lines
xen/arch/ppc/arch.mk ppc-march-$(CONFIG_POWER_ISA_3_00) := po · line 10
Quoted 1 line
xen/arch/ppc/arch.mk +1
-0+LDFLAGS += -m elf64lppcLooking 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.
Quoted 9 lines
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.
xen/arch/ppc/arch.mk ppc-march-$(CONFIG_POWER_ISA_3_00) := po · line 14
Quoted 3 lines
xen/arch/ppc/arch.mk +0
-0# 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
Quoted 4 lines · Jan Beulich
Quoted 1 line · Shawn Anastasio
Acked-by Shawn Anastasio <[email protected]>Thanks.
Just to clarify, as the maintainer of PPC64, would it be my responsibility to commit this now directly to xen/staging? Or should I commit it to my own tree and have someone pull it?
I'm not super familiar with the project's maintainer workflow yet so any hints would be appreciated.
Quoted 1 line
Jan
Thanks,
Shawn
Quoted 10 lines · Shawn Anastasio
Quoted 3 lines · Jan Beulich
Quoted 1 line · Shawn Anastasio
Acked-by Shawn Anastasio <[email protected]>Thanks.
Just to clarify, as the maintainer of PPC64, would it be my responsibility to commit this now directly to xen/staging? Or should I commit it to my own tree and have someone pull it?
I'm not super familiar with the project's maintainer workflow yet so any hints would be appreciated.
Ah, so this is somewhere where we're quite different to Linux.
There is one single tree, and there are a small group of people with commit access. We're "THE REST" in the maintainers file. Jan can commit, as can I, and several others.
The role of committers is (technically at least) to take any patch from the mailing list which is suitably acked, and commit it.
So, in principle you have nothing further to do here. As this is one of Jan's patches, I'm sure he'll include in in the next set of patches he commits.
It can happen that patches fall between the cracks, so it is generally helpful for maintainers to double check and ping on IRC/email/etc if there are patches that appear to be outstanding.
~Andrew
Quoted 25 lines · Andrew Cooper
Quoted 10 lines · Shawn Anastasio
Quoted 3 lines · Jan Beulich
Quoted 1 line · Shawn Anastasio
Acked-by Shawn Anastasio <[email protected]>Thanks.
Just to clarify, as the maintainer of PPC64, would it be my responsibility to commit this now directly to xen/staging? Or should I commit it to my own tree and have someone pull it?
I'm not super familiar with the project's maintainer workflow yet so any hints would be appreciated.
Ah, so this is somewhere where we're quite different to Linux.
There is one single tree, and there are a small group of people with commit access. We're "THE REST" in the maintainers file. Jan can commit, as can I, and several others.
The role of committers is (technically at least) to take any patch from the mailing list which is suitably acked, and commit it.
So, in principle you have nothing further to do here. As this is one of Jan's patches, I'm sure he'll include in in the next set of patches he commits.
Quoted 5 lines
It can happen that patches fall between the cracks, so it is generally helpful for maintainers to double check and ping on IRC/email/etc if there are patches that appear to be outstanding.
~Andrew
Thanks for the explanation, that makes sense.
Shawn