meaning of BR2_arm_dunno
Hi,
I wonder if anyone could explain to me the purpose of BR2_arm_dunno as used in target/Config.in.arch. The reason I am asking is that we've run into the problem of ending up with a misconfigured gcc (as reported earlier on this list). I would like to find out how this can be avoided in the future, but I seem to be unable to understand the mechanism that selects the default values for BR2_GCC_TARGET_TUNE, BR2_GCC_TARGET_ARCH and BR2_GCC_TARGET_ABI.
Sven
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sven" == Sven Neumann <[email protected]> writes:
Sven> Hi,
Sven> I wonder if anyone could explain to me the purpose of Sven> BR2_arm_dunno as used in target/Config.in.arch. The reason I am Sven> asking is that we've run into the problem of ending up with a Sven> misconfigured gcc (as reported earlier on this list). I would Sven> like to find out how this can be avoided in the future, but I Sven> seem to be unable to understand the mechanism that selects the Sven> default values for BR2_GCC_TARGET_TUNE, BR2_GCC_TARGET_ARCH and Sven> BR2_GCC_TARGET_ABI.
It takes a bit of searching as the lines have moved around the tree a few times, but they were originally added by Bernhard in r19040 with the nice commit message:
- populate some BR2_GCC_TARGET_ARCH, BR2_GCC_TARGET_ABI, BR2_GCC_TARGET_TUNE defaults (hand-waving mode, of course untested.. ;)
In other words it seems pretty half baked. Taking a look at Bernhard's git tree I see he has:
default apcs-gnu if BR2_ARM_OABI
default atpcs if BR2_arm_dunno
default aapcs if BR2_arm_dunno
default aapcs-linux if BR2_ARM_EABIWhich confusingly comes from the following commit:
commit 7f7aac5d32ba677e8be386afa6ca121af00fbf1a
Author: Bernhard Fischer <[email protected]> Date: Thu Sep 18 23:47:23 2008 +0200
remove dependency on iwmmxt
Could you give it a try with those 2 lines changed?
Signature · 1 line
Bye, Peter Korsgaard
Hi,
Quoted 4 lines · Peter Korsgaard
default apcs-gnu if BR2_ARM_OABI
default atpcs if BR2_arm_dunno
default aapcs if BR2_arm_dunno
default aapcs-linux if BR2_ARM_EABIThat looks more reasonable to me and it is in line with what was suggested on the linux-arm-kernel mailing-list, see
http://lists.arm.linux.org.uk/lurker/message/20090124.152540.2d9a4947.en.html
As you can see from the linked thread, the compiler we ended up with works nicely for userspace, but it cannot be used to build a kernel. It may be a good idea to set BR2_GCC_TARGET_ABI to aapcs-linux even if BR2_iwmmxt is selected.
Quoted 1 line
Could you give it a try with those 2 lines changed?
What exactly do you want me to try? I guess I would have to remove my .config and go thru menuconfig, select ARM iwmmxt and then check what gets sets for BR2_GCC_TARGET_TUNE, BR2_GCC_TARGET_ARCH and BR2_GCC_TARGET_ABI? Is that correct?
Sven
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sven" == Sven Neumann <[email protected]> writes:
Hi,
Quoted 4 lines
Quoted 4 lines
default apcs-gnu if BR2_ARM_OABI default atpcs if BR2_arm_dunno default aapcs if BR2_arm_dunno default aapcs-linux if BR2_ARM_EABI
Sven> As you can see from the linked thread, the compiler we ended up Sven> with works nicely for userspace, but it cannot be used to build Sven> a kernel. It may be a good idea to set BR2_GCC_TARGET_ABI to Sven> aapcs-linux even if BR2_iwmmxt is selected.
Ok, thanks.
Quoted 1 line
Quoted 1 line
Could you give it a try with those 2 lines changed?
Sven> What exactly do you want me to try? I guess I would have to Sven> remove my .config and go thru menuconfig, select ARM iwmmxt and Sven> then check what gets sets for BR2_GCC_TARGET_TUNE, Sven> BR2_GCC_TARGET_ARCH and BR2_GCC_TARGET_ABI? Is that correct?
I meant with the apcs-gnu for OABI, and aapcs-linux for EABI, wasn't that your original problem?
Signature · 1 line
Bye, Peter Korsgaard
Hi,
Quoted 7 lines · Peter Korsgaard
default apcs-gnu if BR2_ARM_OABI default atpcs if BR2_arm_dunno default aapcs if BR2_arm_dunno default aapcs-linux if BR2_ARM_EABI[...]
Could you give it a try with those 2 lines changed?
Does not work for my configuration. The error when compiling gcc is:
Unknown ABI used in --with-abi=aapcs-linux
The relevant bits from my .config are:
BR2_iwmmxt=y
BR2_ARM_TYPE="ARM_IWMMXT"
# BR2_ARM_OABI is not set
BR2_ARM_EABI=y
BR2_ARCH="arm"
BR2_ENDIAN="LITTLE"
BR2_GCC_TARGET_TUNE="iwmmxt"
BR2_GCC_TARGET_ARCH="iwmmxt"
BR2_GCC_TARGET_ABI="aapcs-linux"
BR2_GCC_VERSION="4.3.2"
Anything else you want me to try ?
Sven
Hi,
Quoted 3 lines · Sven Neumann
Does not work for my configuration. The error when compiling gcc is:
Unknown ABI used in --with-abi=aapcs-linux
Might be related to
http://gcc.gnu.org/ml/gcc-patches/2008-09/msg01500.html
BR2_GCC_TARGET_ABI="aapcs" seems to be accepted. I will try to compile my tree with this option now and also check if I can build a recent kernel using the compiler that results from this build...
Sven
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sven" == Sven Neumann <[email protected]> writes:
Hi,
Sven> Might be related to
Sven> http://gcc.gnu.org/ml/gcc-patches/2008-09/msg01500.html
Ahh, our good friend Bernhard ;)
Sven> BR2_GCC_TARGET_ABI="aapcs" seems to be accepted. I will try to compile Sven> my tree with this option now and also check if I can build a recent Sven> kernel using the compiler that results from this build...
Ok, thanks, otherwise I'll take the gcc patch so aapcs-linux works.
Signature · 1 line
Bye, Peter Korsgaard
Hi,
Quoted 5 lines · Peter Korsgaard
Sven> BR2_GCC_TARGET_ABI="aapcs" seems to be accepted. I will try to compile Sven> my tree with this option now and also check if I can build a recent Sven> kernel using the compiler that results from this build...
Ok, thanks, otherwise I'll take the gcc patch so aapcs-linux works.
I've successfully built the system, booted it and run some tests. I also verified that I can build 2.6.29-rc3 using the kernel created by this build. Attached is a patch with the change.
Sven
-------------- next part --------------
A non-text attachment was scrubbed...
Name: target-abi.diff
Type: text/x-patch
Size: 549 bytes
Desc: not available
Url : http://lists.busybox.net/pipermail/buildroot/attachments/20090130/9ad2f21a/attachment.bin
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sven" == Sven Neumann <[email protected]> writes:
Sven> Hi,
Sven> On Fri, 2009-01-30 at 11:23 +0100, Peter Korsgaard wrote:
Sven> BR2_GCC_TARGET_ABI="aapcs" seems to be accepted. I will try to compile Sven> my tree with this option now and also check if I can build a recent Sven> kernel using the compiler that results from this build...
Quoted 2 lines
Quoted 2 lines
Ok, thanks, otherwise I'll take the gcc patch so aapcs-linux works.
Sven> I've successfully built the system, booted it and run some tests. I also Sven> verified that I can build 2.6.29-rc3 using the kernel created by this Sven> build. Attached is a patch with the change.
Thanks, but I think the correct thing is to use aapcs-linux (E.G. so it also works with older toolchains), and patch gcc 4.3.2 to accept that (like Bernhard already did).
I've checked in that patch already and will fix up the stuff in Config.in.arch now.
Thanks for testing it.
Signature · 1 line
Bye, Peter Korsgaard
Quoted 11 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Sven" == Sven Neumann <[email protected]> writes:
Sven> Hi,
Sven> On Fri, 2009-01-30 at 11:23 +0100, Peter Korsgaard wrote:Sven> BR2_GCC_TARGET_ABI="aapcs" seems to be accepted. I will try to compile Sven> my tree with this option now and also check if I can build a recent Sven> kernel using the compiler that results from this build...
Quoted 2 lines
Quoted 2 lines
Ok, thanks, otherwise I'll take the gcc patch so aapcs-linux works.
Quoted 7 lines
Sven> I've successfully built the system, booted it and run some tests. I also Sven> verified that I can build 2.6.29-rc3 using the kernel created by this Sven> build. Attached is a patch with the change.
Thanks, but I think the correct thing is to use aapcs-linux (E.G. so it also works with older toolchains), and patch gcc 4.3.2 to accept that (like Bernhard already did).
I think this is/will be fixed in gcc-4.4.0 and 4.3.3
Quoted 3 lines
I've checked in that patch already and will fix up the stuff in Config.in.arch now.
As already mentioned several times somewhere else, you should synch (these parts of) your tree against improvements that went into my tree. This poor guy wouldn't have been bitten by this issue, fwiw.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Bernhard" == Bernhard Reutner-Fischer <[email protected]> writes:
Hi,
Quoted 3 lines
Quoted 3 lines
Thanks, but I think the correct thing is to use aapcs-linux (E.G. so it also works with older toolchains), and patch gcc 4.3.2 to accept that (like Bernhard already did).
Bernhard> I think this is/will be fixed in gcc-4.4.0 and 4.3.3
Ok, good.
Quoted 2 lines
Quoted 2 lines
I've checked in that patch already and will fix up the stuff in Config.in.arch now.
Bernhard> As already mentioned several times somewhere else, you Bernhard> should synch (these parts of) your tree against Bernhard> improvements that went into my tree. This poor guy wouldn't Bernhard> have been bitten by this issue, fwiw.
It's a question of time, you are more than welcome to help and send patches to the list ;)
Signature · 1 line
Bye, Peter Korsgaard