Created attachment 444446 [details] emerge --info After having upgraded to gcc-6.2.0 I can't build x11-libs/wxGTK-2.8.12.1-r2 anymore. Error snippet: > In file included from /var/tmp/portage/x11-libs/wxGTK-2.8.12.1-r2/work/wxPython-src-2.8.12.1/src/gtk/dcclient.cpp:46:0: > /var/tmp/portage/x11-libs/wxGTK-2.8.12.1-r2/work/wxPython-src-2.8.12.1/src/gtk/bdiag.xbm: At global scope: > /var/tmp/portage/x11-libs/wxGTK-2.8.12.1-r2/work/wxPython-src-2.8.12.1/src/gtk/bdiag.xbm:6:50: error: narrowing conversion of '128' from 'int' to 'char' inside { } [-Wnarrowing] > 0x08, 0x08, 0x04, 0x04, 0x02, 0x02, 0x01, 0x01}; > ^ I can build wxGTK just fine with gcc-5.4.0. ------------- # emerge -pv =x11-libs/wxGTK-2.8.12.1-r2 These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ] x11-libs/wxGTK-2.8.12.1-r2:2.8::gentoo USE="X gnome gstreamer opengl sdl tiff (-aqua) -debug -doc -odbc -pch" ABI_X86="(64) -32 (-x32)" 0 KiB Total: 1 package (1 reinstall), Size of downloads: 0 KiB
Created attachment 444448 [details] build log for wxGTK-2.8.12.1-r2 using gcc-6.2.0
Unlike wxGTK-3, this is solved for me by global "-w". I add to make.conf: CXXFLAGS="$CXXFLAGS -fpermissive -fno-strict-aliasing -w" PS Global "-w" for CFLAGS mostly good, but some random packages builds broken.
Created attachment 444672 [details, diff] wxGTK-2.8.12.1-r2-gcc6.patch
Soap found https://github.com/wxWidgets/wxWidgets/commit/1780a38b7bc9a9c04d33775a3176fe8516465f50 done to 3.0, which does some churn to .cpp too, as gdk-pixbuf is taking a gchar (and it's C and doesn't care of this signedness really) and would instead warn there if the proper fix of converting to unsigned char or uint8_t is used. So I think given this is old 2.8, backporting upstream patch would change some of the .cpp too, and many other places have received just a cast to char as well, this char casting is ACK for 2.8.
commit b98cf3b8e69fc19e26600992a236e99d175da5dc Author: David Seifert <soap@gentoo.org> Date: Fri Sep 16 23:48:11 2016 +0200 x11-libs/wxGTK: Allow for compiling with GCC 6 Gentoo-bug: 592442 * Patch by Francesco Turco