Set correct lib32 MACHINE_ARCH for mips64el*.

Use "mipsel" instead of "mips" as the 32-bit MACHINE_ARCH when
building lib32 for little-endian 64-bit MIPS targets.  This fixes an
error where some objects were compiled as LE and others compiled as BE
causing a link error for rtld32.

Reviewed by:	emaste
Sponsored by:	DARPA
Differential Revision:	https://reviews.freebsd.org/D23028
This commit is contained in:
jhb 2020-01-03 23:31:38 +00:00
parent c214ed8761
commit 3909294735

View File

@ -79,10 +79,11 @@ LIB32CPUFLAGS= -target mips-unknown-freebsd13.0
.endif
LIB32CPUFLAGS+= -mabi=32
LIB32_MACHINE= mips
LIB32_MACHINE_ARCH= mips
.if ${COMPAT_ARCH:Mmips64el*} != ""
LIB32_MACHINE_ARCH= mipsel
_EMULATION= elf32ltsmip_fbsd
.else
LIB32_MACHINE_ARCH= mips
_EMULATION= elf32btsmip_fbsd
.endif
LIB32WMAKEFLAGS= LD="${XLD} -m ${_EMULATION}"