]> gcc.gnu.org Git - gcc.git/commitdiff
config.gcc (the unlabeled system switch statement): Add generic configuration section...
authorLoren J. Rittle <ljrittle@acm.org>
Tue, 22 May 2001 19:23:33 +0000 (19:23 +0000)
committerLoren J. Rittle <ljrittle@gcc.gnu.org>
Tue, 22 May 2001 19:23:33 +0000 (19:23 +0000)
* 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.

Co-Authored-By: David O'Brien <obrien@freebsd.org>
From-SVN: r42463

gcc/ChangeLog
gcc/config.gcc
gcc/config/freebsd-nthr.h [new file with mode: 0644]
gcc/config/freebsd3.h [new file with mode: 0644]
gcc/config/freebsd4.h [new file with mode: 0644]
gcc/config/freebsd5.h [new file with mode: 0644]
gcc/config/freebsd6.h [new file with mode: 0644]

index 5934076ee0b3e1063e9cfffbc3203b5920003ed9..919b3f4f3de13cbfb0312995fd0ecd224a13417c 100644 (file)
@@ -1,3 +1,20 @@
+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>
 
index f9ee01b84929e5a220ef04a198c965e90924d409..a86c45ee10c606b467de7f26353523b1f85c802e 100644 (file)
@@ -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 (file)
index 0000000..2f1d65f
--- /dev/null
@@ -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 (file)
index 0000000..7b5426f
--- /dev/null
@@ -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 (file)
index 0000000..ec2ae47
--- /dev/null
@@ -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 (file)
index 0000000..3c276d5
--- /dev/null
@@ -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 (file)
index 0000000..38bc0cd
--- /dev/null
@@ -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
This page took 0.085703 seconds and 5 git commands to generate.