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]

Fix build on FreeBSD 8 and prepare for FreeBSD 10 and 11


FreeBSD 8 was branched a few weeks ago which triggered a bug in
GCC 4.1, as fixed by Hirohisa-San.

This also made me notice that we will like run into problems in
about two years when FreeBSD 10 is expected to branch and older
versions of GCC will still be in use (and, yes, this is the case
and I am getting bug reports for GCC 3.4 and even older versions
still).  So, I made the obvious set of changes for that as well.

Both committed as obvious with the plan to sneak Monday's snapshot
of the GCC 4.1 branch into both FreeBSD 6.3 and 7.0 still.

Gerald


2007-11-04  Hirohisa Yamaguchi  <umq@ueo.co.jp>

	* config/freebsd-spec.h (FBSD_TARGET_OS_CPP_BUILTINS): Fix
	broken else-if chain.

2007-11-04  Gerald Pfeifer  <gerald@pfeifer.com>

	* config.gcc: Proactively add FreeBSD 10 and FreeBSD 11.
	* config/freebsd-spec.h (FBSD_TARGET_OS_CPP_BUILTINS): Ditto.

Index: config/freebsd-spec.h
===================================================================
--- config/freebsd-spec.h	(revision 129886)
+++ config/freebsd-spec.h	(working copy)
@@ -51,11 +51,15 @@
 #define FBSD_TARGET_OS_CPP_BUILTINS()					\
   do									\
     {									\
-	if (FBSD_MAJOR == 9)						\
-	  builtin_define ("__FreeBSD__=9");			       	\
+	if (FBSD_MAJOR == 11)						\
+	  builtin_define ("__FreeBSD__=11");				\
+	else if (FBSD_MAJOR == 10)					\
+	  builtin_define ("__FreeBSD__=10");				\
+	else if (FBSD_MAJOR == 9)					\
+	  builtin_define ("__FreeBSD__=9");				\
 	else if (FBSD_MAJOR == 8)					\
 	  builtin_define ("__FreeBSD__=8");			       	\
-	if (FBSD_MAJOR == 7)						\
+	else if (FBSD_MAJOR == 7)                                       \
 	  builtin_define ("__FreeBSD__=7");			       	\
 	else if (FBSD_MAJOR == 6)					\
 	  builtin_define ("__FreeBSD__=6");			       	\
Index: config.gcc
===================================================================
--- config.gcc	(revision 129886)
+++ config.gcc	(working copy)
@@ -412,6 +412,10 @@
       tm_defines="${tm_defines} FBSD_MAJOR=8" ;;
     *-*-freebsd9 | *-*-freebsd[9].*)
       tm_defines="${tm_defines} FBSD_MAJOR=9" ;;
+    *-*-freebsd10 | *-*-freebsd10.*)
+      tm_defines="${tm_defines} FBSD_MAJOR=10" ;;
+    *-*-freebsd11 | *-*-freebsd11.*)
+      tm_defines="${tm_defines} FBSD_MAJOR=11" ;;
     *)
       echo 'Please update *-*-freebsd* in gcc/config.gcc'
       exit 1


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