arm eabi, and aapcs issues with gcc 4.0

Lennert Buytenhek buytenh@wantstofly.org
Wed Jan 4 19:07:00 GMT 2006


Hi all,

The attached patch allows building an arm AAPCS toolchain with gcc 4.0.
However.. the resulting object files and binaries are marked as APCS-32,
which is incorrect:

$ arm-aapcs-linux-gnu-gcc -Wall -o xx xx.c
$ arm-aapcs-linux-gnu-objdump --all xx | grep ^private
private flags = 2: [APCS-32] [FPA float format] [has entry point]
$

Phil Blundell suggested that this is probably because binutils (as) didn't
have flags for passing the ABI type when the gcc 4.0 branch was forked
off.  Partially because of this, trying to use gcc 4.0 for anything EABI
is kind of a dead end (as he already said.)  FYI.


cheers,
Lennert


diff -urN crosstool-0.38.orig/arm-aapcs.dat crosstool-0.38/arm-aapcs.dat
--- crosstool-0.38.orig/arm-aapcs.dat	1970-01-01 03:00:00.000000000 +0300
+++ crosstool-0.38/arm-aapcs.dat	2006-01-04 19:35:18.000000000 +0200
@@ -0,0 +1,4 @@
+KERNELCONFIG=`pwd`/arm.config
+TARGET=arm-aapcs-linux-gnu
+TARGET_CFLAGS="-O"
+GCC_EXTRA_CONFIG="--with-abi=aapcs"
diff -urN crosstool-0.38.orig/demo-arm-aapcs.sh crosstool-0.38/demo-arm-aapcs.sh
--- crosstool-0.38.orig/demo-arm-aapcs.sh	1970-01-01 03:00:00.000000000 +0300
+++ crosstool-0.38/demo-arm-aapcs.sh	2006-01-04 19:35:58.000000000 +0200
@@ -0,0 +1,17 @@
+#!/bin/sh
+set -ex
+TARBALLS_DIR=$HOME/downloads
+RESULT_TOP=/opt/crosstool
+export TARBALLS_DIR RESULT_TOP
+GCC_LANGUAGES="c,c++"
+export GCC_LANGUAGES
+
+# Really, you should do the mkdir before running this,
+# and chown /opt/crosstool to yourself so you don't need to run as root.
+mkdir -p $RESULT_TOP
+
+# Build the toolchain.  Takes a couple hours and a couple gigabytes.
+
+ eval `cat arm-aapcs.dat gcc-4.0.1-glibc-2.3.5-hdrs-2.6.11.2.dat`  sh all.sh --notest
+
+echo Done.


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list