This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Bad config.sub output for mips-linux


Your patch could have been slightly improved, so I made a few changes
and I've come up with the following patch.  Since it modifies the
existing behaviour, I'm posting the patch to binutils@ for review
before committing.  Using your examples as test cases, I get:

  $ for m in mips-linux{,-gnu} mipsel-linux mips64-linux ; do sh config.sub $m ; done
  mips-unknown-linux-gnu
  mips-unknown-linux-gnu
  mipsel-unknown-linux-gnu
  mips64-unknown-linux-gnu

Here is the patch.  Any violent objections, folks?

2002-02-22  Ben Elliston  <bje@redhat.com>

	* config.sub (case $basic_machine): Add mips and clean up other 
	Linux specific cases. Now `config.sub mips` yields mips-unknown-elf.

Index: config.sub
===================================================================
RCS file: /cvsroot/config/config/config.sub,v
retrieving revision 1.245
diff -u -c -r1.245 config.sub
*** config.sub	22 Feb 2002 03:31:00 -0000	1.245
--- config.sub	22 Feb 2002 03:56:31 -0000
***************
*** 235,241 ****
  	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
  	| i370 | i860 | i960 | ia64 \
  	| m32r | m68000 | m68k | m88k | mcore \
! 	| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
  	| mips64vr4100 | mips64vr4100el | mips64vr4300 \
  	| mips64vr4300el | mips64vr5000 | mips64vr5000el \
  	| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
--- 235,241 ----
  	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
  	| i370 | i860 | i960 | ia64 \
  	| m32r | m68000 | m68k | m88k | mcore \
! 	| mips | mips16 | mips64 | mips64el | mips64orion | mips64orionel \
  	| mips64vr4100 | mips64vr4100el | mips64vr4300 \
  	| mips64vr4300el | mips64vr5000 | mips64vr5000el \
  	| mipsbe | mipseb | mipsel | mipsle | mipstx39 | mipstx39el \
***************
*** 605,618 ****
  		basic_machine=m68k-atari
  		os=-mint
  		;;
- 	mipsel*-linux*)
- 		basic_machine=mipsel-unknown
- 		os=-linux-gnu
- 		;;
- 	mips*-linux*)
- 		basic_machine=mips-unknown
- 		os=-linux-gnu
- 		;;
  	mips3*-*)
  		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
  		;;
--- 605,610 ----
***************
*** 984,996 ****
  		;;
  	op60c)
  		basic_machine=hppa1.1-oki
- 		;;
- 	mips)
- 		if [ x$os = x-linux-gnu ]; then
- 			basic_machine=mips-unknown
- 		else
- 			basic_machine=mips-mips
- 		fi
  		;;
  	romp)
  		basic_machine=romp-ibm
--- 976,981 ----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]