From: Loren J. Rittle Date: Tue, 22 May 2001 19:23:33 +0000 (+0000) Subject: config.gcc (the unlabeled system switch statement): Add generic configuration section... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=9e405fe52ee14ad3cdcfe1e535225c384436398e;p=gcc.git config.gcc (the unlabeled system switch statement): Add generic configuration section to handle *-*-freebsd*. * 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 From-SVN: r42463 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5934076ee0b..919b3f4f3de 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2001-05-22 Loren J. Rittle + David O'Brien + + * 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 David O'Brien diff --git a/gcc/config.gcc b/gcc/config.gcc index f9ee01b8492..a86c45ee10c 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.h [freebsd-.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 00000000000..2f1d65f4b24 --- /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 + +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 00000000000..7b5426f9336 --- /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 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 00000000000..ec2ae4752bb --- /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 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 00000000000..3c276d50d7a --- /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 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 00000000000..38bc0cdbb23 --- /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 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