summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-09-16 17:59:18 (GMT)
committerYann E. MORIN" <yann.morin.1998@anciens.enib.fr>2007-09-16 17:59:18 (GMT)
commitdd9e2b9602a99c0d0b3f3b50829ca87905bc9812 (patch)
tree71d81aa2e26c82bb59c41d1ae28f0d5dfb07bc9c /scripts
parentaf2e42b5726d160d26542819a37385bd1b2145b2 (diff)
ARM EABI is now working for little endian ARM targets.
Big endian is still missing, though...
Diffstat (limited to 'scripts')
-rw-r--r--scripts/build/cc_gcc.sh3
-rw-r--r--scripts/build/libc_uClibc.sh16
-rwxr-xr-xscripts/crosstool.sh6
-rw-r--r--scripts/functions12
4 files changed, 28 insertions, 9 deletions
diff --git a/scripts/build/cc_gcc.sh b/scripts/build/cc_gcc.sh
index bcdef43..08f320b 100644
--- a/scripts/build/cc_gcc.sh
+++ b/scripts/build/cc_gcc.sh
@@ -231,7 +231,8 @@ do_cc() {
# detection problem only matters for gcc-3.2.x and later, I think.
# --disable-nls to work around crash bug on ppc405, but also because
# embedded systems don't really need message catalogs...
- CFLAGS="${CT_CFLAGS_FOR_HOST}" \
+ CFLAGS="${CT_CFLAGS_FOR_HOST}" \
+ TARGET_CFLAGS="${CT_TARGET_CFLAGS}" \
"${CT_SRC_DIR}/${CT_CC_FILE}/configure" \
${CT_CANADIAN_OPT} \
--target=${CT_TARGET} --host=${CT_HOST} \
diff --git a/scripts/build/libc_uClibc.sh b/scripts/build/libc_uClibc.sh
index d665a5f..af06e3c 100644
--- a/scripts/build/libc_uClibc.sh
+++ b/scripts/build/libc_uClibc.sh
@@ -164,6 +164,20 @@ s/^TARGET_ARCH=".*"/TARGET_ARCH="${CT_KERNEL_ARCH}"/
s/.*(DOSTRIP).*/# \\1 is not set/
ENDSED
+ # Ah. We may one day need architecture-specific handler here...
+ # Hack the ARM {E,O}ABI into the config file
+ if [ "${CT_ARCH_ARM_EABI}" = "y" ]; then
+ cat >>"${munge_file}" <<-ENDSED
+s/.*(CONFIG_ARM_OABI).*/# \\1 is not set/
+s/.*(CONFIG_ARM_EABI).*/\\1=y/
+ENDSED
+ else
+ cat >>"${munge_file}" <<-ENDSED
+s/.*(CONFIG_ARM_OABI).*/\\1=y/
+s/.*(CONFIG_ARM_EABI).*/# \\1 is not set/
+ENDSED
+ fi
+
# Accomodate for old and new uClibc versions, where the
# way to select between big/little endian has changed
case "${CT_ARCH_BE},${CT_ARCH_LE}" in
@@ -198,7 +212,7 @@ ENDSED
;;
esac
- # Change paths to work with crosstool
+ # Change paths to work with crosstool-NG
# From http://www.uclibc.org/cgi-bin/viewcvs.cgi?rev=16846&view=rev
# " we just want the kernel headers, not the whole kernel source ...
# " so people may need to update their paths slightly
diff --git a/scripts/crosstool.sh b/scripts/crosstool.sh
index 0a357bc..5a12fd1 100755
--- a/scripts/crosstool.sh
+++ b/scripts/crosstool.sh
@@ -82,6 +82,10 @@ CT_DoBuildTargetTuple
# then rescan the options file now:
. "${CT_TOP_DIR}/.config"
+# Second kludge: merge user-supplied target CFLAGS with architecture-provided
+# target CFLAGS
+CT_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_TARGET_CFLAGS}"
+
# Now, build up the variables from the user-configured options.
CT_KERNEL_FILE="${CT_KERNEL}-${CT_KERNEL_VERSION}"
CT_BINUTILS_FILE="binutils-${CT_BINUTILS_VERSION}"
@@ -212,7 +216,7 @@ case "${CT_LOG_TO_FILE}" in
;;
esac
-# Setting up the rest of the environment only is not restarting
+# Setting up the rest of the environment only if not restarting
if [ -z "${CT_RESTART}" ]; then
# Determine build system if not set by the user
CT_Test "You did not specify the build system. That's OK, I can guess..." -z "${CT_BUILD}"
diff --git a/scripts/functions b/scripts/functions
index 49a28c0..7c3da99 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -529,12 +529,12 @@ CT_DoBuildTargetTuple() {
CT_TARGET=`CT_DoConfigSub "${CT_TARGET_ARCH}-${CT_TARGET_VENDOR:-unknown}-${CT_TARGET_KERNEL}-${CT_TARGET_SYS}"`
# Prepare the target CFLAGS
- CT_TARGET_CFLAGS="${CT_TARGET_CFLAGS} ${CT_ARCH_ARCH_CFLAGS}"
- CT_TARGET_CFLAGS="${CT_TARGET_CFLAGS} ${CT_ARCH_ABI_CFLAGS}"
- CT_TARGET_CFLAGS="${CT_TARGET_CFLAGS} ${CT_ARCH_CPU_CFLAGS}"
- CT_TARGET_CFLAGS="${CT_TARGET_CFLAGS} ${CT_ARCH_TUNE_CFLAGS}"
- CT_TARGET_CFLAGS="${CT_TARGET_CFLAGS} ${CT_ARCH_FPU_CFLAGS}"
- CT_TARGET_CFLAGS="${CT_TARGET_CFLAGS} ${CT_ARCH_FLOAT_CFLAGS}"
+ CT_ARCH_TARGET_CFLAGS="${CT_ARCH_ARCH_CFLAG}"
+ CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_ABI_CFLAG}"
+ CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_CPU_CFLAG}"
+ CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_TUNE_CFLAG}"
+ CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_FPU_CFLAG}"
+ CT_ARCH_TARGET_CFLAGS="${CT_ARCH_TARGET_CFLAGS} ${CT_ARCH_FLOAT_CFLAG}"
}
# This function does pause the build until the user strikes "Return"