From 2fd0ca5e7314293307386c18b62fc74490fa6827 Mon Sep 17 00:00:00 2001 From: imp Date: Mon, 14 Aug 2017 22:25:20 +0000 Subject: [PATCH] Convert all the arm big endian tests into a regexp rather than a list. Suggested by: emaste@ --- gnu/usr.bin/binutils/Makefile.inc0 | 2 +- gnu/usr.bin/binutils/ld/Makefile.arm | 2 +- gnu/usr.bin/binutils/libbfd/Makefile.arm | 4 ++-- gnu/usr.bin/cc/Makefile.inc | 2 +- gnu/usr.bin/cc/Makefile.tgt | 2 +- 5 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/usr.bin/binutils/Makefile.inc0 b/gnu/usr.bin/binutils/Makefile.inc0 index 66bc038b8772..0f4bfed62535 100644 --- a/gnu/usr.bin/binutils/Makefile.inc0 +++ b/gnu/usr.bin/binutils/Makefile.inc0 @@ -16,7 +16,7 @@ TARGET_VENDOR?= unknown TARGET_OS?= freebsd BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/} 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_BIG_ENDIAN=t .endif diff --git a/gnu/usr.bin/binutils/ld/Makefile.arm b/gnu/usr.bin/binutils/ld/Makefile.arm index ea417a542939..9fe573cad219 100644 --- a/gnu/usr.bin/binutils/ld/Makefile.arm +++ b/gnu/usr.bin/binutils/ld/Makefile.arm @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH:Marm*eb} != "" NATIVE_EMULATION= armelfb_fbsd .else NATIVE_EMULATION= armelf_fbsd diff --git a/gnu/usr.bin/binutils/libbfd/Makefile.arm b/gnu/usr.bin/binutils/libbfd/Makefile.arm index 8674b1943afc..9d0a12b26a45 100644 --- a/gnu/usr.bin/binutils/libbfd/Makefile.arm +++ b/gnu/usr.bin/binutils/libbfd/Makefile.arm @@ -1,6 +1,6 @@ # $FreeBSD$ -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH:Marm*eb} != "" DEFAULT_VECTOR= bfd_elf32_bigarm_vec .else DEFAULT_VECTOR= bfd_elf32_littlearm_vec @@ -14,7 +14,7 @@ SRCS+= cpu-arm.c \ elflink.c VECS+= ${DEFAULT_VECTOR} -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH:Marm*eb} != "" VECS+= bfd_elf32_littlearm_vec .else VECS+= bfd_elf32_bigarm_vec diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc index 5a79eaf7b4f3..b3044df7f68c 100644 --- a/gnu/usr.bin/cc/Makefile.inc +++ b/gnu/usr.bin/cc/Makefile.inc @@ -31,7 +31,7 @@ CFLAGS+= -DCROSS_DIRECTORY_STRUCTURE CFLAGS+= -DTARGET_ARM_EABI .endif -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH:Marm*eb} != "" CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END .endif .if ${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "armv6eb" diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt index 6e424ba688f3..b1a7f1608c72 100644 --- a/gnu/usr.bin/cc/Makefile.tgt +++ b/gnu/usr.bin/cc/Makefile.tgt @@ -14,7 +14,7 @@ GCC_CPU=${TARGET_CPUARCH:C/amd64/i386/:C/powerpc/rs6000/:C/sparc64/sparc/} .if ${TARGET_ARCH} == "sparc64" TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc .endif -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || \ +.if ${TARGET_ARCH:Marm*eb} != "" || \ (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el*} == "") TARGET_BIG_ENDIAN=t .endif