https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65535
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target|powerpc64-freebsd |*-*-freebsd
--- Comment #4 from Martin Sebor <msebor at gcc dot gnu.org> ---
This isn't powerpc64 specific. I didn't specify a FreeBSD version when
configuring gcc (i.e., I set --target=powerpc64-freebsd) assuming configure
would default to some supported version. The code in gcc/config.gcc then
results in FBSD_MAJOR being defined but empty. The patch below lets me build
stage1 (I don't have a FreeBSD sysroot to do a full bootstrap):
index cb08a5c..c668738 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -664,7 +664,7 @@ case ${target} in
gas=yes
gnu_ld=yes
fbsd_major=`echo ${target} | sed -e 's/.*freebsd//g' | sed -e 's/\..*//g'`
- tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major}"
+ tm_defines="${tm_defines} FBSD_MAJOR=${fbsd_major:-3}"
tmake_file="t-slibgcc"
case ${enable_threads} in
no)
If supplying a default version doesn't seem like a good idea another option
might be to fail early, during the configure step.