summaryrefslogtreecommitdiff
path: root/gcc/config.gcc
diff options
context:
space:
mode:
authorLoren J. Rittle <ljrittle@acm.org>2001-05-22 19:23:33 +0000
committerLoren J. Rittle <ljrittle@gcc.gnu.org>2001-05-22 19:23:33 +0000
commit9e405fe52ee14ad3cdcfe1e535225c384436398e (patch)
tree90a262a3c4592147d39cad218defbbf896d0022a /gcc/config.gcc
parent28b6b31799b98a58f7407a3135c506f63b3a0df3 (diff)
downloadgcc-9e405fe52ee14ad3cdcfe1e535225c384436398e.tar.gz
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 <obrien@freebsd.org> From-SVN: r42463
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r--gcc/config.gcc76
1 files changed, 51 insertions, 25 deletions
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<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