This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: config.gcc patch for FreeBSD


In article <20061205234205.GA94979@crodrigues.org>,
Craig Rodrigues<rodrigc@crodrigues.org> writes:

> 	* 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.

Approved for mainline.

[an off-list e-mail thread spanning ~year --- removed.  Final comment:]
>> We are already at FreeBSD 8-CURRENT which is getting rather close
>> to 10, and I *am* getting bug reports about GCC 3.4 not building on
>> FreeBSD 8 which indicates a clear practical need and desire of
>> users to run older versions of GCC on new versions of FreeBSD.  If
>> we do not make this change now, for GCC 4.3 and GCC 4.2, possibly
>> even GCC 4.1, we will have users run into this with two years. :-(

> Index: config.gcc
> ===================================================================
> --- config.gcc	(revision 119495)
> +++ config.gcc	(working copy)
> @@ -417,26 +417,8 @@
>    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)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]