Re-enable the "gccgo" build target

Use a workaround from https://github.com/golang/go/issues/15628 for
issues with newer-style vendoring in gcc-go.

Travis's trusty images have gcc-go 4.9, which implements Go 1.2, so it's
missing sync.Pool (introduced in 1.3), so we can't enable the test
there.

Signed-off-by: Nalin Dahyabhai <nalin@redhat.com>
This commit is contained in:
Nalin Dahyabhai 2017-03-06 15:26:18 -05:00
parent 584b6828a3
commit e65bca53cb
3 changed files with 11 additions and 1 deletions

View File

@ -39,7 +39,7 @@ DEFAULT_BUNDLES=(
test-unit
#gccgo -- failing due to 1.7 incompatibilities
gccgo
cross
)

View File

@ -7,6 +7,7 @@ BINARY_FULLNAME="$BINARY_NAME$BINARY_EXTENSION"
source "${MAKEDIR}/.go-autogen"
export GCCGO=${SCRIPTDIR}/../vagrant/gccgo-wrapper.sh
# gccgo require explicit flag -pthread to allow goroutines to work.
go build -compiler=gccgo \
-o "$DEST/$BINARY_FULLNAME" \

9
vagrant/gccgo-wrapper.sh Executable file
View File

@ -0,0 +1,9 @@
#!/bin/bash
additional=
for arg in "$@" ; do
if test -d "$arg"/github.com/containers/storage ; then
additional="$additional -I $arg/github.com/containers/storage/vendor"
fi
done
echo gccgo $additional "$@" > /tmp/gccgo
gccgo $additional "$@"