mirror of
https://github.com/opnsense/src.git
synced 2026-02-20 00:11:07 -05:00
Implement MACHINE_ARCH=mips64e[lb] to build N64 images. This replaces MACHINE_ARCH=mipse[lb] TARGET_ABI=n64. MACHINE_ARCH=mipsn32e[lb] has been added, but currently requires WITHOUT_CDDL due to atomic issues in libzfs. I've not investigated this much, but implemented this to preserve as much of the TARGET_ABI functionality that I could. Since its presence doesn't affect the working cases, I've kept it in for now. Added mips64e[lb] to make universe, so more kernels build. And I think this (finally) closes the curtain on the tbemd tree.
36 lines
1 KiB
Makefile
36 lines
1 KiB
Makefile
# $FreeBSD$
|
|
|
|
.if ${TARGET_ARCH:Mmips*el} != ""
|
|
_EMULATION_ENDIAN=l
|
|
.else
|
|
_EMULATION_ENDIAN=b
|
|
.endif
|
|
|
|
.if ${TARGET_ARCH:Mmips64*} != ""
|
|
NATIVE_EMULATION=elf64${_EMULATION_ENDIAN}tsmip_fbsd
|
|
.elif ${TARGET_ARCH:Mmipsn32*} != ""
|
|
NATIVE_EMULATION=elf32${_EMULATION_ENDIAN}tsmipn32_fbsd
|
|
.else
|
|
NATIVE_EMULATION?=elf32${_EMULATION_ENDIAN}tsmip_fbsd
|
|
.endif
|
|
|
|
MIPS_ABIS=elf32btsmip_fbsd elf32ltsmip_fbsd elf64btsmip_fbsd elf64ltsmip_fbsd \
|
|
elf32btsmipn32_fbsd elf32ltsmipn32_fbsd
|
|
.for abi in ${MIPS_ABIS}
|
|
#.if (${abi} != ${NATIVE_EMULATION})
|
|
EMS+= ${abi}
|
|
#.endif
|
|
.for ext in ${ELF_SCR_EXT}
|
|
LDSCRIPTS+= ${abi}.${ext}
|
|
.endfor
|
|
SRCS+= e${abi}.c
|
|
CLEANFILES+= e${abi}.c
|
|
# nb: elf32 handles both elf32 and elf64 targets
|
|
e${abi}.c: ${.CURDIR}/${abi}.sh emultempl/elf32.em \
|
|
scripttempl/elf.sc genscripts.sh stringify.sed
|
|
sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSERACHPATH} \
|
|
${TOOLS_PREFIX}/usr \
|
|
${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \
|
|
${abi} "" no ${abi} ${TARGET_TUPLE} \
|
|
${.CURDIR}/${abi}.sh
|
|
.endfor
|