From f5f2e65887eae0c2edd22ba31f92739ba2b58215 Mon Sep 17 00:00:00 2001 From: mrg Date: Sun, 13 Dec 2009 09:38:22 +0000 Subject: [PATCH] - set EMUL_LIB_PATH* for relevant mips emulations - make sure to install the all right mips ldscripts. XXX ugly --- external/gpl3/binutils/usr.bin/ld/Makefile | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/external/gpl3/binutils/usr.bin/ld/Makefile b/external/gpl3/binutils/usr.bin/ld/Makefile index 1a376cdf5e27..f7aea5fb968f 100644 --- a/external/gpl3/binutils/usr.bin/ld/Makefile +++ b/external/gpl3/binutils/usr.bin/ld/Makefile @@ -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 @@ -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