* Question: __ARM_EABI__
@ 2010-01-13 19:08 H Hartley Sweeten
2010-01-13 20:27 ` Mikael Pettersson
0 siblings, 1 reply; 9+ messages in thread
From: H Hartley Sweeten @ 2010-01-13 19:08 UTC (permalink / raw)
To: linux-arm-kernel
Hello all,
The following commit added a check for __ARM_EABI__ and raises a
warning if it's not defined.
commit 6603a4fd5195a004dec5f9568e38ff76bae630c1
Author: Claudio Scordino <claudio@evidence.eu.com>
Date: Fri Oct 30 12:06:05 2009 +0100
ARM: 5776/1: Check compiler version and EABI support when adding ARM unwind support.
Where is this definition supposed to come from?
I am using an EABI compiler but the warning still shows up.
Thanks,
Hartley
^ permalink raw reply [flat|nested] 9+ messages in thread
* Question: __ARM_EABI__
2010-01-13 19:08 Question: __ARM_EABI__ H Hartley Sweeten
@ 2010-01-13 20:27 ` Mikael Pettersson
2010-01-13 20:57 ` H Hartley Sweeten
0 siblings, 1 reply; 9+ messages in thread
From: Mikael Pettersson @ 2010-01-13 20:27 UTC (permalink / raw)
To: linux-arm-kernel
H Hartley Sweeten writes:
> Hello all,
>
> The following commit added a check for __ARM_EABI__ and raises a
> warning if it's not defined.
>
> commit 6603a4fd5195a004dec5f9568e38ff76bae630c1
> Author: Claudio Scordino <claudio@evidence.eu.com>
> Date: Fri Oct 30 12:06:05 2009 +0100
>
> ARM: 5776/1: Check compiler version and EABI support when adding ARM unwind support.
>
> Where is this definition supposed to come from?
The C compiler used to compile the kernel.
> I am using an EABI compiler but the warning still shows up.
Then your compiler is broken, or you haven't told it to be EABI.
gcc-4.4 works.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Question: __ARM_EABI__
2010-01-13 20:27 ` Mikael Pettersson
@ 2010-01-13 20:57 ` H Hartley Sweeten
2010-01-13 21:05 ` Russell King - ARM Linux
0 siblings, 1 reply; 9+ messages in thread
From: H Hartley Sweeten @ 2010-01-13 20:57 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday, January 13, 2010 1:28 PM, Mikael Pettersson wrote:
> H Hartley Sweeten writes:
>> Hello all,
>>
>> The following commit added a check for __ARM_EABI__ and raises a
>> warning if it's not defined.
>>
>> commit 6603a4fd5195a004dec5f9568e38ff76bae630c1
>> Author: Claudio Scordino <claudio@evidence.eu.com>
>> Date: Fri Oct 30 12:06:05 2009 +0100
>>
>> ARM: 5776/1: Check compiler version and EABI support when adding ARM unwind support.
>>
>> Where is this definition supposed to come from?
>
> The C compiler used to compile the kernel.
OK. I'm using a gcc-4.3.2 compiler created with crosstool-NG:
$ ~/toolchain/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc --version
.arm-unknown-linux-gnueabi-gcc (crosstool-NG-hg_default at 1523_6c2a6c04187e) 4.3.2
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>> I am using an EABI compiler but the warning still shows up.
>
> Then your compiler is broken, or you haven't told it to be EABI.
>
> gcc-4.4 works.
If I compile the following with the toolchain above:
#if defined(__ARM_EABI__)
#warning __ARM_EABI__ is defined
#endif
int main(int argc, char *argv[])
{
return 0;
}
I get:
$ ~/toolchain/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc tmp.c
tmp.c:2:2: warning: #warning __ARM_EABI__ is defined
If I compile the same file with my host gcc (gcc (Debian 4.3.2-1.1) 4.3.2) I don't get
the warning message.
So the option appears to be present in my toolchain but I still get
the warning when compiling the kernel.
Any other ideas?
Regards,
Hartley
^ permalink raw reply [flat|nested] 9+ messages in thread
* Question: __ARM_EABI__
2010-01-13 20:57 ` H Hartley Sweeten
@ 2010-01-13 21:05 ` Russell King - ARM Linux
2010-01-13 21:10 ` H Hartley Sweeten
0 siblings, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux @ 2010-01-13 21:05 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jan 13, 2010 at 03:57:12PM -0500, H Hartley Sweeten wrote:
> On Wednesday, January 13, 2010 1:28 PM, Mikael Pettersson wrote:
> > H Hartley Sweeten writes:
> >> Hello all,
> >>
> >> The following commit added a check for __ARM_EABI__ and raises a
> >> warning if it's not defined.
> >>
> >> commit 6603a4fd5195a004dec5f9568e38ff76bae630c1
> >> Author: Claudio Scordino <claudio@evidence.eu.com>
> >> Date: Fri Oct 30 12:06:05 2009 +0100
> >>
> >> ARM: 5776/1: Check compiler version and EABI support when adding ARM unwind support.
> >>
> >> Where is this definition supposed to come from?
> >
> > The C compiler used to compile the kernel.
>
> OK. I'm using a gcc-4.3.2 compiler created with crosstool-NG:
4.3.2 doesn't generate proper unwind information, so the warning is
actually correct - it doesn't support EABI unwind information.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Question: __ARM_EABI__
2010-01-13 21:05 ` Russell King - ARM Linux
@ 2010-01-13 21:10 ` H Hartley Sweeten
2010-01-13 21:17 ` Russell King - ARM Linux
0 siblings, 1 reply; 9+ messages in thread
From: H Hartley Sweeten @ 2010-01-13 21:10 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday, January 13, 2010 2:05 PM, Russell King wrote:
> On Wed, Jan 13, 2010 at 03:57:12PM -0500, H Hartley Sweeten wrote:
>> On Wednesday, January 13, 2010 1:28 PM, Mikael Pettersson wrote:
>>> H Hartley Sweeten writes:
>>>> Hello all,
>>>>
>>>> The following commit added a check for __ARM_EABI__ and raises a
>>>> warning if it's not defined.
>>>>
>>>> commit 6603a4fd5195a004dec5f9568e38ff76bae630c1
>>>> Author: Claudio Scordino <claudio@evidence.eu.com>
>>>> Date: Fri Oct 30 12:06:05 2009 +0100
>>>>
>>>> ARM: 5776/1: Check compiler version and EABI support when adding ARM unwind support.
>>>>
>>>> Where is this definition supposed to come from?
>>>
>>> The C compiler used to compile the kernel.
>>
>> OK. I'm using a gcc-4.3.2 compiler created with crosstool-NG:
>
> 4.3.2 doesn't generate proper unwind information, so the warning is
> actually correct - it doesn't support EABI unwind information.
I'll take your word on that.
But, based on the code I would not expect to see the message at all:
#if !defined (__ARM_EABI__)
#warning Your compiler does not have EABI support.
#warning ARM unwind is known to compile only with EABI compilers.
#warning Change compiler or disable ARM_UNWIND option.
#elif (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)
#warning Your compiler is too buggy; it is known to not compile ARM unwind support.
#warning Change compiler or disable ARM_UNWIND option.
#endif
I'm getting this during the compile:
CHECK arch/arm/kernel/unwind.c
arch/arm/kernel/unwind.c:30:2: warning: Your compiler does not have EABI support.
arch/arm/kernel/unwind.c:31:2: warning: ARM unwind is known to compile only with EABI compilers.
arch/arm/kernel/unwind.c:32:2: warning: Change compiler or disable ARM_UNWIND option.
Regards,
Hartley
^ permalink raw reply [flat|nested] 9+ messages in thread
* Question: __ARM_EABI__
2010-01-13 21:10 ` H Hartley Sweeten
@ 2010-01-13 21:17 ` Russell King - ARM Linux
2010-01-13 21:32 ` H Hartley Sweeten
0 siblings, 1 reply; 9+ messages in thread
From: Russell King - ARM Linux @ 2010-01-13 21:17 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Jan 13, 2010 at 04:10:41PM -0500, H Hartley Sweeten wrote:
> I'll take your word on that.
>
> But, based on the code I would not expect to see the message at all:
>
> #if !defined (__ARM_EABI__)
> #warning Your compiler does not have EABI support.
> #warning ARM unwind is known to compile only with EABI compilers.
> #warning Change compiler or disable ARM_UNWIND option.
> #elif (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)
> #warning Your compiler is too buggy; it is known to not compile ARM unwind support.
> #warning Change compiler or disable ARM_UNWIND option.
> #endif
>
> I'm getting this during the compile:
>
> CHECK arch/arm/kernel/unwind.c
> arch/arm/kernel/unwind.c:30:2: warning: Your compiler does not have EABI support.
> arch/arm/kernel/unwind.c:31:2: warning: ARM unwind is known to compile only with EABI compilers.
> arch/arm/kernel/unwind.c:32:2: warning: Change compiler or disable ARM_UNWIND option.
If you get an oops with your compiler version and you have unwind
support enabled, you _will_ _not_ get a backtrace. That's because
EABI support in gcc 4.3.2 is incomplete.
As the message says, either use a later compiler or disable unwind
support.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Question: __ARM_EABI__
2010-01-13 21:17 ` Russell King - ARM Linux
@ 2010-01-13 21:32 ` H Hartley Sweeten
2010-01-13 23:30 ` Mikael Pettersson
0 siblings, 1 reply; 9+ messages in thread
From: H Hartley Sweeten @ 2010-01-13 21:32 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday, January 13, 2010 2:17 PM, Russell King wrote:
> On Wed, Jan 13, 2010 at 04:10:41PM -0500, H Hartley Sweeten wrote:
>> I'll take your word on that.
>>
>> But, based on the code I would not expect to see the message at all:
>>
>> #if !defined (__ARM_EABI__)
>> #warning Your compiler does not have EABI support.
>> #warning ARM unwind is known to compile only with EABI compilers.
>> #warning Change compiler or disable ARM_UNWIND option.
>> #elif (__GNUC__ == 4 && __GNUC_MINOR__ <= 2)
>> #warning Your compiler is too buggy; it is known to not compile ARM unwind support.
>> #warning Change compiler or disable ARM_UNWIND option.
>> #endif
>>
>> I'm getting this during the compile:
>>
>> CHECK arch/arm/kernel/unwind.c
>> arch/arm/kernel/unwind.c:30:2: warning: Your compiler does not have EABI support.
>> arch/arm/kernel/unwind.c:31:2: warning: ARM unwind is known to compile only with EABI compilers.
>> arch/arm/kernel/unwind.c:32:2: warning: Change compiler or disable ARM_UNWIND option.
>
> If you get an oops with your compiler version and you have unwind
> support enabled, you _will_ _not_ get a backtrace. That's because
> EABI support in gcc 4.3.2 is incomplete.
OK. The #elif test should probably be updated to reflect this.
> As the message says, either use a later compiler or disable unwind
> support.
But, I'm actually getting the wrong message.
Alessandro Rubini pointed out that I could use "-dM" in the preprocessor
to dump the defines. My toolchain has these particular defines:
#define __GNUC__ 4
#define __GNUC_MINOR__ 3
#define __ARM_EABI__ 1
4.3.2 might not support unwinding correctly but I still should not get
any of the warning messages.
Confused...
Regards,
Hartley
^ permalink raw reply [flat|nested] 9+ messages in thread
* Question: __ARM_EABI__
2010-01-13 21:32 ` H Hartley Sweeten
@ 2010-01-13 23:30 ` Mikael Pettersson
2010-01-14 0:11 ` H Hartley Sweeten
0 siblings, 1 reply; 9+ messages in thread
From: Mikael Pettersson @ 2010-01-13 23:30 UTC (permalink / raw)
To: linux-arm-kernel
H Hartley Sweeten writes:
> But, I'm actually getting the wrong message.
>
> Alessandro Rubini pointed out that I could use "-dM" in the preprocessor
> to dump the defines. My toolchain has these particular defines:
>
> #define __GNUC__ 4
> #define __GNUC_MINOR__ 3
> #define __ARM_EABI__ 1
>
> 4.3.2 might not support unwinding correctly but I still should not get
> any of the warning messages.
>
> Confused...
Indeed, I dug out my old gcc-4.3 eabi cross-gcc and it produced no such
warnings, with or without CONFIG_ARM_UNWIND.
make ARCH=arm mrproper, reinstate your .config, make V=1 and show us
the complete command-line and messages for the compilation of unwind.c.
Do you have CONFIG_AEABI=y in your .config?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Question: __ARM_EABI__
2010-01-13 23:30 ` Mikael Pettersson
@ 2010-01-14 0:11 ` H Hartley Sweeten
0 siblings, 0 replies; 9+ messages in thread
From: H Hartley Sweeten @ 2010-01-14 0:11 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday, January 13, 2010 4:30 PM, Mikael Pettersson wrote:
> H Hartley Sweeten writes:
>> But, I'm actually getting the wrong message.
>>
>> Alessandro Rubini pointed out that I could use "-dM" in the preprocessor
>> to dump the defines. My toolchain has these particular defines:
>>
>> #define __GNUC__ 4
>> #define __GNUC_MINOR__ 3
>> #define __ARM_EABI__ 1
>>
>> 4.3.2 might not support unwinding correctly but I still should not get
>> any of the warning messages.
>>
>> Confused...
>
> Indeed, I dug out my old gcc-4.3 eabi cross-gcc and it produced no such
> warnings, with or without CONFIG_ARM_UNWIND.
>
> make ARCH=arm mrproper, reinstate your .config, make V=1 and show us
> the complete command-line and messages for the compilation of unwind.c.
>
> Do you have CONFIG_AEABI=y in your .config?
CONFIG_AEABI=y is in my .config
Looks like this might be a sparse issue.
A normal build of the kernel (make or make V=1) does not produce the
Warning messages. But a sparse build (make C=2 or make C=2 V=1) does
make the warnings appear.
The complete command line with V=1 for both is quite long. The only
differences are (broken down for readability):
$ make V=1
...
/home/bigguiness/toolchain/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc
# common command-line options removed
-c
-o arch/arm/kernel/unwind.o arch/arm/kernel/unwind.c
...
$ make C=2 V=1
...
sparse
-D__linux__
-Dlinux
-D__STDC__
-Dunix
-D__unix__
-Wbitwise
-Wno-return-void
-D__arm__
-nostdinc
-isystem /home/bigguiness/toolchain/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/include
# common command-line options removed
arch/arm/kernel/unwind.c ;
arch/arm/kernel/unwind.c:30:2: warning: Your compiler does not have EABI support.
arch/arm/kernel/unwind.c:31:2: warning: ARM unwind is known to compile only with EABI compilers.
arch/arm/kernel/unwind.c:32:2: warning: Change compiler or disable ARM_UNWIND option.
arch/arm/kernel/unwind.c:51:6: warning: symbol '__aeabi_unwind_cpp_pr0' was not declared. Should it be static?
arch/arm/kernel/unwind.c:56:6: warning: symbol '__aeabi_unwind_cpp_pr1' was not declared. Should it be static?
arch/arm/kernel/unwind.c:61:6: warning: symbol '__aeabi_unwind_cpp_pr2' was not declared. Should it be static?
...
Following are the actual command-lines.
$ make V=1
...
/home/bigguiness/toolchain/x-tools/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi-gcc -Wp,-MD,arch/arm/kernel/.unwind.o.d -nostdinc -isystem /home/bigguiness/toolchain/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/include -Iinclude -I/home/bigguiness/buildroot/output/build/linux-2.6.32.3/arch/arm/include -include include/linux/autoconf.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-ep93xx/include -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 -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=4 -march=armv4t -mtune=arm9tdmi -msoft-float -Uarm -fno-stack-protector -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(unwind)" -D"KBUILD_MODNAME=KBUILD_STR(unwind)" -c -o arch/arm/kernel/unwind.o arch/arm/kernel/unwind.c
...
$ make C=2 V=1
...
sparse -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -Wbitwise -Wno-return-void -D__arm__ -nostdinc -isystem /home/bigguiness/toolchain/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/include -Wp,-MD,arch/arm/kernel/.unwind.o.d -nostdinc -isystem /home/bigguiness/toolchain/x-tools/arm-unknown-linux-gnueabi/lib/gcc/arm-unknown-linux-gnueabi/4.3.2/include -Iinclude -I/home/bigguiness/buildroot/output/build/linux-2.6.32.3/arch/arm/include -include include/linux/autoconf.h -D__KERNEL__ -mlittle-endian -Iarch/arm/mach-ep93xx/include -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 -mabi=aapcs-linux -mno-thumb-interwork -funwind-tables -D__LINUX_ARM_ARCH__=4 -march=armv4t -mtune=arm9tdmi -msoft-float -Uarm -fno-stack-protector -fomit-frame-pointer -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(unwind)" -D"KBUILD_MODNAME=KBUILD_STR(unwind)" arch/arm/kernel/unwind.c ;
arch/arm/kernel/unwind.c:30:2: warning: Your compiler does not have EABI support.
arch/arm/kernel/unwind.c:31:2: warning: ARM unwind is known to compile only with EABI compilers.
arch/arm/kernel/unwind.c:32:2: warning: Change compiler or disable ARM_UNWIND option.
arch/arm/kernel/unwind.c:51:6: warning: symbol '__aeabi_unwind_cpp_pr0' was not declared. Should it be static?
arch/arm/kernel/unwind.c:56:6: warning: symbol '__aeabi_unwind_cpp_pr1' was not declared. Should it be static?
arch/arm/kernel/unwind.c:61:6: warning: symbol '__aeabi_unwind_cpp_pr2' was not declared. Should it be static?
...
Regards,
Hartley
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2010-01-14 0:11 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-01-13 19:08 Question: __ARM_EABI__ H Hartley Sweeten
2010-01-13 20:27 ` Mikael Pettersson
2010-01-13 20:57 ` H Hartley Sweeten
2010-01-13 21:05 ` Russell King - ARM Linux
2010-01-13 21:10 ` H Hartley Sweeten
2010-01-13 21:17 ` Russell King - ARM Linux
2010-01-13 21:32 ` H Hartley Sweeten
2010-01-13 23:30 ` Mikael Pettersson
2010-01-14 0:11 ` H Hartley Sweeten
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox