Closed
Description
This is a serious issue as clang is the default compiler of FreeBSD, and go 1.4 is needed to bootstrap Go 1.5+
The bug on FreeBSD bugtracker (include error logs and proposed patchs): https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=202662
Activity
minux commentedon Aug 26, 2015
bradfitz commentedon Aug 26, 2015
FreeBSD should feel free to silence any clang undefined behavior warnings from versions of clang that are newer than we ever built Go 1.4 with.
Because Go 1.5 is now out, and because Go 1.5 no longer contains any C code, we probably won't be making such changes upstream, nor in the Go 1.4 release branch (which we only use for critical problems).
If you'd like us to review any patches, please email golang-dev@ or ping this bug and somebody can take a look.
/cc @ianlancetaylor for the linker parts.
[-]Go 1.4 fails to compile with clang 3.7[/-][+]build: Go 1.4 fails to compile with clang 3.7[/+]bradfitz commentedon Aug 26, 2015
@minux, that is a fair point.
jlaffaye commentedon Aug 26, 2015
I could apply patches to Go source files in the FreeBSD port, but having fixes in upstream would avoid every package maintainer to maintain their own set of patches.
minux commentedon Aug 26, 2015
minux commentedon Aug 26, 2015
ianlancetaylor commentedon Aug 26, 2015
In general I agree with minux that we need to ensure that Go 1.4 builds at least well enough to build Go 1.5. I actually think that we might need to make new point release in some cases.
In this case, I think we should consider a patch for 1.4 that drops -Werror from the list of command line options. And I think that the FreeBSD build process should set CGO_ENABLED=0 when building Go 1.4. I think those two steps should fix the FreeBSD build.
minux commentedon Aug 26, 2015
rsc commentedon Aug 26, 2015
I don't believe that Go 1.4 needs to build anywhere except linux/amd64 and darwin/amd64 (just to take an extreme position). We did not backport linux/ppc64 to Go 1.4 just to make Go 1.5 build there. The requirement is "Go 1.4 or later". The or later is implemented nearly trivially by bootstrap.bash.
ianlancetaylor commentedon Aug 26, 2015
Building only on GNU/Linux and Darwin works for us but seems a little unfair to FreeBSD. In any case these particular issues are presumably going to arise on other platforms too as they move to newer versions of clang.
I'm only proposing one patch to 1.4 at this time: drop -Werror from cmd/dist/build.c.
@minux I agree that only a new source release is needed, if anything is needed.
21 remaining items