/bin/sh ./libtool --tag=CC --mode=compile /var/tmp/paludis/sys-devel-gcc-4.7.1/work/build/./gcc/xgcc -B/var/tmp/paludis/sys-devel-gcc-4.7.1/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo -I /var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/runtime -I/var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/../libffi/include -I../libffi/include -pthread -fexceptions -fplan9-extensions -fsplit-stack -Wall -Wextra -Wwrite-strings -Wcast-qual -Werror -minline-all-stringops -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I /var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/../libgcc -I ../../gcc/include -g -mtune=native -O2 -pipe -O2 -MT runtime.lo -MD -MP -MF .deps/runtime.Tpo -c -o runtime.lo `test -f 'runtime/runtime.c' || echo '/var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/'`runtime/runtime.c libtool: compile: /var/tmp/paludis/sys-devel-gcc-4.7.1/work/build/./gcc/xgcc -B/var/tmp/paludis/sys-devel-gcc-4.7.1/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo -I /var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/runtime -I/var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/../libffi/include -I../libffi/include -pthread -fexceptions -fplan9-extensions -fsplit-stack -Wall -Wextra -Wwrite-strings -Wcast-qual -Werror -minline-all-stringops -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I /var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/../libgcc -I ../../gcc/include -g -mtune=native -O2 -pipe -O2 -MT msize.lo -MD -MP -MF .deps/msize.Tpo -c /var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/runtime/msize.c -o msize.o >/dev/null 2>&1 yes /var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/runtime/print.c: In function 'gwrite': /var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/runtime/print.c:20:3: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result] cc1: all warnings being treated as errors make[4]: *** [print.lo] Error 1
I guess go ignores --disable-werror.
wouldn't be the first time :/ see bug 229059 for similar issue. should be easy to get upstream to fix though.
Upstream bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53679 I am using the patch attached to that bug and it works.
Created attachment 316203 [details, diff] Patch from the upstream bug This patch does not remove the strict -Werror enforcement, but adds dummy code to work around the specific warning.
should be all set now in the tree; thanks for the report! i queued this for all 4.6/4.7 versions, and pushed out for 4.6.3 and 4.7.1 Commit message: Drop -Werror while building go http://sources.gentoo.org/gentoo/src/patchsets/gcc/4.7.1/gentoo/16_all_libgo-Werror-pr53679.patch?rev=1.1 http://sources.gentoo.org/sys-devel/gcc/gcc-4.6.3.ebuild?r1=1.10&r2=1.11 http://sources.gentoo.org/sys-devel/gcc/gcc-4.7.1.ebuild?r1=1.2&r2=1.3
Works like a charm here, thank you.