Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: README: gcc 7 switch coming to a port near you!



On Thu, Feb 07, 2019 at 11:10:30AM -0600, John D. Baker wrote:
> [...]
> --- cleandir-external ---
> --- cleandir-lib ---
> cleandir ===> external/bsd/pkg_install/lib
> [...]
> --- cleandir-external ---
> nbmake[7]: "/x/current/src/external/bsd/pkg_install/lib/../Makefile.inc" line 16: Malformed conditional (defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc")
> [...]

Try the attached version.

Joerg
Index: Makefile.inc
===================================================================
RCS file: /cvsroot/src/external/bsd/pkg_install/Makefile.inc,v
retrieving revision 1.5
diff -u -p -r1.5 Makefile.inc
--- Makefile.inc	5 Feb 2019 11:37:18 -0000	1.5
+++ Makefile.inc	7 Feb 2019 22:15:06 -0000
@@ -13,7 +13,7 @@ WARNS=	4
 CWARNFLAGS+=	-Wno-missing-noreturn
 
 # show_version() does not return
-.if defined(HAVE_GCC) && ${HAVE_GCC} == 7 && ${ACTIVE_CC} == "gcc"
-COPTS.main.c+=		-Wno-error=implicit-fallthrough
-COPTS.pkg_delete.c+=	-Wno-error=implicit-fallthrough
+.if ${HAVE_GCC:U0} == 7
+COPTS.main.c+=		${${ACTIVE_CC} == "gcc" :? -Wno-error=implicit-fallthrough :}
+COPTS.pkg_delete.c+=	${${ACTIVE_CC} == "gcc" :? -Wno-error=implicit-fallthrough :}
 .endif


Home | Main Index | Thread Index | Old Index