On Fri, Aug 02 2019, Brian Callahan <call...@rpi.edu> wrote: > Hi ports -- > > The latest sparc64 build shows that x11/gnome/gedit fails to build. See [0]. > This is because it is using base-gcc and the codebase uses C99 > constructs without using the -std=c99/gnu99 flags. Clang doesn't need > this because it defaults to C99. > > If we add the -std=c99 flag, then > base-gcc is happy and it's a no-op for clang.
gcc ang clang default to -std=gnu$something, that's what we should prefer to avoid hiding useful compiler and platform features. clang defaults to -std=gnu11 so your diff isn't a no-op. > Build tested only on amd64 by forcing CC=gcc. But it does build (and the > build works). > > OK? Not ok. I'd rather use COMPILER = base-clang ports-gcc in gnome projects because they tend to use the latest shiny stuff, including C11; and ports-gcc also defaults to -std=gnu11 since the update to gcc8. Maybe that's something that we should extend to all gnome ports, I see I have an M in gnome.port.mk but it needs to be tested first. So here's a simple diff below, does it fix your problem? If so, ok? cc'ing Antoine and Jasper (maintainers) > ~Brian > > [0] > http://build-failures.rhaalovely.net//sparc64/2019-08-01/x11/gnome/gedit.log Index: Makefile =================================================================== RCS file: /cvs/ports/x11/gnome/gedit/Makefile,v retrieving revision 1.163 diff -u -p -r1.163 Makefile --- Makefile 7 Jul 2019 11:20:52 -0000 1.163 +++ Makefile 3 Aug 2019 11:50:25 -0000 @@ -16,6 +16,9 @@ WANTLIB += gio-2.0 girepository-1.0 glib WANTLIB += gspell-1 gtk-3 gtksourceview-4 intl m pango-1.0 pangocairo-1.0 WANTLIB += peas-1.0 peas-gtk-1.0 pthread xml2 +COMPILER= base-clang ports-gcc +COMPILER_LANGS= c + MODULES= devel/dconf \ devel/meson \ lang/python \ -- jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE