This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[arm] Automate --with-cpu


The patch below matches values for --with-cpu against arm-cores.def rather 
than using a fixed list. I see no reason to have separately maintained lists, 
in fact quite the opposite.

Tested with cross to arm-none-elf.
Ok?

Paul

2004-04-27  Paul Brook  <paul@codesourcery.com>

	* config.gcc: Pull list of cores from arm-cores.def.

Index: config.gcc
===================================================================
RCS file: /var/cvsroot/gcc-cvs/gcc/gcc/config.gcc,v
retrieving revision 1.451
diff -c -r1.451 config.gcc
*** a/config.gcc	23 Apr 2004 17:56:08 -0000	1.451
--- b/config.gcc	27 Apr 2004 13:28:23 -0000
***************
*** 2212,2238 ****
  	arm*-*-*)
  		supported_defaults="arch cpu float tune fpu abi"
  		for which in cpu tune; do
  			eval "val=\$with_$which"
! 			case "$val" in
! 			"" \
! 			| arm[236789] | arm250 | arm[67][01]0 \
! 			| arm60 | arm620 | arm7d | arm7di \
! 			| arm7m | arm7dm | arm7dmi | arm[79]tdmi \
! 			| arm70 | arm700i | arm710t | arm720 \
! 			| arm720t | arm740t | arm710c | arm920 \
! 			| arm920t | arm926ejs | arm940t | arm9e | arm10tdmi \
! 			| arm7100 | arm7500 | arm7500fe | arm810 \
! 			| arm1026ejs | arm1020t | arm1136js | arm1136jfs \
! 			| xscale | iwmmxt \
! 			| ep9312 \
! 			| strongarm | strongarm110 | strongarm11[01]0)
! 				# OK
! 				;;
! 			*)
  				echo "Unknown CPU used in --with-$which=$val" 1>&2
  				exit 1
! 				;;
! 			esac
  		done
  
  		case "$with_arch" in
--- 2212,2231 ----
  	arm*-*-*)
  		supported_defaults="arch cpu float tune fpu abi"
  		for which in cpu tune; do
+ 			# See if it matches any of the entries in arm-cores.def
  			eval "val=\$with_$which"
! 			[ x"$val" = x ] && val=unset
! 			for opt in `sed -e '/ARM_CORE/!d' \
! 			  -e 's/ARM_CORE(\([^,]*\),.*$/\1/' \
! 			  ${srcdir}/config/arm/arm-cores.def` unset .
! 			do
! 				[ x$opt = x"$val" ] && break
! 			done
! 			if [ $opt = . ]; then
  				echo "Unknown CPU used in --with-$which=$val" 1>&2
  				exit 1
! 			  
! 			fi
  		done
  
  		case "$with_arch" in


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