crosstool-ng/scripts/build/arch/arm.sh
Bryan Hundven 52260ccebb libc/musl: add musl-libc support
This patch adds initial support for musl-libc.

Musl-libc versions currently supported:
* 1.0.3 (Stable)
* 1.1.3 (Previous Mainline)
* 1.1.4 (Mainline)

Futher improvements are needed.
* gcc-4.9.x has issues (Might be fixed in musl-1.1.4).
* Multilib support is needed.
* Checks to make sure paths are correct.
* Move to 2-step gcc build. 3-step build is not necessary.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
[yann.morin.1998@free.fr: removed the gcc musl patch, to be added later;
 removed dead code do_get_arch()]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
2014-08-08 22:49:37 +02:00

42 lines
1.2 KiB
Bash

# Compute ARM-specific values
CT_DoArchTupleValues() {
# The architecture part of the tuple:
case "${CT_ARCH_BITNESS}" in
32)
CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_SUFFIX:-${target_endian_eb}}"
;;
64)
# ARM 64 (aka AArch64) is special
[ "${CT_ARCH_BE}" = "y" ] && target_endian_eb="_be"
CT_TARGET_ARCH="aarch64${CT_ARCH_SUFFIX:-${target_endian_eb}}"
;;
esac
# 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;;
musl,y) CT_TARGET_SYS=musleabi;;
*,y) CT_TARGET_SYS=eabi;;
esac
# Set the default instruction set mode
case "${CT_ARCH_ARM_MODE}" in
arm) ;;
thumb)
CT_ARCH_CC_CORE_EXTRA_CONFIG="--with-mode=thumb"
CT_ARCH_CC_EXTRA_CONFIG="--with-mode=thumb"
# CT_ARCH_TARGET_CFLAGS="-mthumb"
;;
esac
if [ "${CT_ARCH_ARM_INTERWORKING}" = "y" ]; then
CT_ARCH_TARGET_CFLAGS+=" -mthumb-interwork"
fi
if [ "${CT_ARCH_ARM_TUPLE_USE_EABIHF}" = "y" ]; then
CT_TARGET_SYS="${CT_TARGET_SYS}hf"
fi
}