2004-08-26  Jeff Baker <jbaker@qnx.com>
	* ltconfig (nto-qnx*): Add support for QNX OS suffix.
	* bfd/config.bfd (mips*eb-*-nto*): New target.
	(mips*-*-nto*): New target.
	* gas/configure (mips*-*-nto*): New target.
	* gas/configure.in: Likewise.
	* ld/Makefile.am: Add targets for QNX MIPS emulation files.
	* ld/Makefile.in: Likewise.
	* ld/configure.tgt(mips*-*-nto*): New target.
	* ld/emulparams/elf32bmipnto.sh: New file. QNX MIPS
	emulation.
	* ld/emulparams/elf32lmipnto.sh: New file. QNX MIPS
	emulation.


Index: ltconfig
===================================================================
RCS file: /cvs/src/src/ltconfig,v
retrieving revision 1.21
diff -w -u -1 -0 -p -r1.21 ltconfig
--- ltconfig	21 Jul 2004 19:21:41 -0000	1.21
+++ ltconfig	26 Aug 2004 19:45:29 -0000
@@ -1389,20 +1389,31 @@ dgux*)
 
 sysv4*MP*)
   if test -d /usr/nec ;then
     version_type=linux
     library_names_spec='$libname.so.$versuffix $libname.so.$major $libname.so'
     soname_spec='$libname.so.$major'
     shlibpath_var=LD_LIBRARY_PATH
   fi
   ;;
 
+nto-qnx*)
+  version_type=linux
+  need_lib_prefix=no
+  need_version=no
+  library_names_spec='${libname}${release}.so$versuffix ${libname}${release}.so$major $libname.so'
+  soname_spec='${libname}${release}.so$major'
+  shlibpath_var=LD_LIBRARY_PATH
+  shlibpath_overrides_runpath=yes
+  deplibs_check_method='pass_all'
+  ;;
+  
 *)
   dynamic_linker=no
   ;;
 esac
 echo "$ac_t$dynamic_linker" 1>&6
 test "$dynamic_linker" = no && can_build_shared=no
 
 # Check for command to grab the raw symbol name followed by C symbol from nm.
 echo $ac_n "checking command to parse $NM output... $ac_c" 1>&6

Index: bfd/config.bfd
===================================================================
RCS file: /cvs/src/src/bfd/config.bfd,v
retrieving revision 1.169
diff -w -u -1 -0 -p -r1.169 config.bfd
--- bfd/config.bfd	19 Aug 2004 18:09:44 -0000	1.169
+++ bfd/config.bfd	26 Aug 2004 19:45:29 -0000
@@ -829,20 +829,30 @@ case "${targ}" in
     targ_selvecs=ecoff_little_vec
     ;;
   mips*el-*-elf* | mips*el-*-rtems* | mips*el-*-vxworks* | mips*-*-chorus*)
     targ_defvec=bfd_elf32_littlemips_vec
     targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
     ;;
   mips*-*-elf* | mips*-*-rtems* | mips*-*-vxworks | mips*-*-windiss)
     targ_defvec=bfd_elf32_bigmips_vec
     targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
     ;;
+  mips*eb-*-nto*)
+    targ_defvec=bfd_elf32_bigmips_vec
+    targ_selvecs="bfd_elf32_littlemips_vec"
+    targ_cflags=-D__QNXTARGET__
+    ;;
+  mips*-*-nto*)
+    targ_defvec=bfd_elf32_littlemips_vec
+    targ_selvecs="bfd_elf32_bigmips_vec"
+    targ_cflags=-D__QNXTARGET__
+    ;;
   mips*-*-none)
     targ_defvec=bfd_elf32_bigmips_vec
     targ_selvecs="bfd_elf32_littlemips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec"
     ;;
   mips*el-*-openbsd*)
     targ_defvec=bfd_elf32_littlemips_vec
     targ_selvecs="bfd_elf32_bigmips_vec bfd_elf64_bigmips_vec bfd_elf64_littlemips_vec ecoff_little_vec ecoff_big_vec"
     ;;
   mips*-*-openbsd*)
     targ_defvec=bfd_elf32_bigmips_vec

Index: gas/configure
===================================================================
RCS file: /cvs/src/src/gas/configure,v
retrieving revision 1.176
diff -w -u -1 -0 -p -r1.176 configure
--- gas/configure	19 Aug 2004 18:11:00 -0000	1.176
+++ gas/configure	26 Aug 2004 19:45:32 -0000
@@ -4437,20 +4437,21 @@ echo "$as_me: error: Unknown vendor for 
       mips-*-ecoff*)			fmt=ecoff ;;
       mips-*-pe*)			fmt=coff endian=little em=pe ;;
       mips-*-irix6*)			fmt=elf em=irix ;;
       mips-*-irix5*)			fmt=elf em=irix ;;
       mips-*-irix*)			fmt=ecoff em=irix ;;
       mips-*-lnews*)			fmt=ecoff em=lnews ;;
       mips-*-riscos*)			fmt=ecoff ;;
       mips*-*-linux*)			fmt=elf em=tmips ;;
       mips-*-sysv4*MP* | mips-*-gnu*)	fmt=elf em=tmips ;;
       mips-*-sysv*)			fmt=ecoff ;;
+      mips*-*-nto*)			fmt=elf ;;
       mips-*-elf* | mips-*-rtems*)	fmt=elf ;;
       mips-*-netbsd*)			fmt=elf ;;
       mips-*-openbsd*)			fmt=elf ;;
 
       mmix-*-*)				fmt=elf ;;
       mn10200-*-*)			fmt=elf ;;
       # cpu_type for am33_2.0 is set to mn10300
       mn10300-*-linux*)			fmt=elf bfd_gas=yes em=linux ;;
       mn10300-*-*)			fmt=elf ;;
 
Index: gas/configure.in
===================================================================
RCS file: /cvs/src/src/gas/configure.in,v
retrieving revision 1.160
diff -w -u -1 -0 -p -r1.160 configure.in
--- gas/configure.in	19 Aug 2004 18:11:00 -0000	1.160
+++ gas/configure.in	26 Aug 2004 19:45:32 -0000
@@ -389,20 +389,21 @@ changequote([,])dnl
       mips-*-ecoff*)			fmt=ecoff ;;
       mips-*-pe*)			fmt=coff endian=little em=pe ;;
       mips-*-irix6*)			fmt=elf em=irix ;;
       mips-*-irix5*)			fmt=elf em=irix ;;
       mips-*-irix*)			fmt=ecoff em=irix ;;
       mips-*-lnews*)			fmt=ecoff em=lnews ;;
       mips-*-riscos*)			fmt=ecoff ;;
       mips*-*-linux*)			fmt=elf em=tmips ;;
       mips-*-sysv4*MP* | mips-*-gnu*)	fmt=elf em=tmips ;;
       mips-*-sysv*)			fmt=ecoff ;;
+      mips*-*-nto*)			fmt=elf ;;
       mips-*-elf* | mips-*-rtems*)	fmt=elf ;;
       mips-*-netbsd*)			fmt=elf ;;
       mips-*-openbsd*)			fmt=elf ;;
 
       mmix-*-*)				fmt=elf ;;
       mn10200-*-*)			fmt=elf ;;
       # cpu_type for am33_2.0 is set to mn10300
       mn10300-*-linux*)			fmt=elf bfd_gas=yes em=linux ;;
       mn10300-*-*)			fmt=elf ;;
 
Index: ld/Makefile.am
===================================================================
RCS file: /cvs/src/src/ld/Makefile.am,v
retrieving revision 1.157
diff -w -u -1 -0 -p -r1.157 Makefile.am
--- ld/Makefile.am	26 Jul 2004 12:29:02 -0000	1.157
+++ ld/Makefile.am	26 Aug 2004 19:45:34 -0000
@@ -145,35 +145,37 @@ ALL_EMULATIONS = \
 	edelta68.o \
 	eelf32_dlx.o \
 	eebmon29k.o \
 	eelf32_i960.o \
 	eelf32_i860.o \
 	eelf32_sparc.o \
 	eelf32b4300.o \
 	eelf32cr16c.o \
 	eelf32bmip.o \
 	eelf32bmipn32.o \
+	eelf32bmipsnto.o \
 	eelf32btsmip.o \
 	eelf32crx.o \
 	eelf32btsmipn32.o \
 	eelf32ltsmip.o \
 	eelf32ltsmipn32.o \
 	eelf32ebmip.o \
 	eelf32elmip.o \
 	eelf32fr30.o \
 	eelf32frv.o \
 	eelf32i370.o \
 	eelf32ip2k.o \
 	eelf32iq2000.o \
 	eelf32iq10.o \
 	eelf32l4300.o \
 	eelf32lmip.o \
+	eelf32lmipnto.o \
 	eelf32lppc.o \
 	eelf32lppcnto.o \
 	eelf32lppcsim.o \
 	eelf32mcore.o \
 	eelf32mipswindiss.o \
 	eelf32openrisc.o \
 	eelf32ppc.o \
 	eelf32ppc_fbsd.o \
 	eelf32ppclinux.o \
 	eelf32ppcnto.o \
@@ -641,20 +643,26 @@ eelf32b4300.c: $(srcdir)/emulparams/elf3
   $(srcdir)/emulparams/elf32bmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
 eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \
   $(srcdir)/emultempl/elf32.em \
   $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)"
 eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
+eelf32bmipnto.c: $(srcdir)/emulparams/elf32bmipnto.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf32bmipnto "$(tdir_elf32bmipnto)"
+eelf32lmipnto.c: $(srcdir)/emulparams/elf32lmipnto.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf32lmipnto "$(tdir_elf32lmipnto)"
 eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
   $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/irix.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
 eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
   $(srcdir)/emulparams/elf32bmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
 eelf32crx.c: $(srcdir)/emulparams/elf32crx.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/crxelf.em \
Index: ld/Makefile.in
===================================================================
RCS file: /cvs/src/src/ld/Makefile.in,v
retrieving revision 1.169
diff -w -u -1 -0 -p -r1.169 Makefile.in
--- ld/Makefile.in	26 Jul 2004 12:29:02 -0000	1.169
+++ ld/Makefile.in	26 Aug 2004 19:45:35 -0000
@@ -259,35 +259,37 @@ ALL_EMULATIONS = \
 	edelta68.o \
 	eelf32_dlx.o \
 	eebmon29k.o \
 	eelf32_i960.o \
 	eelf32_i860.o \
 	eelf32_sparc.o \
 	eelf32b4300.o \
 	eelf32cr16c.o \
 	eelf32bmip.o \
 	eelf32bmipn32.o \
+	eelf32bmipnto.o \
 	eelf32btsmip.o \
 	eelf32crx.o \
 	eelf32btsmipn32.o \
 	eelf32ltsmip.o \
 	eelf32ltsmipn32.o \
 	eelf32ebmip.o \
 	eelf32elmip.o \
 	eelf32fr30.o \
 	eelf32frv.o \
 	eelf32i370.o \
 	eelf32ip2k.o \
 	eelf32iq2000.o \
 	eelf32iq10.o \
 	eelf32l4300.o \
 	eelf32lmip.o \
+	eelf32lmipnto.o \
 	eelf32lppc.o \
 	eelf32lppcnto.o \
 	eelf32lppcsim.o \
 	eelf32mcore.o \
 	eelf32mipswindiss.o \
 	eelf32openrisc.o \
 	eelf32ppc.o \
 	eelf32ppc_fbsd.o \
 	eelf32ppclinux.o \
 	eelf32ppcnto.o \
@@ -1367,20 +1369,26 @@ eelf32b4300.c: $(srcdir)/emulparams/elf3
   $(srcdir)/emulparams/elf32bmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32b4300 "$(tdir_elf32b4300)"
 eelf32cr16c.c: $(srcdir)/emulparams/elf32cr16c.sh \
   $(srcdir)/emultempl/elf32.em \
   $(srcdir)/scripttempl/elf32cr16c.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32cr16c "$(tdir_elf32cr16c)"
 eelf32bmip.c: $(srcdir)/emulparams/elf32bmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32bmip "$(tdir_elf32bmip)"
+eelf32bmipnto.c: $(srcdir)/emulparams/elf32bmipnto.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf32bmipnto "$(tdir_elf32bmipnto)"
+eelf32lmipnto.c: $(srcdir)/emulparams/elf32lmipnto.sh \
+  $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
+	${GENSCRIPTS} elf32lmipnto "$(tdir_elf32lmipnto)"
 eelf32bsmip.c: $(srcdir)/emulparams/elf32bsmip.sh \
   $(srcdir)/emulparams/elf32bmip.sh $(srcdir)/emultempl/irix.em \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32bsmip "$(tdir_elf32bsmip)"
 eelf32btsmip.c: $(srcdir)/emulparams/elf32btsmip.sh \
   $(srcdir)/emulparams/elf32bmip.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/scripttempl/elf.sc ${GEN_DEPENDS}
 	${GENSCRIPTS} elf32btsmip "$(tdir_elf32btsmip)"
 eelf32crx.c: $(srcdir)/emulparams/elf32crx.sh \
   $(srcdir)/emultempl/elf32.em $(srcdir)/emultempl/crxelf.em \
Index: ld/configure.tgt
===================================================================
RCS file: /cvs/src/src/ld/configure.tgt,v
retrieving revision 1.154
diff -w -u -1 -0 -p -r1.154 configure.tgt
--- ld/configure.tgt	19 Aug 2004 18:11:42 -0000	1.154
+++ ld/configure.tgt	26 Aug 2004 19:45:35 -0000
@@ -421,20 +421,23 @@ mips*-*-netbsd*)	targ_emul=elf32bmip
 			;;
 mips*-*-bsd*)		targ_emul=mipsbig ;;
 mips*vr4300el-*-elf*)	targ_emul=elf32l4300 ;;
 mips*vr4300-*-elf*)	targ_emul=elf32b4300 ;;
 mips*vr4100el-*-elf*)	targ_emul=elf32l4300 ;;
 mips*vr4100-*-elf*)	targ_emul=elf32b4300 ;;
 mips*vr5000el-*-elf*)	targ_emul=elf32l4300 ;;
 mips*vr5000-*-elf*)	targ_emul=elf32b4300 ;;
 mips*el-*-elf*)		targ_emul=elf32elmip ;;
 mips*-*-elf*)		targ_emul=elf32ebmip ;;
+mips*-*-nto*)		targ_emul=elf32lmipnto
+			targ_extra_emuls="elf32bmipnto"
+			;;
 mips*el-*-rtems*)	targ_emul=elf32elmip ;;
 mips*-*-rtems*)		targ_emul=elf32ebmip ;;
 mips*el-*-vxworks*)	targ_emul=elf32elmip ;;
 mips*-*-vxworks*)	targ_emul=elf32ebmip
 		        targ_extra_emuls="elf32elmip" ;;
 mips*-*-windiss)	targ_emul=elf32mipswindiss ;;
 mips64*el-*-linux-gnu*)	targ_emul=elf32ltsmipn32
 			targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
 			;;
 mips64*-*-linux-gnu*)	targ_emul=elf32btsmipn32
