3742e223f0
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.
50 lines
1.2 KiB
Makefile
50 lines
1.2 KiB
Makefile
#
|
|
# $Id: Makefile.inc0,v 1.5 1998/09/06 23:01:49 jdp Exp $
|
|
#
|
|
|
|
#
|
|
# This is included explicitly at the top of each sub-Makefile. We can't
|
|
# use the normal "Makefile.inc" mechanism, because we need some of these
|
|
# definitions before the sub-Makefile is processed.
|
|
#
|
|
|
|
VERSION= 2.9.1
|
|
|
|
.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
|
|
BINUTIL_ARCH=mips
|
|
.else
|
|
BINUTIL_ARCH=${MACHINE_ARCH}
|
|
.endif
|
|
|
|
# RELTOP is the relative path to this point in the source or object
|
|
# tree, from any subdirectory of same. It gets extra "../" prefixes
|
|
# added to it as we descend into subdirectories.
|
|
RELTOP:= ..
|
|
|
|
RELSRC= ${RELTOP}/../../../contrib/binutils
|
|
SRCDIR= ${.CURDIR}/${RELSRC}
|
|
|
|
CFLAGS+= -D_GNU_SOURCE
|
|
|
|
# We use "-I-" because without it our yacc-generated parser tries to
|
|
# use GNU's bison-generated header files.
|
|
CFLAGS+= -I- -I.
|
|
.if exists(${.CURDIR}/${BINUTIL_ARCH})
|
|
CFLAGS+= -I${.CURDIR}/${BINUTIL_ARCH}
|
|
.endif
|
|
CFLAGS+= -I${.CURDIR}
|
|
CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd/${BINUTIL_ARCH}
|
|
CFLAGS+= -I${SRCDIR}/include
|
|
|
|
.if exists(${.CURDIR}/${BINUTIL_ARCH})
|
|
.PATH: ${.CURDIR}/${BINUTIL_ARCH}
|
|
.endif
|
|
|
|
ARCHS= ${BINUTIL_ARCH} ${CROSS_TOOLS}
|
|
|
|
.for _arch in ${ARCHS}
|
|
.if exists(${.CURDIR}/Makefile.${_arch})
|
|
.include "${.CURDIR}/Makefile.${_arch}"
|
|
.endif
|
|
.endfor
|