diff options
author | Warner Losh <imp@FreeBSD.org> | 2017-08-12 17:07:27 +0000 |
---|---|---|
committer | Warner Losh <imp@FreeBSD.org> | 2017-08-12 17:07:27 +0000 |
commit | 7709b2ae166c10e8f61b27983777d3ccb9067232 (patch) | |
tree | 2ac8cffc4d8273deaf034096ec0a8db775bbb4a3 /Makefile | |
parent | b9c0f39213846e31e2d78c7d136a71c4605f5314 (diff) | |
download | src-7709b2ae166c10e8f61b27983777d3ccb9067232.tar.gz src-7709b2ae166c10e8f61b27983777d3ccb9067232.zip |
Make _TO_CPUARCH macro for ARCH to CPUARCH conversions
Consolidate all the regular expressions to convert from MACHINE_ARCH
to MACHINE_CPUARCH into a variable and use that variable in preference
to the almost identical copies in the tree (which should have been
identical).
Differential Revision: https://reviews.freebsd.org/D11986
Notes
Notes:
svn path=/head/; revision=322429
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -245,12 +245,17 @@ _MAKE+= MK_META_MODE=no .endif # !exists(/dev/filemon) && !defined(NO_FILEMON) .endif # !defined(_CAN_USE_META_MODE) -# Guess machine architecture from machine type, and vice versa. +# Guess target architecture from target type, and vice versa, based on +# historic FreeBSD practice of tending to have TARGET == TARGET_ARCH +# expanding to TARGET == TARGET_CPUARCH in recent times, with known +# exceptions. .if !defined(TARGET_ARCH) && defined(TARGET) +# T->TA mapping is usually TARGET with arm64 the odd man out _TARGET_ARCH= ${TARGET:S/arm64/aarch64/} .elif !defined(TARGET) && defined(TARGET_ARCH) && \ ${TARGET_ARCH} != ${MACHINE_ARCH} -_TARGET= ${TARGET_ARCH:C/mips(n32|64)?(el)?(hf)?/mips/:C/arm(v6)?(eb)?/arm/:C/aarch64/arm64/:C/powerpc64/powerpc/:C/powerpcspe/powerpc/:C/riscv64(sf)?/riscv/} +# TA->T mapping is accidentally CPUARCH with aarch64 the odd man out +_TARGET= ${TARGET_ARCH:${__TO_CPUARCH}:C/aarch64/arm64/} .endif .if defined(TARGET) && !defined(_TARGET) _TARGET=${TARGET} |