This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: arm-unknown-linux-gnueabi ABI selection


On Mon, 1 Sep 2008, Marc Kleine-Budde wrote:
> Michael Abbott wrote:
> > On Sun, 31 Aug 2008, Yann E. MORIN wrote:
> > I've hit an unexpected snag.  Building the kernel fails very early on:
> 
> can you give me the involved version:
> binutils
> glibc
> gcc
> kernel
> 
> Then I'll have a look what happens here with OSELAS.Toolchain.

The cross-compiler versions are as specified in the sample script for 
samples/arm-unknown-linux-gnueabi, with the associated crosstool-ng-1.2.2 
patches:

CT_BINUTILS_VERSION="2.18.50.0.8"
CT_LIBC_VERSION="2.7"
CT_CC_VERSION="4.2.4"
CT_KERNEL_VERSION="2.6.26"

The kernel in question is literally 2.6.26, as released 13th July with 
only some very trival local hardware patches.

The build environment is RHEL 4, I think:

$ as --version
GNU assembler 2.15.92.0.2 20040927
$ gcc --version
gcc (GCC) 3.4.6 20060404 (Red Hat 3.4.6-9)
$ uname -a
Linux pc0050.cs.diamond.ac.uk 2.6.9-67.ELsmp #1 SMP Wed Nov 7 13:58:04 EST 2007 i686 i686 i386 GNU/Linux
$

(Not sure how to find a libc version, but I don't expect you care that 
much about the build environment...)


For completeness, I attach a complete diff to show my crosstool-ng config 
script:

$ diff -u samples/arm-unknown-linux-gnueabi/crosstool.config .config
--- samples/arm-unknown-linux-gnueabi/crosstool.config  2008-07-19 
23:55:19.000000000 +0100
+++ .config     2008-09-01 09:28:43.000000000 +0100
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# crosstool-NG version: 1.1.0+svn_trunk@832
-# Sun Jul 20 00:50:02 2008
+# crosstool-NG version: 1.2.2
+# Thu Aug 28 15:22:13 2008
 #

 #
@@ -19,12 +19,14 @@
 #
 # Paths
 #
-CT_LOCAL_TARBALLS_DIR="${HOME}/src"
-CT_SAVE_TARBALLS=y
-CT_WORK_DIR="${CT_TOP_DIR}/targets"
-CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}"
+CT_LOCAL_TARBALLS_DIR="${TARS_DIR}"
+# CT_SAVE_TARBALLS is not set
+CT_WORK_DIR="${WORK_DIR}"
+CT_PREFIX_DIR="${HERE}/${CT_TARGET}"
 CT_INSTALL_DIR="${CT_PREFIX_DIR}"
-# CT_CUSTOM_PATCH is not set
+CT_CUSTOM_PATCH=y
+# CT_CUSTOM_PATCH_ONLY is not set
+CT_CUSTOM_PATCH_DIR="${HERE}/patches"
 CT_REMOVE_DOCS=y
 CT_INSTALL_DIR_RO=y

@@ -48,7 +50,7 @@
 #
 # Build behavior
 #
-CT_PARALLEL_JOBS=1
+CT_PARALLEL_JOBS=3
 CT_LOAD=0
 CT_NICE=0
 CT_USE_PIPES=y
@@ -66,7 +68,7 @@
 # CT_LOG_SEE_TOOLS_WARN is not set
 CT_LOG_PROGRESS_BAR=y
 CT_LOG_TO_FILE=y
-CT_LOG_FILE_COMPRESS=y
+# CT_LOG_FILE_COMPRESS is not set

 #
 # Target options
@@ -81,7 +83,7 @@
 # CT_ARCH_DEFAULT_BE is not set
 CT_ARCH_DEFAULT_LE=y
 CT_ARCH_ARCH="armv5te"
-CT_ARCH_ABI="aapcs"
+CT_ARCH_ABI="aapcs-linux"
 CT_ARCH_CPU="xscale"
 CT_ARCH_TUNE="xscale"
 CT_ARCH_FPU=""
@@ -121,7 +123,7 @@
 # CT_THREADS_LINUXTHREADS is not set
 # CT_THREADS_NONE is not set
 CT_THREADS="nptl"
-CT_TARGET_VENDOR="unknown"
+CT_TARGET_VENDOR="diamond"
 CT_TARGET_ALIAS_SED_EXPR=""
 CT_TARGET_ALIAS=""

@@ -146,7 +148,7 @@
 # CT_KERNEL_LINUX_HEADERS_COPY is not set
 # CT_KERNEL_LINUX_HEADERS_USE_CUSTOM_DIR is not set
 CT_KERNEL="linux"
-CT_KERNEL_VERSION_SEE_EXTRAVERSION=y
+# CT_KERNEL_VERSION_SEE_EXTRAVERSION is not set
 # CT_KERNEL_INSTALL_V_2_6_18_8 is not set
 # CT_KERNEL_INSTALL_V_2_6_19_7 is not set
 # CT_KERNEL_INSTALL_V_2_6_20_21 is not set


Also, I'm using the following two local patches against the 
crosstool-ng-1.2.2 distribution:


Index: ct-ng.trunk/arch/arm/functions
===================================================================
--- ct-ng.trunk/arch/arm/functions      (revision 970)
+++ ct-ng.trunk/arch/arm/functions      (working copy)
@@ -12,20 +12,9 @@
         uClibc,y)   CT_TARGET_SYS=uclibcgnueabi;;
     esac

-    case "${CT_ARCH_ABI},${CT_ARCH_ARM_EABI}" in
-        *,) ;;
-        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"
-            ;;
-        ,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"
-            ;;
-        *,y)
-            CT_DoLog ERROR "ABI='${CT_ARCH_ABI}' not supported for EABI."
-            CT_Abort "If you know you are right, please edit 'arch/arm/functions' in crosstool-NG sources."
-            ;;
-    esac
+    if [ "${CT_ARCH_ARM_EABI}" = "y" ]; then
+        CT_DoLog DEBUG "Removing any ABI flag for EABI"
+        CT_ARCH_WITH_ABI=
+        CT_ARCH_ABI_CFLAG=
+    fi
 }


--- crosstool-ng-1.2.2/scripts/build/debug/300-gdb.sh   2008-08-26 22:51:45.000000000 +0100
+++ crosstool-ng-1.2.2.patched/scripts/build/debug/300-gdb.sh   2008-09-01 09:17:34.000000000 +0100
@@ -177,7 +177,7 @@
         CT_DoExecLog ALL make DESTDIR="${CT_DEBUG_INSTALL_DIR}" install

         # Building a native gdb also builds a gdbserver
-        find "${CT_DEBUG_INSTALL_DIR}" -type f -name gdbserver -exec rm -fv {} + 2>&1 |CT_DoLog ALL
+        find "${CT_DEBUG_INSTALL_DIR}" -type f -name gdbserver -exec rm -fv {} \; 2>&1 |CT_DoLog ALL

         unset ac_cv_func_strncmp_works



Hope this helps.

--
For unsubscribe information see http://sourceware.org/lists.html#faq


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]