pkgsrc-Users archive

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

(ham/xnec2c) wanted -std=gnu17'



Hi,

In
  http://www.ki.nu/pkgsrc/reports/current/NetBSD-9.0/20231227.2317/xnec2c-4.2.3/build.log
the line
  gcc: error: unrecognized command line option '-std=gnu17'; did you mean '-std=gnu11'?
is found.

To fix this problem, how about the following change ?
(probably separate commit, if OK)

Index: mk/compiler.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/compiler.mk,v
retrieving revision 1.108
diff -u -r1.108 compiler.mk
--- mk/compiler.mk	12 Dec 2023 16:28:45 -0000	1.108
+++ mk/compiler.mk	2 Jan 2024 11:43:38 -0000
@@ -78,7 +78,7 @@
 #	This is used to (optionally) install a newer compiler
 #	than provided by the system, or to skip building the package.
 #
-#	Valid values are: c11, c99, has_include.
+#	Valid values are: c11, c17, c99, has_include.
 #
 # USE_CXX_FEATURES
 #
Index: mk/compiler/gcc.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/compiler/gcc.mk,v
retrieving revision 1.267
diff -u -r1.267 gcc.mk
--- mk/compiler/gcc.mk	10 Nov 2023 11:52:27 -0000	1.267
+++ mk/compiler/gcc.mk	2 Jan 2024 11:43:38 -0000
@@ -209,6 +209,10 @@
 GCC_REQD+=	4.9
 .endif
 
+.if !empty(USE_CC_FEATURES:Mc17)
+GCC_REQD+=	9.0
+.endif
+
 .if !empty(USE_CXX_FEATURES:Munique_ptr)
 GCC_REQD+=	4.9
 .endif
Index: ham/xnec2c/Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/ham/xnec2c/Makefile,v
retrieving revision 1.36
diff -u -r1.36 Makefile
--- ham/xnec2c/Makefile	18 Dec 2023 14:19:35 -0000	1.36
+++ ham/xnec2c/Makefile	2 Jan 2024 11:43:38 -0000
@@ -24,6 +24,8 @@
 #ld: /tmp/ham/xnec2c/work/xnec2c-4.2.1/src/optimize.c:132: undefined reference to `inotify_add_watch'
 CFLAGS+=		-linotify -L${PREFIX}/lib
 
+USE_CC_FEATURES+=	c17
+
 post-install:
 	cd ${WRKSRC}/doc && ${PAX} -pp -rw * ${DESTDIR}${PREFIX}/share/doc/xnec2c
 


Home | Main Index | Thread Index | Old Index