diff options
author | Craig Rodrigues <rodrigc@gcc.gnu.org> | 2007-10-23 23:53:31 +0000 |
---|---|---|
committer | Craig Rodrigues <rodrigc@gcc.gnu.org> | 2007-10-23 23:53:31 +0000 |
commit | b2449d40f07a49880e435c3645487ceb3e9566db (patch) | |
tree | fc804b5df118f4013a957d73c03f744ffbcb0bce /gcc/config.gcc | |
parent | 881ef7be466c6ff0a88bd2a7be3bb91008388795 (diff) | |
download | gcc-b2449d40f07a49880e435c3645487ceb3e9566db.zip gcc-b2449d40f07a49880e435c3645487ceb3e9566db.tar.gz gcc-b2449d40f07a49880e435c3645487ceb3e9566db.tar.bz2 |
config.gcc: For a FreeBSD target...
* config.gcc: For a FreeBSD target, parse the value of ${target}
to determine the value of FBSD_MAJOR, instead of adding an
explicit check for every possible FreeBSD major version.
From-SVN: r129590
Diffstat (limited to 'gcc/config.gcc')
-rw-r--r-- | gcc/config.gcc | 22 |
1 files changed, 2 insertions, 20 deletions
diff --git a/gcc/config.gcc b/gcc/config.gcc index 2195b51..3c23c25 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -430,26 +430,8 @@ case ${target} in gas=yes gnu_ld=yes extra_parts="crtbegin.o crtend.o crtbeginS.o crtendS.o" - case ${target} in - *-*-freebsd3 | *-*-freebsd[3].*) - tm_defines="${tm_defines} FBSD_MAJOR=3" ;; - *-*-freebsd4 | *-*-freebsd[4].*) - tm_defines="${tm_defines} FBSD_MAJOR=4" ;; - *-*-freebsd5 | *-*-freebsd[5].*) - tm_defines="${tm_defines} FBSD_MAJOR=5" ;; - *-*-freebsd6 | *-*-freebsd[6].*) - tm_defines="${tm_defines} FBSD_MAJOR=6" ;; - *-*-freebsd7 | *-*-freebsd[7].*) - tm_defines="${tm_defines} FBSD_MAJOR=7" ;; - *-*-freebsd8 | *-*-freebsd[8].*) - tm_defines="${tm_defines} FBSD_MAJOR=8" ;; - *-*-freebsd9 | *-*-freebsd[9].*) - tm_defines="${tm_defines} FBSD_MAJOR=9" ;; - *) - echo 'Please update *-*-freebsd* in gcc/config.gcc' - exit 1 - ;; - esac + fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'` + tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}" tmake_file="t-slibgcc-elf-ver t-freebsd" case ${enable_threads} in no) |