This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Add support for FreeBSD 7 (and above)
On Thu, 14 Jul 2005, Loren James Rittle wrote:
> Reject. At the very least, you must update gcc/config/freebsd-spec.h
> to handle each new major version.
Does the following look better? I could only test on FreeBSD 4 for now,
and testing on FreeBSD 7 won't be able for me to do for quite some time,
but the ports currently fail on the FreeBSD build cluster and the gcc34
(and later) ports have quite some ports depending on them.
> As major versions come at most once/few years, please handle only
> *-*-freebsd7 in this patch.
The FreeBSD project changed it's schedule to shoot for more or less
one major release per year -- thus FreeBSD 6 later this summer, and
the corresponding creation of (and GCC breakage on) FreeBSD 7.
With FreeBSD 8 due next summer and the usual lifetimes of older
versions of GCC, I'd consider two releases, that is, two years,
ahead of time desirable.
If you still prefer to only add support for FreeBSD 7, I'll change the
patch accordingly, though I see me adding local patches next year when
FreeBSD 8 is branched and GCC 3.4 CVS already closed, as is currently
the case with GCC 3.3.
Gerald
2005-07-15 Gerald Pfeifer <gerald@pfeifer.com>
* config.gcc: Add support for *-*-freebsd7, *-*-freebsd8,
and *-*-freebsd9.
* config/freebsd-spec.h (FBSD_TARGET_OS_CPP_BUILTINS): Ditto.
Index: config.gcc
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config.gcc,v
retrieving revision 1.554
diff -u -3 -p -r1.554 config.gcc
--- config.gcc 13 Jul 2005 18:15:37 -0000 1.554
+++ config.gcc 14 Jul 2005 22:48:46 -0000
@@ -405,6 +405,12 @@ case ${target} in
tm_defines="${tm_defines} FBSD_MAJOR=5" ;;
*-*-freebsd6 | *-*-freebsd[6].*)
tm_defines="${tm_defines} FBSD_MAJOR=6" ;;
+ *-*-freebsd7 | *-*-freebsd[7].*)
+ tm_defines="${tm_defines} FBSD_MAJOR=7" ;;
+ *-*-freebsd8 | *-*-freebsd[8].*)
+ tm_defines="${tm_defines} FBSD_MAJOR=8" ;;
+ *-*-freebsd9 | *-*-freebsd[9].*)
+ tm_defines="${tm_defines} FBSD_MAJOR=9" ;;
*)
echo 'Please update *-*-freebsd* in gcc/config.gcc'
exit 1
Index: config/freebsd-spec.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/freebsd-spec.h,v
retrieving revision 1.15
diff -u -3 -p -r1.15 freebsd-spec.h
--- config/freebsd-spec.h 25 Jun 2005 01:20:44 -0000 1.15
+++ config/freebsd-spec.h 14 Jul 2005 22:48:46 -0000
@@ -51,7 +51,13 @@ Boston, MA 02110-1301, USA. */
#define FBSD_TARGET_OS_CPP_BUILTINS() \
do \
{ \
- if (FBSD_MAJOR == 6) \
+ if (FBSD_MAJOR == 9) \
+ builtin_define ("__FreeBSD__=9"); \
+ else if (FBSD_MAJOR == 8) \
+ builtin_define ("__FreeBSD__=8"); \
+ if (FBSD_MAJOR == 7) \
+ builtin_define ("__FreeBSD__=7"); \
+ else if (FBSD_MAJOR == 6) \
builtin_define ("__FreeBSD__=6"); \
else if (FBSD_MAJOR == 5) \
builtin_define ("__FreeBSD__=5"); \