]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - share/mk/bsd.endian.mk
Merge bmake-20230510
[FreeBSD/FreeBSD.git] / share / mk / bsd.endian.mk
1 # $FreeBSD$
2
3 .if ${MACHINE_CPUARCH} == "aarch64" || \
4     ${MACHINE_CPUARCH} == "arm" || \
5     ${MACHINE_ARCH} == "amd64" || \
6     ${MACHINE_ARCH} == "i386" || \
7     ${MACHINE_ARCH} == "powerpc64le" || \
8     ${MACHINE_CPUARCH} == "riscv"
9 TARGET_ENDIANNESS= 1234
10 CAP_MKDB_ENDIAN= -l
11 LOCALEDEF_ENDIAN= -l
12 .elif ${MACHINE_ARCH} == "powerpc" || \
13     ${MACHINE_ARCH} == "powerpc64" || \
14     ${MACHINE_ARCH} == "powerpcspe"
15 TARGET_ENDIANNESS= 4321
16 CAP_MKDB_ENDIAN= -b
17 LOCALEDEF_ENDIAN= -b
18 .elif ${.MAKE.OS} == "FreeBSD"
19 .error Don't know the endian of this architecture
20 .else
21 #
22 # During bootstrapping on !FreeBSD OSes, we need to define some value.  Short of
23 # having an exhaustive list for all variants of Linux and MacOS we simply do not
24 # set TARGET_ENDIANNESS and poison the other variables. They should be unused
25 # during the bootstrap phases (apart from one place that's adequately protected
26 # in bsd.compiler.mk) where we're building the bootstrap tools.
27 #
28 CAP_MKDB_ENDIAN= -B     # Poisoned value, invalid flags for both cap_mkdb
29 LOCALEDEF_ENDIAN= -B    # and localedef.
30 .endif