ARM: fix build error with GCC 4.5.0
PATCH 1/1 ARM: fix build error with GCC 4.5.0
Fix the following error which occurs when building an ARM kernel with GCC 4.5.0:
arm-linux-gcc -Wp,-MD,kernel/.bounds.s.d -nostdinc
[command line edited to remove paths]
-D__KERNEL__ -mlittle-endian
-Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -marm -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=arm9tdmi -msoft-float -Uarm -fomit-frame-pointer -g
-DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(bounds)" -D"KBUILD_MODNAME=KBUILD_STR(bounds)" -fverbose-asm -S -o kernel/bounds.s kernel/bounds.c kernel/bounds.c:1:0: error: FPA is unsupported in the AAPCS
---
Seen with this compiler:
arch/arm/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
arch/arm/Makefile +1 -1
@@ -91,7 +91,7 @@ tune-$(CONFIG_CPU_FEROCEON) :=$(call cc-option,-mtune=marvell-f,-mtune=xscale) tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) ifeq ($(CONFIG_AEABI),y) -CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork +CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp else CFLAGS_ABI :=$(call cc-option,-mapcs-32,-mabi=apcs-gnu) $(call cc-option,-mno-thumb-interwork,) endif
Signature · 1 line
1.7.2.3
PATCH 1/1 ARM: fix build error with GCC 4.5.0
Quoted 31 lines · Rabin Vincent
Fix the following error which occurs when building an ARM kernel with GCC 4.5.0:
arm-linux-gcc -Wp,-MD,kernel/.bounds.s.d -nostdinc
[command line edited to remove paths]
-D__KERNEL__ -mlittle-endian
-Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -marm -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=arm9tdmi -msoft-float -Uarm -fomit-frame-pointer -g
-DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(bounds)" -D"KBUILD_MODNAME=KBUILD_STR(bounds)" -fverbose-asm -S -okernel/bounds.skernel/bounds.ckernel/bounds.c:1:0: error: FPA is unsupported in the AAPCSSigned-off-by Rabin Vincent <[email protected]>---
Seen with this compiler:arch/arm/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/Makefile +0
-0
arch/arm/Makefile tune-$(CONFIG_CPU_FEROCEON) :=$(call cc-option,-mtune=marvell-f,-mtune=xscale) · line 94
Quoted 5 lines
arch/arm/Makefile +1
-1@@ -91,7 +91,7 @@ tune-$(CONFIG_CPU_FEROCEON) :=$(call cc-option,-mtune=marvell-f,-mtune=xscale) tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) ifeq ($(CONFIG_AEABI),y) -CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork +CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp
The real question is why something is trying to use floating-point. It shouldn't.
Signature · 2 lines
M?ns Rullg?rd mans at mansr.com
PATCH 1/1 ARM: fix build error with GCC 4.5.0
Quoted 35 lines · M?ns Rullg?rd
Quoted 33 lines · Rabin Vincent
Fix the following error which occurs when building an ARM kernel with GCC 4.5.0:
arm-linux-gcc -Wp,-MD,kernel/.bounds.s.d -nostdinc
[command line edited to remove paths]
-D__KERNEL__ -mlittle-endian
-Wall -Wundef
-Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -Os -marm -fno-dwarf2-cfi-asm -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=5 -march=armv5te -mtune=arm9tdmi -msoft-float -Uarm -fomit-frame-pointer -g
-DCC_HAVE_ASM_GOTO -D"KBUILD_STR(s)=#s"
-D"KBUILD_BASENAME=KBUILD_STR(bounds)" -D"KBUILD_MODNAME=KBUILD_STR(bounds)" -fverbose-asm -S -okernel/bounds.skernel/bounds.ckernel/bounds.c:1:0: error: FPA is unsupported in the AAPCSSigned-off-by Rabin Vincent <[email protected]>---
Seen with this compiler:arch/arm/Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)arch/arm/Makefile +0
-0@@ -91,7 +91,7 @@ tune-$(CONFIG_CPU_FEROCEON) :=$(call cc-option,-mtune=marvell-f,-mtune=xscale) tune-$(CONFIG_CPU_V6) :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm)
Quoted 6 lines
arch/arm/Makefile tune-$(CONFIG_CPU_FEROCEON) :=$(call cc-option,-mtune=marvell-f,-mtune=xscale) · line 94
Quoted 3 lines
arch/arm/Makefile +1
-1ifeq ($(CONFIG_AEABI),y) -CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork +CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfpThe real question is why something is trying to use floating-point. It shouldn't.
Indeed. I suspect an improperly patched or configured gcc-4.5.0, or broken kernel sources. Especially considering that the kernel passes -msoft-float to gcc (see above).
I know gcc-4.5.0 configured for arm-linux-gnueabi built working EABI kernels a few months ago.
PATCH 1/1 ARM: fix build error with GCC 4.5.0
Quoted 14 lines · Mikael Pettersson
Quoted 5 lines · M?ns Rullg?rd
Quoted 3 lines · Rabin Vincent
Fix the following error which occurs when building an ARM kernel with GCC 4.5.0:
Quoted 7 lines
arch/arm/Makefile tune-$(CONFIG_CPU_FEROCEON) :=$(call cc-option,-mtune=marvell-f,-mtune=xscale) · line 94
Quoted 4 lines
kernel/bounds.c:1:0: error: FPA is unsupported in the AAPCSarch/arm/Makefile +1
-1-CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork +CFLAGS_ABI :=-mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfpThe real question is why something is trying to use floating-point. It shouldn't.
Quoted 6 lines
Indeed. I suspect an improperly patched or configured gcc-4.5.0, or broken kernel sources. Especially considering that the kernel passes -msoft-float to gcc (see above).
I know gcc-4.5.0 configured for arm-linux-gnueabi built working EABI kernels a few months ago.
FWIW, GCC 4.5.1 built a working ARM kernel for me yesterday.
Signature · 2 lines
M?ns Rullg?rd mans at mansr.com
PATCH 1/1 ARM: fix build error with GCC 4.5.0
In reply to Mikael Pettersson2010/11/5 Mikael Pettersson <[email protected]>:
Quoted 43 lines
M?ns Rullg?rd writes:
?> Rabin Vincent <[email protected]> writes:
?>
?> > Fix the following error which occurs when building an ARM kernel with
?> > GCC 4.5.0:
?> >
?> > ? arm-linux-gcc -Wp,-MD,kernel/.bounds.s.d ?-nostdinc
?> > ? [command line edited to remove paths]
?> > ? -D__KERNEL__ -mlittle-endian
?> > ? -Wall -Wundef
?> > ? -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
?> > ? -Werror-implicit-function-declaration -Wno-format-security
?> > ? -fno-delete-null-pointer-checks -Os -marm -fno-dwarf2-cfi-asm
?> > ? -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=5
?> > ? -march=armv5te -mtune=arm9tdmi -msoft-float -Uarm -fomit-frame-pointer -g
?> > ? -DCC_HAVE_ASM_GOTO ? ?-D"KBUILD_STR(s)=#s"
?> > ? -D"KBUILD_BASENAME=KBUILD_STR(bounds)" ?-D"KBUILD_MODNAME=KBUILD_STR(bounds)"
?> > ? -fverbose-asm -S -okernel/bounds.skernel/bounds.c
?> > ?kernel/bounds.c:1:0: error: FPA is unsupported in the AAPCS
?> >
?> > Signed-off-by: Rabin Vincent <[email protected]>
?> > ---
?> > Seen with this compiler:
?> >
?> > http://kernel.org/pub/tools/crosstool/files/bin/x86_64/4.5.0/x86_64-gcc-4.5.0-nolibc_arm-linux.tar.bz2
?> >
?> > ?arch/arm/Makefile | ? ?2 +-
?> > ?1 files changed, 1 insertions(+), 1 deletions(-)
?> >
?> > diff --git a/arch/arm/Makefile b/arch/arm/Makefile
?> > index b87aed0..c06d9ed 100644
?> > --- a/arch/arm/Makefile
?> > +++ b/arch/arm/Makefile
?> > @@ -91,7 +91,7 @@ tune-$(CONFIG_CPU_FEROCEON) ? ? ?:=$(call cc-option,-mtune=marvell-f,-mtune=xscale) ?> > ?tune-$(CONFIG_CPU_V6) ? ? ? ? ? ? :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) ?> >
?> > ?ifeq ($(CONFIG_AEABI),y)
?> > -CFLAGS_ABI ? ? ? ?:=-mabi=aapcs-linux -mno-thumb-interwork
?> > +CFLAGS_ABI ? ? ? ?:=-mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp
?>
?> The real question is why something is trying to use floating-point.
?> It shouldn't.
Quoted 6 lines
Indeed. I suspect an improperly patched or configured gcc-4.5.0, or broken kernel sources. Especially considering that the kernel passes -msoft-float to gcc (see above).
I know gcc-4.5.0 configured for arm-linux-gnueabi built working EABI kernels a few months ago.
The kernel sources are clean Linus' tree, so I guess it must be the compiler configuration then. Indeed, running the above mentioned cross compiler with -msoft-float -mabi=aapcs-linux even on an empty source file yields the same error. I've cc'd Tony here who I believe builds these prebuilt compilers at http://kernel.org/pub/tools/crosstool/.
Rabin
PATCH 1/1 ARM: fix build error with GCC 4.5.0
Quoted 48 lines · Rabin Vincent
2010/11/5 Mikael Pettersson <[email protected]>:
Quoted 47 lines
M?ns Rullg?rd writes:
?> Rabin Vincent <[email protected]> writes:
?>
?> > Fix the following error which occurs when building an ARM kernel with
?> > GCC 4.5.0:
?> >
?> > ? arm-linux-gcc -Wp,-MD,kernel/.bounds.s.d ?-nostdinc
?> > ? [command line edited to remove paths]
?> > ? -D__KERNEL__ -mlittle-endian
?> > ? -Wall -Wundef
?> > ? -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common
?> > ? -Werror-implicit-function-declaration -Wno-format-security
?> > ? -fno-delete-null-pointer-checks -Os -marm -fno-dwarf2-cfi-asm
?> > ? -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=5
?> > ? -march=armv5te -mtune=arm9tdmi -msoft-float -Uarm -fomit-frame-pointer -g
?> > ? -DCC_HAVE_ASM_GOTO ? ?-D"KBUILD_STR(s)=#s"
?> > ? -D"KBUILD_BASENAME=KBUILD_STR(bounds)" ?-D"KBUILD_MODNAME=KBUILD_STR(bounds)"
?> > ? -fverbose-asm -S -okernel/bounds.skernel/bounds.c
?> > ?kernel/bounds.c:1:0: error: FPA is unsupported in the AAPCS
?> >
?> > Signed-off-by: Rabin Vincent <[email protected]>
?> > ---
?> > Seen with this compiler:
?> >
?> > http://kernel.org/pub/tools/crosstool/files/bin/x86_64/4.5.0/x86_64-gcc-4.5.0-nolibc_arm-linux.tar.bz2
?> >
?> > ?arch/arm/Makefile | ? ?2 +-
?> > ?1 files changed, 1 insertions(+), 1 deletions(-)
?> >
?> > diff --git a/arch/arm/Makefile b/arch/arm/Makefile
?> > index b87aed0..c06d9ed 100644
?> > --- a/arch/arm/Makefile
?> > +++ b/arch/arm/Makefile
?> > @@ -91,7 +91,7 @@ tune-$(CONFIG_CPU_FEROCEON) ? ? ?:=$(call cc-option,-mtune=marvell-f,-mtune=xscale) ?> > ?tune-$(CONFIG_CPU_V6) ? ? ? ? ? ? :=$(call cc-option,-mtune=arm1136j-s,-mtune=strongarm) ?> >
?> > ?ifeq ($(CONFIG_AEABI),y)
?> > -CFLAGS_ABI ? ? ? ?:=-mabi=aapcs-linux -mno-thumb-interwork
?> > +CFLAGS_ABI ? ? ? ?:=-mabi=aapcs-linux -mno-thumb-interwork -mfpu=vfp
?>
?> The real question is why something is trying to use floating-point.
?> It shouldn't.Indeed. I suspect an improperly patched or configured gcc-4.5.0, or broken kernel sources. Especially considering that the kernel passes -msoft-float to gcc (see above).
Quoted 8 lines
Quoted 2 lines
I know gcc-4.5.0 configured for arm-linux-gnueabi built working EABI kernels a few months ago.
The kernel sources are clean Linus' tree, so I guess it must be the compiler configuration then. Indeed, running the above mentioned cross compiler with -msoft-float -mabi=aapcs-linux even on an empty source file yields the same error. I've cc'd Tony here who I believe builds these prebuilt compilers at http://kernel.org/pub/tools/crosstool/.
How was that gcc configured? You can find out by running `arm-linux-gcc -v'.
PATCH 1/1 ARM: fix build error with GCC 4.5.0
2010/11/5 Mikael Pettersson <[email protected]>:
Quoted 15 lines
Rabin Vincent writes:
?> 2010/11/5 Mikael Pettersson <[email protected]>:
?> > Indeed. I suspect an improperly patched or configured gcc-4.5.0, ?> > or broken kernel sources. Especially considering that the kernel ?> > passes -msoft-float to gcc (see above).
?> >
?> > I know gcc-4.5.0 configured for arm-linux-gnueabi built working EABI ?> > kernels a few months ago.
?>
?> The kernel sources are clean Linus' tree, so I guess it must be the ?> compiler configuration then. ?Indeed, running the above mentioned cross ?> compiler with -msoft-float -mabi=aapcs-linux even on an empty source ?> file yields the same error. ?I've cc'd Tony here who I believe builds ?> these prebuilt compilers at http://kernel.org/pub/tools/crosstool/.
Quoted 1 line
How was that gcc configured? You can find out by running `arm-linux-gcc -v'.
$ arm-linux-gcc -v Using built-in specs. COLLECT_GCC=arm-linux-gcc COLLECT_LTO_WRAPPER=[path removed]/gcc-4.5.0-nolibc/arm-linux/bin/../libexec/gcc/arm-linux/4.5.0/lto-wrapper Target: arm-linux Configured with: /home/tony/buildall/src/gcc/configure --target=arm-linux --enable-targets=all --prefix=/opt/cross/gcc-4.5.0-nolibc/arm-linux/ --enable-languages=c --with-newlib --without-headers --enable-sjlj-exceptions --with-system-libunwind --disable-nls --disable-threads --disable-shared --disable-libmudflap --disable-libssp --disable-libgomp --disable-decimal-float --enable-checking=release --with-mpfr=/home/tony/buildall/src/sys-x86_64 --with-gmp=/home/tony/buildall/src/sys-x86_64 --disable-bootstrap Thread model: single gcc version 4.5.0 (GCC)
Signature · 1 line
Rabin
PATCH 1/1 ARM: fix build error with GCC 4.5.0
Quoted 18 lines · Rabin Vincent
2010/11/5 Mikael Pettersson <[email protected]>:
Quoted 15 lines
Rabin Vincent writes:
?> 2010/11/5 Mikael Pettersson <[email protected]>:
?> > Indeed. I suspect an improperly patched or configured gcc-4.5.0, ?> > or broken kernel sources. Especially considering that the kernel ?> > passes -msoft-float to gcc (see above).
?> >
?> > I know gcc-4.5.0 configured for arm-linux-gnueabi built working EABI ?> > kernels a few months ago.
?>
?> The kernel sources are clean Linus' tree, so I guess it must be the ?> compiler configuration then. ?Indeed, running the above mentioned cross ?> compiler with -msoft-float -mabi=aapcs-linux even on an empty source ?> file yields the same error. ?I've cc'd Tony here who I believe builds ?> these prebuilt compilers at http://kernel.org/pub/tools/crosstool/.Quoted 1 line
How was that gcc configured? You can find out by running `arm-linux-gcc -v'.
Quoted 10 lines
$ arm-linux-gcc -v Using built-in specs. COLLECT_GCC=arm-linux-gcc COLLECT_LTO_WRAPPER=[path removed]/gcc-4.5.0-nolibc/arm-linux/bin/../libexec/gcc/arm-linux/4.5.0/lto-wrapper Target: arm-linux Configured with: /home/tony/buildall/src/gcc/configure --target=arm-linux --enable-targets=all --prefix=/opt/cross/gcc-4.5.0-nolibc/arm-linux/ --enable-languages=c --with-newlib --without-headers --enable-sjlj-exceptions
That's an OABI compiler. You want a compiler configured for
--target=arm-unknown-linux-gnueabi
and without that --enable-sjlj-exceptions as well.
OABI is super-legacy and essentially unsupported by current gcc.
PATCH 1/1 ARM: fix build error with GCC 4.5.0
Quoted 7 lines · Mikael Pettersson
That's an OABI compiler. You want a compiler configured for
--target=arm-unknown-linux-gnueabi
and without that --enable-sjlj-exceptions as well.
OABI is super-legacy and essentially unsupported by current gcc.
Thanks. I'll fix that when I re-spin for gcc-4.5.1 (hopefully late next week.
Yours Tony
PATCH 1/1 ARM: fix build error with GCC 4.5.0
In reply to Mikael PetterssonQuoted 7 lines · Mikael Pettersson
That's an OABI compiler. You want a compiler configured for
--target=arm-unknown-linux-gnueabi
and without that --enable-sjlj-exceptions as well.
OABI is super-legacy and essentially unsupported by current gcc.
The previous compiler was the results of configuring for arm-linux now I have:
$ ./buildall/cross.x86_64/gcc-4.4.5-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -v Using built-in specs. Target: arm-unknown-linux-gnueabi Configured with: /home/tony/buildall/src/gcc/configure --target=arm-unknown-linux-gnueabi --enable-targets=all --prefix=/home/tony/buildall/cross.x86_64/gcc-4.4.5-nolibc/arm-unknown-linux-gnueabi/ --enable-languages=c --with-newlib --without-headers --with-system-libunwind --disable-nls --disable-threads --disable-shared --disable-libmudflap --disable-libssp --disable-libgomp --disable-decimal-float --enable-checking=release --with-mpfr=/home/tony/buildall/src/sys-x86_64 --with-gmp=/home/tony/buildall/src/sys-x86_64 --disable-bootstrap Thread model: single gcc version 4.4.5 (GCC)
Is that correct?
Yours Tony
PATCH 1/1 ARM: fix build error with GCC 4.5.0
Quoted 12 lines · Tony Breeds
Quoted 7 lines · Mikael Pettersson
That's an OABI compiler. You want a compiler configured for
--target=arm-unknown-linux-gnueabi
and without that --enable-sjlj-exceptions as well.
OABI is super-legacy and essentially unsupported by current gcc.
The previous compiler was the results of configuring for arm-linux now I have:
Quoted 8 lines
$ ./buildall/cross.x86_64/gcc-4.4.5-nolibc/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -v Using built-in specs. Target: arm-unknown-linux-gnueabi Configured with: /home/tony/buildall/src/gcc/configure --target=arm-unknown-linux-gnueabi --enable-targets=all --prefix=/home/tony/buildall/cross.x86_64/gcc-4.4.5-nolibc/arm-unknown-linux-gnueabi/ --enable-languages=c --with-newlib --without-headers --with-system-libunwind --disable-nls --disable-threads --disable-shared --disable-libmudflap --disable-libssp --disable-libgomp --disable-decimal-float --enable-checking=release --with-mpfr=/home/tony/buildall/src/sys-x86_64 --with-gmp=/home/tony/buildall/src/sys-x86_64 --disable-bootstrap Thread model: single gcc version 4.4.5 (GCC)Is that correct?
Drop --with-system-libunwind. OABI was sjlj while EABI uses an ARM EABI specific unwinder implemented in gcc. This may or may not matter if you only want to compile the kernel.
The other options should be ok, though I personally wouldn't pass --disable-threads, --disable-decimal-float, or --disable-bootstrap.
PATCH 1/1 ARM: fix build error with GCC 4.5.0
Quoted 3 lines · Mikael Pettersson
Drop --with-system-libunwind. OABI was sjlj while EABI uses an ARM EABI specific unwinder implemented in gcc. This may or may not matter if you only want to compile the kernel.
I'm not building a libc so the kernel is pretty much all that will be compilable with these compilers.
Quoted 2 lines
The other options should be ok, though I personally wouldn't pass --disable-threads, --disable-decimal-float, or --disable-bootstrap.
They're used for other platforms as long as the don't hurt arm I'll leave them there to keep the scripts simple.
Thanks for your time. I hope to have the i386 and x86_64 gcc-4.4.5 tollchains on kernel.org tomorrow. 4.5.1 shortly after that.
Yours Tony
Cross compilers available on kernel.org
In reply to Mikael PetterssonHi All,
I've just added 4.4.5 and 4.5.1 hosted on i686 and x86_64 to:
http://kernel.org/pub/tools/crosstool/files/bin/
These compilers do not have libc support so they're pretty much only useful for building the kernel.
If you'd like to see other platforms there or have feature requests don't hesitate to poke me.
Yours Tony