diff options
Diffstat (limited to 'scripts/build')
-rw-r--r-- | scripts/build/arch/alpha.sh | 9 | ||||
-rw-r--r-- | scripts/build/arch/arm.sh | 17 | ||||
-rw-r--r-- | scripts/build/arch/ia64.sh | 6 | ||||
-rw-r--r-- | scripts/build/arch/mips.sh | 12 | ||||
-rw-r--r-- | scripts/build/arch/powerpc.sh | 22 | ||||
-rw-r--r-- | scripts/build/arch/sh.sh | 32 | ||||
-rw-r--r-- | scripts/build/arch/x86.sh | 22 | ||||
-rw-r--r-- | scripts/build/arch/x86_64.sh | 6 |
8 files changed, 126 insertions, 0 deletions
diff --git a/scripts/build/arch/alpha.sh b/scripts/build/arch/alpha.sh new file mode 100644 index 0000000..ea8ef53 --- /dev/null +++ b/scripts/build/arch/alpha.sh @@ -0,0 +1,9 @@ +# Compute Alpha-specific values + +CT_DoArchValues () { + # The architecture part of the tuple: + CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_ALPHA_VARIANT}" + + # The kernel ARCH: + CT_KERNEL_ARCH=${CT_ARCH} +} diff --git a/scripts/build/arch/arm.sh b/scripts/build/arch/arm.sh new file mode 100644 index 0000000..a1b8542 --- /dev/null +++ b/scripts/build/arch/arm.sh @@ -0,0 +1,17 @@ +# Compute ARM-specific values + +CT_DoArchValues() { + # The architecture part of the tuple: + CT_TARGET_ARCH="${CT_ARCH}${target_endian_eb}" + + # The system part of the tuple: + case "${CT_LIBC},${CT_ARCH_ARM_EABI}" in + *glibc,y) CT_TARGET_SYS=gnueabi;; + uClibc,y) CT_TARGET_SYS=uclibcgnueabi;; + none,y) CT_TARGET_SYS=eabi;; + esac + + # In case we're EABI, do *not* specify any ABI! + # which means, either we do not have an ABI specified, or we're not EABI. + CT_TestOrAbort "Internal error: CT_ARCH_ABI should not be set for EABI build." -z "${CT_ARCH_ABI}" -o -z "${CT_ARCH_ARM_EABI}" +} diff --git a/scripts/build/arch/ia64.sh b/scripts/build/arch/ia64.sh new file mode 100644 index 0000000..76f34dd --- /dev/null +++ b/scripts/build/arch/ia64.sh @@ -0,0 +1,6 @@ +# Compute IA-64-specific values + +CT_DoArchValues() { + # The architecture part of the tuple: + CT_TARGET_ARCH="${CT_ARCH}" +} diff --git a/scripts/build/arch/mips.sh b/scripts/build/arch/mips.sh new file mode 100644 index 0000000..4bf0501 --- /dev/null +++ b/scripts/build/arch/mips.sh @@ -0,0 +1,12 @@ +# Compute IA-64-specific values + +CT_DoArchValues() { + # The architecture part of the tuple: + CT_TARGET_ARCH="${CT_ARCH}${target_endian_el}" + + # Override CFLAGS for endianness: + case "${CT_ARCH_BE},${CT_ARCH_LE}" in + y,) CT_ARCH_ENDIAN_CFLAG="-EB";; + ,y) CT_ARCH_ENDIAN_CFLAG="-EL";; + esac +} diff --git a/scripts/build/arch/powerpc.sh b/scripts/build/arch/powerpc.sh new file mode 100644 index 0000000..94ad11c --- /dev/null +++ b/scripts/build/arch/powerpc.sh @@ -0,0 +1,22 @@ +# Compute powerpc-specific values + +CT_DoArchValues () { + # The architecture part of the tuple: + CT_TARGET_ARCH="${CT_ARCH}" + + # The kernel ARCH: + CT_KERNEL_ARCH=powerpc + + # Add spe in the tuplet if needed + case "${CT_LIBC},${CT_ARCH_POWERPC_SPE}" in + glibc,|eglibc,) CT_TARGET_SYS=gnu;; + glibc,y|eglibc,y) CT_TARGET_SYS=gnuspe;; + esac + + # Add extra flags for SPE if needed + if [ "${CT_ARCH_POWERPC_SPE}" = "y" ]; then + CT_ARCH_TARGET_CFLAGS="-mabi=spe -mspe" + CT_ARCH_CC_CORE_EXTRA_CONFIG="--enable-e500_double" + CT_ARCH_CC_EXTRA_CONFIG="--enable-e500_double" + fi +} diff --git a/scripts/build/arch/sh.sh b/scripts/build/arch/sh.sh new file mode 100644 index 0000000..b6dbc02 --- /dev/null +++ b/scripts/build/arch/sh.sh @@ -0,0 +1,32 @@ +# Compute sh-specific values + +CT_DoArchValues () { + # The architecture part of the tuple: + CT_TARGET_ARCH="${CT_ARCH_SH_VARIANT}${target_endian_eb}" + + # gcc ./configure flags + CT_ARCH_WITH_ARCH= + CT_ARCH_WITH_ABI= + CT_ARCH_WITH_CPU= + CT_ARCH_WITH_TUNE= + CT_ARCH_WITH_FPU= + CT_ARCH_WITH_FLOAT= + + # Endianness stuff + case "${CT_ARCH_BE},${CT_ARCH_LE}" in + y,) CT_ARCH_ENDIAN_CFLAG=-mb;; + ,y) CT_ARCH_ENDIAN_CFLAG=-ml;; + esac + + # CFLAGS + case "${CT_ARCH_SH_VARIENT}" in + sh3) CT_ARCH_ARCH_CFLAG=-m3;; + sh4*) + case "${CT_ARCH_FLOAT_HW},${CT_ARCH_FLOAT_SW}" in + y,) CT_ARCH_ARCH_CFLAG="-m4${CT_ARCH_SH_VARIANT##sh?}";; + ,y) CT_ARCH_ARCH_CFLAG="-m4${CT_ARCH_SH_VARIANT##sh?}-nofpu";; + esac + ;; + esac + CT_ARCH_FLOAT_CFLAG= +} diff --git a/scripts/build/arch/x86.sh b/scripts/build/arch/x86.sh new file mode 100644 index 0000000..ae67692 --- /dev/null +++ b/scripts/build/arch/x86.sh @@ -0,0 +1,22 @@ +# Compute x86-specific values + +# This one really need a little love! :-( + +CT_DoArchValues() { + # The architecture part of the tuple: + arch="${CT_ARCH_ARCH}" + [ -z "${arch}" ] && arch="${CT_ARCH_TUNE}" + case "${arch}" in + nocona|athlon*64|k8|athlon-fx|opteron) + CT_DoError "Architecture is x86 (32-bit) but selected processor is \"${arch}\" (64-bit)";; + "") CT_TARGET_ARCH=i386;; + i386|i486|i586|i686) CT_TARGET_ARCH="${arch}";; + winchip*) CT_TARGET_ARCH=i486;; + pentium|pentium-mmx|c3*) CT_TARGET_ARCH=i586;; + pentiumpro|pentium*|athlon*) CT_TARGET_ARCH=i686;; + *) CT_TARGET_ARCH=i586;; + esac + + # The kernel ARCH: + CT_KERNEL_ARCH=i386 +} diff --git a/scripts/build/arch/x86_64.sh b/scripts/build/arch/x86_64.sh new file mode 100644 index 0000000..2626abf --- /dev/null +++ b/scripts/build/arch/x86_64.sh @@ -0,0 +1,6 @@ +# Compute x86_64-specific values + +CT_DoArchValues() { + # The architecture part of the tuple: + CT_TARGET_ARCH="${CT_ARCH}" +} |