This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] FreeBSD: eliminate tiny config files in favor of tm_defines
- From: neroden at twcny dot rr dot com (Nathanael Nerode)
- To: gcc-patches at gcc dot gnu dot org
- Date: Sat, 11 Oct 2003 18:02:52 -0400
- Subject: [patch] FreeBSD: eliminate tiny config files in favor of tm_defines
I'm planning to commit this unless there are objections. Unsurprisingly
it works just fine in a cross-compilation test. I think it qualifies
as obvious.
* config.gcc (*-*-freebsd*): Use tm_defines instead of tiny
config files which do the same thing.
* config/freebsd3.h, config/freebsd4.h, config/freebsd5.h,
config/freebsd6.h: Remove now unnecessary files.
Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.396
diff -u -r1.396 config.gcc
--- config.gcc 10 Oct 2003 17:37:24 -0000 1.396
+++ config.gcc 11 Oct 2003 21:56:56 -0000
@@ -370,11 +370,18 @@
gnu_ld=yes
extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
case ${target} in
- *-*-freebsd3 | *-*-freebsd[3].*) fbsd_tm_file="freebsd3.h";;
- *-*-freebsd4 | *-*-freebsd[4].*) fbsd_tm_file="freebsd4.h";;
- *-*-freebsd5 | *-*-freebsd[5].*) fbsd_tm_file="freebsd5.h";;
- *-*-freebsd6 | *-*-freebsd[6].*) fbsd_tm_file="freebsd6.h";;
- *) echo 'Please update *-*-freebsd* in gcc/config.gcc'; exit 1;;
+ *-*-freebsd3 | *-*-freebsd[3].*)
+ tm_defines="${tm_defines} FBSD_MAJOR=3" ;;
+ *-*-freebsd4 | *-*-freebsd[4].*)
+ tm_defines="${tm_defines} FBSD_MAJOR=4" ;;
+ *-*-freebsd5 | *-*-freebsd[5].*)
+ tm_defines="${tm_defines} FBSD_MAJOR=5" ;;
+ *-*-freebsd6 | *-*-freebsd[6].*)
+ tm_defines="${tm_defines} FBSD_MAJOR=6" ;;
+ *)
+ echo 'Please update *-*-freebsd* in gcc/config.gcc'
+ exit 1
+ ;;
esac
tmake_file="t-slibgcc-elf-ver t-freebsd"
case ${enable_threads} in
Index: config/freebsd3.h
===================================================================
RCS file: config/freebsd3.h
diff -N config/freebsd3.h
--- config/freebsd3.h 27 Sep 2003 04:48:11 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-/* FreeBSD version number setting for FreeBSD 3.x systems.
- Copyright (C) 2001 Free Software Foundation, Inc.
- Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
-
-#define FBSD_MAJOR 3
Index: config/freebsd4.h
===================================================================
RCS file: config/freebsd4.h
diff -N config/freebsd4.h
--- config/freebsd4.h 27 Sep 2003 04:48:11 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-/* FreeBSD version number setting for FreeBSD 4.x systems.
- Copyright (C) 2001 Free Software Foundation, Inc.
- Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
-
-#define FBSD_MAJOR 4
Index: config/freebsd5.h
===================================================================
RCS file: config/freebsd5.h
diff -N config/freebsd5.h
--- config/freebsd5.h 27 Sep 2003 04:48:11 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-/* FreeBSD version number setting for FreeBSD 5.x systems.
- Copyright (C) 2001 Free Software Foundation, Inc.
- Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
-
-#define FBSD_MAJOR 5
Index: config/freebsd6.h
===================================================================
RCS file: config/freebsd6.h
diff -N config/freebsd6.h
--- config/freebsd6.h 27 Sep 2003 04:48:11 -0000 1.2
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,22 +0,0 @@
-/* FreeBSD version number setting for FreeBSD 6.x systems.
- Copyright (C) 2001 Free Software Foundation, Inc.
- Contributed by David E. O'Brien <obrien@FreeBSD.org> and BSDi.
-
-This file is part of GCC.
-
-GCC is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2, or (at your option)
-any later version.
-
-GCC is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
-
-You should have received a copy of the GNU General Public License
-along with GCC; see the file COPYING. If not, write to
-the Free Software Foundation, 59 Temple Place - Suite 330,
-Boston, MA 02111-1307, USA. */
-
-#define FBSD_MAJOR 6
--
Nathanael Nerode <neroden at gcc.gnu.org>
http://home.twcny.rr.com/nerode/neroden/fdl.html