opnsense-src/gnu/usr.bin/binutils/ld/Makefile.mips
Warner Losh e8dce5b9b3 Complete the integration of tbemd branch into head.
TARGET_BIG_ENDIAN is now completely dead, except where it was
originally supposed to be used (internally in the toolchain building).

TARGET_ARCH has changed in three cases:
(1) Little endian mips has changed to mipsel.
(2) Big endian mips has changed to mipseb.
(3) Big endian arm has changed to armeb.

Some additional changes are needed to make 'make universe' work on arm
and mips after this change, so those are commented out for now.

UPDATING information will be forthcoming.  Any remaining rough edges
will be hammered out in -current.
2010-11-10 06:39:49 +00:00

37 lines
1 KiB
Makefile

# $FreeBSD$
.if ${TARGET_ARCH} == "mipsel"
_EMULATION_ENDIAN=l
.else
_EMULATION_ENDIAN=b
.endif
.if defined(TARGET_ABI) && ${TARGET_ABI} != "o32"
.if ${TARGET_ABI} == "n32"
NATIVE_EMULATION=elf32${_EMULATION_ENDIAN}tsmipn32_fbsd
.elif ${TARGET_ABI} == "n64"
NATIVE_EMULATION=elf64${_EMULATION_ENDIAN}tsmip_fbsd
.endif
.endif
NATIVE_EMULATION?=elf32${_EMULATION_ENDIAN}tsmip_fbsd
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