arm-unknown-linux-gnueabi ABI selection
Michael Abbott
michael@araneidae.co.uk
Sun Aug 31 15:02:00 GMT 2008
On Sat, 30 Aug 2008, Michael Abbott wrote:
> 1. Sorry, my analysis was wrong, but *something's* broken with the EABI
> configuration setup!
> 2. I can't build a good toolchain (sizeof(enum)==1 is a disaster).
I may have spotted a discrepancy, with CT_ARCH_ABI_CFLAGS where it looks
as if CT_ARCH_ABI_CFLAG was meant. I'm doing a rebuild test, but I think
there's enough evidence for an update.
If I compare the log files with two different CT_ARCH_ABI selections I
get:
@@ -282,7 +282,8 @@
[EXTRA] build = i686-pc-linux-gnu
[EXTRA] host = i686-pc-linux-gnu
[EXTRA] target = arm-unknown-linux-gnueabi
-[DEBUG] CT_ARCH_ABI=
+[DEBUG] CT_ARCH_ABI=aapcs
+[DEBUG] CT_ARCH_ABI_CFLAG=-mabi=aapcs
[DEBUG] CT_ARCH_ABI_CFLAGS=-mabi=aapcs-linux
[DEBUG] CT_ARCH_ARCH=armv5te
[DEBUG] CT_ARCH_ARCH_CFLAG=-march=armv5te
Interesting and suspicious. Both _CFLAG and _CFLAGS defined when aapcs
selected? Hmm. And further down:
@@ -304,7 +305,7 @@
[DEBUG] CT_ARCH_SUPPORT_FPU=y
[DEBUG] CT_ARCH_SUPPORTS_BOTH_ENDIAN=y
[DEBUG] CT_ARCH_SUPPORT_TUNE=y
-[DEBUG] CT_ARCH_TARGET_CFLAGS='-mlittle-endian -march=armv5te -mcpu=xscale -mtune=xscale -msoft-float'
+[DEBUG] CT_ARCH_TARGET_CFLAGS='-mlittle-endian -march=armv5te -mabi=aapcs -mcpu=xscale -mtune=xscale -msoft-float'
[DEBUG] CT_ARCH_TARGET_LDFLAGS=-EL
[DEBUG] CT_ARCH_TUNE_CFLAG=-mtune=xscale
[DEBUG] CT_ARCH_TUNE=xscale
Very interesting. Where did the -mabi option go? (It doesn't appear
anywhere else in the _ABI="" file.) So I've fingered these lines in
arch/arm/functions:
--- crosstool-ng-1.2.2.original/arch/arm/functions
+++ crosstool-ng-1.2.2.patched/arch/arm/functions
@@ -16,12 +16,12 @@
*,) ;;
aapcs,y)
CT_DoLog DEBUG "'--with-abi=aapcs' is in fact
'-mabi=aapcs-linux' when used in CFLAGS."
- CT_ARCH_ABI_CFLAGS="-mabi=aapcs-linux"
+ CT_ARCH_ABI_CFLAG="-mabi=aapcs-linux"
;;
,y)
CT_DoLog WARN "Forcing ABI to 'aapcs-linux' for use with
EABI."
CT_ARCH_WITH_ABI="--with-abi=aapcs"
- CT_ARCH_ABI_CFLAGS="-mabi=aapcs-linux"
+ CT_ARCH_ABI_CFLAG="-mabi=aapcs-linux"
;;
*,y)
CT_DoLog ERROR "ABI='${CT_ARCH_ABI}' not supported for EABI."
Now, in fact (assuming this works) this code is still wrong, because we
shouldn't be specifying CT_ARCH_ABI at all here -- we don't have *any*
choice about the matter once we've selected ARM EABI!
Certainly having made this change I'm getting the right -mabi-aapcs-linux
flags passed to the various build stages, but the build is in progress.
I'll make an update in an hour when the build is complete.
--
For unsubscribe information see http://sourceware.org/lists.html#faq
More information about the crossgcc
mailing list