diff options
author | Alexey Neyman <stilor@att.net> | 2017-08-29 15:36:52 -0700 |
---|---|---|
committer | Alexey Neyman <stilor@att.net> | 2017-09-03 12:11:23 -0700 |
commit | 413f5f610012ea24db9910084ea3b40db808147b (patch) | |
tree | 75e9c879151cfa7cd476fc43b1182ca63655813f /scripts/functions | |
parent | 1da3cc59df185144cb01fdd32a0dc1ca417d9106 (diff) | |
download | crosstool-ng-413f5f610012ea24db9910084ea3b40db808147b.tar.gz crosstool-ng-413f5f610012ea24db9910084ea3b40db808147b.tar.bz2 crosstool-ng-413f5f610012ea24db9910084ea3b40db808147b.zip |
Super-H multilib toolchain fixes
1. On SuperH, configuring GCC with explicit variant of the CPU
(like "sh4") limits the default set of multilibs to just that CPU
and requires --with-multilib-list to change. Allow for "unspecified"
variant, so that we can defer to GCC to determine the list.
2. Support toolchains with both endiannesses at the same time.
3. Add a SuperH/newlib sample
4. Add more flags processing for uClibc
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/functions')
-rw-r--r-- | scripts/functions | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/scripts/functions b/scripts/functions index f11ce23f..dde3eb7e 100644 --- a/scripts/functions +++ b/scripts/functions @@ -851,23 +851,33 @@ CT_EnvModify() { # sample saving sequence. CT_DoBuildTargetTuple() { # Set the endianness suffix, and the default endianness gcc option + target_endian_eb= + target_endian_be= + target_endian_el= + target_endian_le= case "${CT_ARCH_ENDIAN}" in big) target_endian_eb=eb target_endian_be=be - target_endian_el= - target_endian_le= CT_ARCH_ENDIAN_CFLAG="-mbig-endian" CT_ARCH_ENDIAN_LDFLAG="-Wl,-EB" ;; little) - target_endian_eb= - target_endian_be= target_endian_el=el target_endian_le=le CT_ARCH_ENDIAN_CFLAG="-mlittle-endian" CT_ARCH_ENDIAN_LDFLAG="-Wl,-EL" ;; + # big,little and little,big do not need to pass the flags; + # gcc is expected to be configured for that as default. + big,little) + target_endian_eb=eb + target_endian_be=be + ;; + little,big) + target_endian_el=el + target_endian_le=le + ;; esac # Set the bitness suffix @@ -902,7 +912,7 @@ CT_DoBuildTargetTuple() { # Set the default values for ARCH, ABI, CPU, TUNE, FPU and FLOAT unset CT_ARCH_ARCH_CFLAG CT_ARCH_ABI_CFLAG CT_ARCH_CPU_CFLAG CT_ARCH_TUNE_CFLAG CT_ARCH_FPU_CFLAG CT_ARCH_FLOAT_CFLAG - unset CT_ARCH_WITH_ARCH CT_ARCH_WITH_ABI CT_ARCH_WITH_CPU CT_ARCH_WITH_TUNE CT_ARCH_WITH_FPU CT_ARCH_WITH_FLOAT + unset CT_ARCH_WITH_ARCH CT_ARCH_WITH_ABI CT_ARCH_WITH_CPU CT_ARCH_WITH_TUNE CT_ARCH_WITH_FPU CT_ARCH_WITH_FLOAT CT_ARCH_WITH_ENDIAN [ "${CT_ARCH_ARCH}" ] && { CT_ARCH_ARCH_CFLAG="-march=${CT_ARCH_ARCH}"; CT_ARCH_WITH_ARCH="--with-arch=${CT_ARCH_ARCH}"; } [ "${CT_ARCH_ABI}" ] && { CT_ARCH_ABI_CFLAG="-mabi=${CT_ARCH_ABI}"; CT_ARCH_WITH_ABI="--with-abi=${CT_ARCH_ABI}"; } [ "${CT_ARCH_CPU}" ] && { CT_ARCH_CPU_CFLAG="-mcpu=${CT_ARCH_CPU}"; CT_ARCH_WITH_CPU="--with-cpu=${CT_ARCH_CPU}"; } @@ -924,6 +934,10 @@ CT_DoBuildTargetTuple() { ;; esac + if [ "${CT_ARCH_SUPPORTS_WITH_ENDIAN}" = "y" ]; then + CT_ARCH_WITH_ENDIAN="--with-endian=${CT_ARCH_ENDIAN}" + fi + # Build the default kernel tuple part CT_TARGET_KERNEL="${CT_KERNEL}" |