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]

[committed] config.gcc: abstract thread_file setting for all rtems targets


I noted one thing shared by all of the many rtems configurations.
I abstracted it.  :-)  I checked the logic on this carefully; enable_threads
and thread_file can't be used or set between the new location and the old
ones.

	* config.gcc: New 'widely ported system' clause for rtems.
	Set thread file there, not in individual clauses.

Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.378
diff -u -r1.378 config.gcc
--- config.gcc	25 Sep 2003 07:00:01 -0000	1.378
+++ config.gcc	25 Sep 2003 07:04:26 -0000
@@ -479,6 +479,11 @@
       ;;
   esac
   ;;
+*-*-rtems*)
+  case ${enable_threads} in
+    yes) thread_file='rtems' ;;
+  esac
+  ;;
 *-*-vxworks*)
   tmake_file=t-vxworks
   tm_file="${tm_file} elfos.h svr4.h vxworks.h"
@@ -643,9 +648,6 @@
 arm*-*-rtems*)
 	tm_file="dbxelf.h elfos.h arm/unknown-elf.h arm/elf.h arm/aout.h arm/arm.h arm/rtems-elf.h rtems.h"
 	tmake_file="arm/t-arm-elf t-rtems"
-	if test x$enable_threads = xyes; then
-	  thread_file='rtems'
-	fi
 	use_fixproto=no
 	;;
 arm*-*-elf | ep9312-*-elf)
@@ -675,9 +677,6 @@
 c4x-*-rtems* | tic4x-*-rtems*)
 	tmake_file="c4x/t-c4x t-rtems"
 	tm_file="c4x/c4x.h c4x/rtems.h rtems.h"
-	if test x$enable_threads = xyes; then
-	  thread_file='rtems'
-	fi
 	c_target_objs="c4x-c.o"
 	cxx_target_objs="c4x-c.o"
 	use_fixproto=no
@@ -723,9 +722,6 @@
 h8300-*-rtems*)
 	tmake_file="h8300/t-h8300 t-rtems"
 	tm_file="h8300/h8300.h dbxcoff.h h8300/coff.h h8300/rtems.h rtems.h"
-	if test x$enable_threads = xyes; then
-	  thread_file='rtems'
-	fi
 	use_fixproto=no
 	;;
 h8300-*-elf*)
@@ -772,9 +768,6 @@
 	target_cpu_default="(MASK_JUMP_IN_DELAY | MASK_PORTABLE_RUNTIME | MASK_GAS | MASK_NO_SPACE_REGS | MASK_SOFT_FLOAT)"
 	tm_file="${tm_file} pa/pa32-regs.h dbxelf.h elfos.h pa/elf.h pa/pa-pro-end.h libgloss.h pa/rtems.h rtems.h"
 	tmake_file="pa/t-pro t-rtems"
-	if test x$enable_threads = xyes; then
-	  thread_file='rtems'
-	fi
 	use_fixproto=no
 	;;
 hppa1.1-*-bsd*)
@@ -1030,9 +1023,6 @@
 	tm_file="${tm_file} i386/unix.h i386/att.h dbxelf.h elfos.h i386/i386elf.h i386/rtemself.h rtems.h"
 	extra_parts="crtbegin.o crtend.o crti.o crtn.o"
 	tmake_file="i386/t-rtems-i386 i386/t-crtstuff t-rtems"
-	if test x$enable_threads = xyes; then
-	  thread_file='rtems'
-	fi
 	use_fixproto=no
 	;;
 i[34567]86-*-sco3.2v5*)	# 80386 running SCO Open Server 5
@@ -1198,9 +1188,6 @@
 i960-*-rtems)
 	tmake_file="i960/t-960bare t-rtems"
 	tm_file="${tm_file} dbxcoff.h i960/i960-coff.h i960/rtems.h rtems.h"
-	if test x$enable_threads = xyes; then
-	  thread_file='rtems'
-	fi
 	c_target_objs="i960-c.o"
 	cxx_target_objs="i960-c.o"
 	use_fixproto=no
@@ -1375,9 +1362,6 @@
 	tmake_file="m68k/t-m68kbare m68k/t-crtstuff t-rtems m68k/t-rtems"
 	tm_file="m68k/m68k.h m68k/m68k-none.h m68k/m68kelf.h dbxelf.h elfos.h m68k/m68kemb.h m68k/m68020-elf.h m68k/rtemself.h rtems.h"
 	extra_parts="crtbegin.o crtend.o"
-	if test x$enable_threads = xyes; then
-	  thread_file='rtems'
-	fi
 	use_fixproto=no
 	;;
 mcore-*-elf)
@@ -1561,9 +1545,6 @@
 mips*-*-rtems*)
 	tm_file="${tm_file} mips/elf.h mips/rtems.h rtems.h"
 	tmake_file="mips/t-elf t-rtems mips/t-rtems"
-	if test x$enable_threads = xyes; then
-	  thread_file='rtems'
-	fi
 	use_fixproto=no
 	;;
 mipstx39-*-elf* | mipstx39el-*-elf*)
@@ -1681,9 +1662,6 @@
 powerpc-*-rtems*)
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h rs6000/sysv4.h rs6000/eabi.h rs6000/rtems.h rtems.h"
 	tmake_file="rs6000/t-fprules t-rtems rs6000/t-ppccomm"
-	if test x$enable_threads = xyes; then
-	  thread_file='rtems'
-	fi
 	use_fixproto=no
 	;;
 powerpc-*-linux*altivec*)
@@ -1838,17 +1816,11 @@
 sh-*-rtemself*)
 	tmake_file="sh/t-sh sh/t-elf t-rtems"
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sh/elf.h sh/embed-elf.h sh/rtemself.h rtems.h"
-	if test x$enable_threads = xyes; then
-	  thread_file='rtems'
-	fi
 	use_fixproto=no
 	;;
 sh-*-rtems*)
 	tmake_file="sh/t-sh t-rtems"
 	tm_file="${tm_file} dbxcoff.h sh/coff.h sh/rtems.h rtems.h"
-	if test x$enable_threads = xyes; then
-	  thread_file='rtems'
-	fi
 	use_fixproto=no
 	;;
 sh-*-linux* | sh[2346lbe]*-*-linux*)
@@ -1955,9 +1927,6 @@
 	tm_file="${tm_file} dbxelf.h elfos.h svr4.h sparc/sysv4.h sol2.h sparc/sol2.h sparc/elf.h sparc/rtemself.h rtems.h"
 	tmake_file="sparc/t-elf sparc/t-crtfm t-rtems"
 	extra_parts="crti.o crtn.o crtbegin.o crtend.o"
-	if test x$enable_threads = xyes; then
-	  thread_file='rtems'
-	fi
 	use_fixproto=no
 	;;
 sparc64-*-solaris2* | sparcv9-*-solaris2*)

-- 
Nathanael Nerode  <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html


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