7408d8ff34
Unlike the unisex architecutres we've had so far, mips is bisexual. These tools can produce either byte sex, and the compiler/make determines the proper gender to use. Otherwise, we'd have to have had mipsel and mipseb in all the places that we have just mips. And there are other complications with doing that (binutils doesn't like to build mips tools without both byte genders, it seems). Introduced BINUTIL_ARCH so that other bisexual architectures can a generic mechanism. We cannot just define MACHINE_ARCH as mips because we need to differentiate big and little endian types of binaries. Discussions on freebsd-arch have hashed out this issue (and the parallel libc issues). NetBSD is moving towards mipsel and mipseb for their two flavors of mips ports (in time for 1.4, if this change hasn't already been accomplished). I've been building i386 worlds with this tree for a three months with these files in place with no ill effects.
38 lines
1.4 KiB
Makefile
38 lines
1.4 KiB
Makefile
#
|
|
# $Id: Makefile.i386,v 1.4 1998/06/04 06:38:17 bde Exp $
|
|
#
|
|
|
|
.if ${MACHINE_ARCH} == "mipseb"
|
|
HOST= mipseb-unknown-freebsdelf
|
|
CFLAGS+= -DDEFAULT_EMULATION=\"elf_mips\"
|
|
CFLAGS+= -DTARGET=\"mipseb-unknown-freebsdelf\"
|
|
.endif
|
|
.if ${MACHINE_ARCH} == "mipsel"
|
|
HOST= mipsel-unknown-freebsdelf
|
|
CFLAGS+= -DDEFAULT_EMULATION=\"elf_mips\"
|
|
CFLAGS+= -DTARGET=\"mipsel-unknown-freebsdelf\"
|
|
.endif
|
|
EMS+= ld_elf32bmip_emulation ld_elf32lmip_emulation
|
|
LDSCRIPTS+= elf32bmip.x elf32bmip.xbn elf32bmip.xn elf32bmip.xr \
|
|
elf32bmip.xs elf32bmip.xu elf32lmip.x elf32lmip.xbn \
|
|
elf32lmip.xn elf32lmip.xr elf32lmip.xs elf32lmip.xu
|
|
SRCS+= eelf32bmip.c
|
|
SRCS+= eelf32lmip.c
|
|
CLEANFILES+= eelf32bmip.c
|
|
CLEANFILES+= eelf32lmip.c
|
|
|
|
eelf32bmip.c: emulparams/elf32ebmip.sh emultempl/elf32.em \
|
|
scripttempl/elf.sc genscripts.sh emultempl/stringify.sed
|
|
env LIB_PATH="/usr/lib" \
|
|
sh ${SRCDIR}/ld/genscripts.sh ${SRCDIR}/ld ${DESTDIR}/usr/lib \
|
|
${HOST} mipseb-unknown-freebsdelf mipseb-unknown-freebsdelf \
|
|
elf32bmip "" elf32bmip mipseb-unknown-freebsdelf
|
|
|
|
eelf32lmip.c: emulparams/elf32elmip.sh emultempl/elf32.em \
|
|
scripttempl/elf.sc genscripts.sh emultempl/stringify.sed
|
|
env LIB_PATH="/usr/lib" \
|
|
sh ${SRCDIR}/ld/genscripts.sh ${SRCDIR}/ld ${DESTDIR}/usr/lib \
|
|
${HOST} mipsel-unknown-freebsdelf mipsel-unknown-freebsdelf \
|
|
elf32lmip "" elf32lmip mipsel-unknown-freebsdelf
|
|
|