- set EMUL_LIB_PATH* for relevant mips emulations

- make sure to install the all right mips ldscripts. XXX ugly
This commit is contained in:
mrg 2009-12-13 09:38:22 +00:00
parent af35c52924
commit f5f2e65887
1 changed files with 15 additions and 3 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.6 2009/11/27 14:39:39 skrll Exp $
# $NetBSD: Makefile,v 1.7 2009/12/13 09:38:22 mrg Exp $
.include <bsd.own.mk>
@ -83,6 +83,12 @@ EMUL_LIB_PATH.${f}=/usr/lib/i386
EMUL_LIB_PATH.${f}=/usr/lib/sparc
. else
EMUL_LIB_PATH.${f}=/usr/lib
. elif ${MACHINE_ARCH} == "mips64el"
. if "${f}" == "elf32ltsmip" || "${f}" == "elf32btsmip"
EMUL_LIB_PATH.${f}:=/usr/lib/o32
. elif "${f}" == "elf64btsmip" || "${f}" == "elf64btsmip"
EMUL_LIB_PATH.${f}:=/usr/lib/64
. endif
. endif
#GENSCRIPTS = LIB_PATH='${LIB_PATH}' $(SHELL) $(srcdir)/genscripts.sh "${srcdir}" "${libdir}" "${prefix}" "${exec_prefix}" @host@ @target@ @ta rget_alias@ "@EMULATION_LIBPATH@" "@NATIVE_LIB_DIRS@" @use_sysroot@
@ -95,13 +101,19 @@ e${f}.c: ${DIST}/ld/genscripts.sh ${.CURDIR}/Makefile stringify.sed
${G_target_alias} ${G_target_alias} ${G_target_alias} \
${G_EMUL} ${LIBDIR} yes ${f} "${G_target_alias}"
.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64"
.if ${MACHINE_ARCH} == "x86_64" || ${MACHINE_ARCH} == "sparc64" || \
${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb"
FILES+= ${f}.x ${f}.xbn ${f}.xn ${f}.xr ${f}.xu
# XXX hack to find out if .xs exists - slow!
# XXX hack to find out if .xs/.xc exists - slow!
HAS_XS!= grep '^GENERATE_SHLIB_SCRIPT' ${DIST}/ld/emulparams/${f}.sh || echo
# XXX
#HAS_XC!= grep '^GENERATE_COMBRELOC_SCRIPT' ${DIST}/ld/emulparams/${f}.sh || echo
.if !empty(HAS_XS)
FILES+= ${f}.xc ${f}.xd ${f}.xdc ${f}.xdw ${f}.xs ${f}.xsc ${f}.xsw ${f}.xw
# only do this if we don't have GENERATE_SHLIB_SCRIPT
.elif ${MACHINE_ARCH} == "mips64el" || ${MACHINE_ARCH} == "mips64eb"
FILES+= ${f}.xc ${f}.xs ${f}.xsc ${f}.xsw ${f}.xw
.endif
.endif # x64_64 || sparc64