Convert all the arm big endian tests into a regexp rather than a list.

Suggested by: emaste@
This commit is contained in:
imp 2017-08-14 22:25:20 +00:00
parent 18951eee49
commit 2fd0ca5e73
5 changed files with 6 additions and 6 deletions

View File

@ -16,7 +16,7 @@ TARGET_VENDOR?= unknown
TARGET_OS?= freebsd TARGET_OS?= freebsd
BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/} BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/}
TARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS} TARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS}
.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || \ .if ${TARGET_ARCH:Marm*eb} != "" || \
(${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el*} == "") (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el*} == "")
TARGET_BIG_ENDIAN=t TARGET_BIG_ENDIAN=t
.endif .endif

View File

@ -1,6 +1,6 @@
# $FreeBSD$ # $FreeBSD$
.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" .if ${TARGET_ARCH:Marm*eb} != ""
NATIVE_EMULATION= armelfb_fbsd NATIVE_EMULATION= armelfb_fbsd
.else .else
NATIVE_EMULATION= armelf_fbsd NATIVE_EMULATION= armelf_fbsd

View File

@ -1,6 +1,6 @@
# $FreeBSD$ # $FreeBSD$
.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" .if ${TARGET_ARCH:Marm*eb} != ""
DEFAULT_VECTOR= bfd_elf32_bigarm_vec DEFAULT_VECTOR= bfd_elf32_bigarm_vec
.else .else
DEFAULT_VECTOR= bfd_elf32_littlearm_vec DEFAULT_VECTOR= bfd_elf32_littlearm_vec
@ -14,7 +14,7 @@ SRCS+= cpu-arm.c \
elflink.c elflink.c
VECS+= ${DEFAULT_VECTOR} VECS+= ${DEFAULT_VECTOR}
.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" .if ${TARGET_ARCH:Marm*eb} != ""
VECS+= bfd_elf32_littlearm_vec VECS+= bfd_elf32_littlearm_vec
.else .else
VECS+= bfd_elf32_bigarm_vec VECS+= bfd_elf32_bigarm_vec

View File

@ -31,7 +31,7 @@ CFLAGS+= -DCROSS_DIRECTORY_STRUCTURE
CFLAGS+= -DTARGET_ARM_EABI CFLAGS+= -DTARGET_ARM_EABI
.endif .endif
.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" .if ${TARGET_ARCH:Marm*eb} != ""
CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END
.endif .endif
.if ${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "armv6eb" .if ${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "armv6eb"

View File

@ -14,7 +14,7 @@ GCC_CPU=${TARGET_CPUARCH:C/amd64/i386/:C/powerpc/rs6000/:C/sparc64/sparc/}
.if ${TARGET_ARCH} == "sparc64" .if ${TARGET_ARCH} == "sparc64"
TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc
.endif .endif
.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || \ .if ${TARGET_ARCH:Marm*eb} != "" || \
(${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el*} == "") (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el*} == "")
TARGET_BIG_ENDIAN=t TARGET_BIG_ENDIAN=t
.endif .endif