aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog17
-rw-r--r--gcc/config.gcc76
-rw-r--r--gcc/config/freebsd-nthr.h22
-rw-r--r--gcc/config/freebsd3.h22
-rw-r--r--gcc/config/freebsd4.h22
-rw-r--r--gcc/config/freebsd5.h22
-rw-r--r--gcc/config/freebsd6.h22
7 files changed, 178 insertions, 25 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 5934076..919b3f4 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,6 +1,23 @@
2001-05-22 Loren J. Rittle <ljrittle@acm.org>
David O'Brien <obrien@freebsd.org>
+ * config.gcc (the unlabeled system switch statement): Add
+ generic configuration section to handle *-*-freebsd*. Also,
+ to match the system compiler, default to threading support (it
+ may be disabled with the standard --disable-threads
+ configuration-time switch).
+ (i[34567]86-*-freebsd* in machine-specific section): Use it.
+ (alpha*-*-freebsd* in machine-specific section): Likewise.
+
+ * config/freebsd3.h: New file to expose FBSD_MAJOR macro (3).
+ * config/freebsd4.h: New file to expose FBSD_MAJOR macro (4).
+ * config/freebsd5.h: New file to expose FBSD_MAJOR macro (5).
+ * config/freebsd6.h: New file to expose FBSD_MAJOR macro (6).
+ * config/freebsd-nthr.h: New file to expose FBSD_NO_THREADS macro.
+
+2001-05-22 Loren J. Rittle <ljrittle@acm.org>
+ David O'Brien <obrien@freebsd.org>
+
* config/t-freebsd (TARGET_LIBGCC2_CFLAGS): Add -fPIC.
* config/t-freebsd-thread (TARGET_LIBGCC2_CFLAGS): Add
-pthread instead setting macro.
diff --git a/gcc/config.gcc b/gcc/config.gcc
index f9ee01b..a86c45e 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -254,7 +254,7 @@ case $machine in
;;
esac
-# Common parts for GNU/Linux, GNU/Hurd and OpenBSD systems.
+# Common parts for GNU/Linux, GNU/Hurd, OpenBSD and FreeBSD systems.
case $machine in
*-*-linux*)
xm_defines=POSIX
@@ -293,6 +293,53 @@ case $machine in
tmake_file="${tmake_file} t-openbsd-thread"
fi
;;
+*-*-freebsd[12] | *-*-freebsd[12].* | *-*-freebsd*aout*)
+ # This is the place-holder for the generic a.out configuration
+ # of FreeBSD. No actual configuration resides here since
+ # there was only ever a bare-bones ix86 configuration for
+ # a.out and it exists solely in the machine-specific section.
+ # This place-holder must exist to avoid dropping into
+ # the generic ELF configuration of FreeBSD (i.e. it must be
+ # ordered before that section).
+ ;;
+*-*-freebsd*)
+ # This is the generic ELF configuration of FreeBSD. Later
+ # machine-specific sections may refine and add to this
+ # configuration.
+ #
+ # Due to tm_file entry ordering issues that vary between cpu
+ # architectures, we only define fbsd_tm_file to allow the
+ # machine-specific section to dictate the final order of all
+ # entries of tm_file with the minor exception that components
+ # of the tm_file set here will always be of the form:
+ #
+ # freebsd<version_number>.h [freebsd-<conf_option>.h ...] freebsd.h
+ #
+ # The machine-specific section should not tamper with this
+ # ordering but may order all other entries of tm_file as it
+ # pleases around the provided core setting.
+ gas=yes
+ gnu_ld=yes
+ extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
+ case $machine 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;;
+ esac
+ tmake_file=t-freebsd
+ xm_defines=POSIX
+ case x${enable_threads} in
+ xno) fbsd_tm_file="${fbsd_tm_file} freebsd-nthr.h";;
+ x | xyes | xpthreads | xposix)
+ thread_file='posix'
+ tmake_file="${tmake_file} t-freebsd-thread"
+ ;;
+ *) echo 'Unknown thread configuration for FreeBSD'; exit 1;;
+ esac
+ fbsd_tm_file="${fbsd_tm_file} freebsd.h"
+ ;;
esac
case $machine in
@@ -392,19 +439,9 @@ alpha*-*-linux*)
fi
;;
alpha*-*-freebsd*)
- xm_defines=POSIX
- tm_file="${tm_file} freebsd.h alpha/elf.h alpha/freebsd.h"
+ tm_file="${tm_file} ${fbsd_tm_file} alpha/elf.h alpha/freebsd.h"
target_cpu_default="MASK_GAS"
- tmake_file="t-freebsd alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
- extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o"
- gas=yes gnu_ld=yes
- stabs=yes
- case x${enable_threads} in
- xyes | xpthreads | xposix)
- thread_file='posix'
- tmake_file="${tmake_file} t-freebsd-thread"
- ;;
- esac
+ tmake_file="${tmake_file} alpha/t-crtbe alpha/t-alpha alpha/t-ieee"
;;
alpha*-*-netbsd*)
xm_defines=POSIX
@@ -1007,18 +1044,7 @@ i[34567]86-*-freebsd[12] | i[34567]86-*-freebsd[12].* | i[34567]86-*-freebsd*aou
tmake_file=t-freebsd
;;
i[34567]86-*-freebsd*)
- tm_file="i386/i386.h i386/att.h svr4.h freebsd.h i386/freebsd.h"
- extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
- tmake_file=t-freebsd
- gas=yes
- gnu_ld=yes
- stabs=yes
- case x${enable_threads} in
- xyes | xpthreads | xposix)
- thread_file='posix'
- tmake_file="${tmake_file} t-freebsd-thread"
- ;;
- esac
+ tm_file="${tm_file} i386/att.h svr4.h ${fbsd_tm_file} i386/freebsd.h"
;;
i[34567]86-*-netbsd*)
tm_file=i386/netbsd.h
diff --git a/gcc/config/freebsd-nthr.h b/gcc/config/freebsd-nthr.h
new file mode 100644
index 0000000..2f1d65f
--- /dev/null
+++ b/gcc/config/freebsd-nthr.h
@@ -0,0 +1,22 @@
+/* FreeBSD configuration setting for FreeBSD systems.
+ Copyright (C) 2001 Free Software Foundation, Inc.
+ Contributed by Loren J. Rittle <ljrittle@acm.org>
+
+This file is part of GNU CC.
+
+GNU CC 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.
+
+GNU CC 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 GNU CC; see the file COPYING. If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA. */
+
+#define FBSD_NO_THREADS
diff --git a/gcc/config/freebsd3.h b/gcc/config/freebsd3.h
new file mode 100644
index 0000000..7b5426f
--- /dev/null
+++ b/gcc/config/freebsd3.h
@@ -0,0 +1,22 @@
+/* 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 GNU CC.
+
+GNU CC 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.
+
+GNU CC 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 GNU CC; 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
diff --git a/gcc/config/freebsd4.h b/gcc/config/freebsd4.h
new file mode 100644
index 0000000..ec2ae47
--- /dev/null
+++ b/gcc/config/freebsd4.h
@@ -0,0 +1,22 @@
+/* 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 GNU CC.
+
+GNU CC 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.
+
+GNU CC 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 GNU CC; 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
diff --git a/gcc/config/freebsd5.h b/gcc/config/freebsd5.h
new file mode 100644
index 0000000..3c276d5
--- /dev/null
+++ b/gcc/config/freebsd5.h
@@ -0,0 +1,22 @@
+/* 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 GNU CC.
+
+GNU CC 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.
+
+GNU CC 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 GNU CC; 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
diff --git a/gcc/config/freebsd6.h b/gcc/config/freebsd6.h
new file mode 100644
index 0000000..38bc0cd
--- /dev/null
+++ b/gcc/config/freebsd6.h
@@ -0,0 +1,22 @@
+/* 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 GNU CC.
+
+GNU CC 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.
+
+GNU CC 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 GNU CC; 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