Эх сурвалжийг харах

[ARM] 3107/3: ARM EABI: last bits to configure it

Patch from Nicolas Pitre

This adds the configuration option, and disables any FPA floating point
emulators which are not EABI compatible.

It also disables Acorn RISC OS/Arthur binary support when CONFIG_EABI=y
since it is incompatible with an EABI kernel.

Signed-off-by: Nicolas Pitre <nico@cam.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Nicolas Pitre 19 жил өмнө
parent
commit
704bdda038

+ 18 - 1
arch/arm/Kconfig

@@ -401,6 +401,21 @@ config NO_IDLE_HZ
 	  Currently at least OMAP, PXA2xx and SA11x0 platforms are known
 	  Currently at least OMAP, PXA2xx and SA11x0 platforms are known
 	  to have accurate timekeeping with dynamic tick.
 	  to have accurate timekeeping with dynamic tick.
 
 
+config AEABI
+	bool "Use the ARM EABI to compile the kernel"
+	help
+	  This option allows for the kernel to be compiled using the latest
+	  ARM ABI (aka EABI).  This is only useful if you are using a user
+	  space environment that is also compiled with EABI.
+
+	  Since there are major incompatibilities between the legacy ABI and
+	  EABI, especially with regard to structure member alignment, this
+	  option also changes the kernel syscall calling convention to
+	  disambiguate both ABIs and allow for backward compatibility support
+	  (selected with CONFIG_OABI_COMPAT).
+
+	  To use this you need GCC version 4.0.0 or later.
+
 config ARCH_DISCONTIGMEM_ENABLE
 config ARCH_DISCONTIGMEM_ENABLE
 	bool
 	bool
 	default (ARCH_LH7A40X && !LH7A40X_CONTIGMEM)
 	default (ARCH_LH7A40X && !LH7A40X_CONTIGMEM)
@@ -587,6 +602,7 @@ comment "At least one emulation must be selected"
 
 
 config FPE_NWFPE
 config FPE_NWFPE
 	bool "NWFPE math emulation"
 	bool "NWFPE math emulation"
+	depends on !AEABI
 	---help---
 	---help---
 	  Say Y to include the NWFPE floating point emulator in the kernel.
 	  Say Y to include the NWFPE floating point emulator in the kernel.
 	  This is necessary to run most binaries. Linux does not currently
 	  This is necessary to run most binaries. Linux does not currently
@@ -610,7 +626,7 @@ config FPE_NWFPE_XP
 
 
 config FPE_FASTFPE
 config FPE_FASTFPE
 	bool "FastFPE math emulation (EXPERIMENTAL)"
 	bool "FastFPE math emulation (EXPERIMENTAL)"
-	depends on !CPU_32v3 && EXPERIMENTAL
+	depends on !AEABI && !CPU_32v3 && EXPERIMENTAL
 	---help---
 	---help---
 	  Say Y here to include the FAST floating point emulator in the kernel.
 	  Say Y here to include the FAST floating point emulator in the kernel.
 	  This is an experimental much faster emulator which now also has full
 	  This is an experimental much faster emulator which now also has full
@@ -642,6 +658,7 @@ source "fs/Kconfig.binfmt"
 
 
 config ARTHUR
 config ARTHUR
 	tristate "RISC OS personality"
 	tristate "RISC OS personality"
+	depends on !AEABI
 	help
 	help
 	  Say Y here to include the kernel code necessary if you want to run
 	  Say Y here to include the kernel code necessary if you want to run
 	  Acorn RISC OS/Arthur binaries under Linux. This code is still very
 	  Acorn RISC OS/Arthur binaries under Linux. This code is still very

+ 6 - 1
arch/arm/Makefile

@@ -56,8 +56,13 @@ tune-$(CONFIG_CPU_SA1100)	:=-mtune=strongarm1100
 tune-$(CONFIG_CPU_XSCALE)	:=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale
 tune-$(CONFIG_CPU_XSCALE)	:=$(call cc-option,-mtune=xscale,-mtune=strongarm110) -Wa,-mcpu=xscale
 tune-$(CONFIG_CPU_V6)		:=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
 tune-$(CONFIG_CPU_V6)		:=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
 
 
-# Need -Uarm for gcc < 3.x
+ifeq ($(CONFIG_AEABI),y)
+CFLAGS_ABI	:=-mabi=aapcs -mno-thumb-interwork
+else
 CFLAGS_ABI	:=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
 CFLAGS_ABI	:=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,)
+endif
+
+# Need -Uarm for gcc < 3.x
 CFLAGS		+=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
 CFLAGS		+=$(CFLAGS_ABI) $(arch-y) $(tune-y) $(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,)) -msoft-float -Uarm
 AFLAGS		+=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float
 AFLAGS		+=$(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float