Message ID | 1384755694-30293-1-git-send-email-alistair@popple.id.au (mailing list archive) |
---|---|
State | Accepted, archived |
Commit | b2ca8c895e711b10d6f28b26248358bfa2f354ad |
Headers | show |
On Mon, 2013-11-18 at 17:21 +1100, Alistair Popple wrote: > The kernel doesn't build correctly using the ELFv2 ABI. This patch > ensures that the ELFv1 ABI is used when building a kernel with an > ELFv2 enabled compiler. > > Signed-off-by: Alistair Popple <alistair@popple.id.au> > --- > arch/powerpc/Makefile | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile > index 607acf5..8a24636 100644 > --- a/arch/powerpc/Makefile > +++ b/arch/powerpc/Makefile > @@ -111,6 +111,7 @@ endif > endif > > CFLAGS-$(CONFIG_PPC64) := -mtraceback=no -mcall-aixdesc > +CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1) > CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,-mminimal-toc) > CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions) > CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD) How hard would it be to get the kernel to work with the new ABI? Do you know where I can find a document for it? -Scott
On Mon, 18 Nov 2013 13:29:25 Scott Wood wrote: > On Mon, 2013-11-18 at 17:21 +1100, Alistair Popple wrote: [snip] > > How hard would it be to get the kernel to work with the new ABI? We are preparing patches at the moment to allow the kernel to support a userspace compiled with the new ABI, however the kernel itself still needs to be built using the old ABI. I'm not sure how hard it would be to compile a kernel with the new ABI. It mostly compiles now however I'm guessing there's probably some code that would need porting to make it functional. > Do you know where I can find a document for it? The ABI is still under development so there isn't any documentation available for it yet. > -Scott Regards, Alistair
On Mon, Nov 18, 2013 at 05:21:34PM +1100, Alistair Popple wrote: > The kernel doesn't build correctly using the ELFv2 ABI. This patch > ensures that the ELFv1 ABI is used when building a kernel with an > ELFv2 enabled compiler. Let me check I've got this straight. The ELFv2 ABI is still being developed, so there are no released toolchains that support it right? So this patch is precautionary, in that it means kernels from this commit onward will build correctly with newer toolchains. Anyone wanting to build an older kernel with a new toolchain will need to backport this patch? cheers
On Tue, 19 Nov 2013 14:25:53 Michael Ellerman wrote: > On Mon, Nov 18, 2013 at 05:21:34PM +1100, Alistair Popple wrote: > > The kernel doesn't build correctly using the ELFv2 ABI. This patch > > ensures that the ELFv1 ABI is used when building a kernel with an > > ELFv2 enabled compiler. > > Let me check I've got this straight. > > The ELFv2 ABI is still being developed, so there are no released > toolchains that support it right? I believe ELFv2 patches started going upstream to gcc last week. > So this patch is precautionary, in that it means kernels from this > commit onward will build correctly with newer toolchains. Anyone wanting > to build an older kernel with a new toolchain will need to backport this > patch? No, only people wanting to build PPC64 little endian kernels with newer toolchains should need this (as ELFv2 is the default for PPC64LE). In all cases execpt PPC64LE the newer toolchains should default to ELFv1. > cheers Regards, Alistair
diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 607acf5..8a24636 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -111,6 +111,7 @@ endif endif CFLAGS-$(CONFIG_PPC64) := -mtraceback=no -mcall-aixdesc +CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mabi=elfv1) CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mcmodel=medium,-mminimal-toc) CFLAGS-$(CONFIG_PPC64) += $(call cc-option,-mno-pointers-to-nested-functions) CFLAGS-$(CONFIG_PPC32) := -ffixed-r2 $(MULTIPLEWORD)
The kernel doesn't build correctly using the ELFv2 ABI. This patch ensures that the ELFv1 ABI is used when building a kernel with an ELFv2 enabled compiler. Signed-off-by: Alistair Popple <alistair@popple.id.au> --- arch/powerpc/Makefile | 1 + 1 file changed, 1 insertion(+)