Configure fix and warning fix for Go

This commit is contained in:
William S Fulton 2015-03-14 23:40:30 +00:00
commit 7fa1058a8a
2 changed files with 59 additions and 55 deletions

View file

@ -6314,7 +6314,7 @@ private:
String *ct = Getattr(n, "emit:cgotype"); String *ct = Getattr(n, "emit:cgotype");
if (ct) { if (ct) {
*c_struct_type = (bool)Getattr(n, "emit:cgotypestruct"); *c_struct_type = Getattr(n, "emit:cgotypestruct") ? true : false;
return Copy(ct); return Copy(ct);
} }

View file

@ -2333,8 +2333,6 @@ else
GO="$GOBIN" GO="$GOBIN"
fi fi
AC_CHECK_PROGS(GCCGO, gccgo)
GOGCC=false GOGCC=false
GCCGO= GCCGO=
GO1=false GO1=false
@ -2345,6 +2343,7 @@ else
GCCGOOPT= GCCGOOPT=
GOVERSIONOPTION= GOVERSIONOPTION=
if test -n "$GO" ; then
GO1=true GO1=true
GOVERSIONOPTION=version GOVERSIONOPTION=version
GOC=$(sh -c "$(go env) && echo \$GOCHAR")c GOC=$(sh -c "$(go env) && echo \$GOCHAR")c
@ -2379,7 +2378,11 @@ else
GO15=true GO15=true
;; ;;
esac esac
fi
AC_CHECK_PROGS(GCCGO, gccgo)
if test -n "$GCCGO" ; then
if $GCCGO --help 2>/dev/null | grep gccgo >/dev/null 2>&1 ; then if $GCCGO --help 2>/dev/null | grep gccgo >/dev/null 2>&1 ; then
AC_MSG_CHECKING([whether gccgo version is too old]) AC_MSG_CHECKING([whether gccgo version is too old])
go_version=[`$GO $GOVERSIONOPTION | sed -n '1p' | sed -e 's/^.* \([0-9.]*\) *$/\1/' -e 's/[.]//g'`] go_version=[`$GO $GOVERSIONOPTION | sed -n '1p' | sed -e 's/^.* \([0-9.]*\) *$/\1/' -e 's/[.]//g'`]
@ -2404,6 +2407,7 @@ else
fi fi
fi fi
fi fi
fi
AC_SUBST(GOGCC) AC_SUBST(GOGCC)
AC_SUBST(GCCGO) AC_SUBST(GCCGO)