Sun Dec 13 09:38:22 2009 UTC ()
- set EMUL_LIB_PATH* for relevant mips emulations
- make sure to install the all right mips ldscripts. XXX ugly


(mrg)
diff -r1.6 -r1.7 src/external/gpl3/binutils/usr.bin/ld/Makefile

cvs diff -r1.6 -r1.7 src/external/gpl3/binutils/usr.bin/ld/Makefile (expand / switch to context diff)
--- src/external/gpl3/binutils/usr.bin/ld/Makefile 2009/11/27 14:39:39 1.6
+++ src/external/gpl3/binutils/usr.bin/ld/Makefile 2009/12/13 09:38:22 1.7
@@ -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/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 @@
 		${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