pkgsrc-Changes archive

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

CVS commit: pkgsrc/mk



Module Name:    pkgsrc
Committed By:   ryoon
Date:           Mon Jul 15 16:06:19 UTC 2019

Modified Files:
        pkgsrc/mk: compiler.mk
        pkgsrc/mk/compiler: clang.mk gcc.mk

Log Message:
Do not pass -std=c++03 to GCC 4.4

No objection on tech-pkg@.


To generate a diff of this commit:
cvs rdiff -u -r1.92 -r1.93 pkgsrc/mk/compiler.mk
cvs rdiff -u -r1.20 -r1.21 pkgsrc/mk/compiler/clang.mk
cvs rdiff -u -r1.200 -r1.201 pkgsrc/mk/compiler/gcc.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/mk/compiler.mk
diff -u pkgsrc/mk/compiler.mk:1.92 pkgsrc/mk/compiler.mk:1.93
--- pkgsrc/mk/compiler.mk:1.92  Wed Jun 26 00:22:56 2019
+++ pkgsrc/mk/compiler.mk       Mon Jul 15 16:06:19 2019
@@ -1,4 +1,4 @@
-# $NetBSD: compiler.mk,v 1.92 2019/06/26 00:22:56 ryoon Exp $
+# $NetBSD: compiler.mk,v 1.93 2019/07/15 16:06:19 ryoon Exp $
 #
 # This Makefile fragment implements handling for supported C/C++/Fortran
 # compilers.
@@ -83,7 +83,8 @@ USE_LANGUAGES?=       c
 USE_LANGUAGES+=        c
 .endif
 
-.for _version_ in gnu++14 c++14 gnu++11 c++11 gnu++0x c++0x gnu++03 c++03
+_CXX_STD_VERSIONS=     gnu++14 c++14 gnu++11 c++11 gnu++0x c++0x gnu++03 c++03
+.for _version_ in ${_CXX_STD_VERSIONS}
 .  if !empty(USE_LANGUAGES:M${_version_})
 USE_LANGUAGES+=                c++
 .  endif
@@ -177,11 +178,11 @@ ${_var_}:=        ${${_var_}:C/^/_asdf_/1:M_asd
 # the respective mk/compiler/*.mk files.
 #
 _CXX_VERSION_REQD=
-.for _version_ in gnu++14 c++14 gnu++11 c++11 gnu++0x c++0x gnu++03 c++03
+.for _version_ in ${_CXX_STD_VERSIONS}
 .  if empty(_CXX_VERSION_REQD) && !empty(USE_LANGUAGES:M${_version_})
 _CXX_VERSION_REQD=     ${_version_}
-_WRAP_EXTRA_ARGS.CXX+= -std=${_CXX_VERSION_REQD}
-CWRAPPERS_PREPEND.cxx+=        -std=${_CXX_VERSION_REQD}
+_WRAP_EXTRA_ARGS.CXX+= ${_CXX_STD_FLAG.${_CXX_VERSION_REQD}}
+CWRAPPERS_PREPEND.cxx+=        ${_CXX_STD_FLAG.${_CXX_VERSION_REQD}}
 .  endif
 .endfor
 

Index: pkgsrc/mk/compiler/clang.mk
diff -u pkgsrc/mk/compiler/clang.mk:1.20 pkgsrc/mk/compiler/clang.mk:1.21
--- pkgsrc/mk/compiler/clang.mk:1.20    Wed Jan  9 13:19:03 2019
+++ pkgsrc/mk/compiler/clang.mk Mon Jul 15 16:06:19 2019
@@ -1,4 +1,4 @@
-# $NetBSD: clang.mk,v 1.20 2019/01/09 13:19:03 wiz Exp $
+# $NetBSD: clang.mk,v 1.21 2019/07/15 16:06:19 ryoon Exp $
 #
 # This is the compiler definition for the clang compiler.
 #
@@ -95,4 +95,8 @@ CWRAPPERS_APPEND.cc+= -Qunused-arguments
 _WRAP_EXTRA_ARGS.CXX+= -Qunused-arguments
 CWRAPPERS_APPEND.cxx+= -Qunused-arguments
 
+.for _version_ in ${_CXX_STD_VERSIONS}
+_CXX_STD_FLAG.${_version_}?=   -std=${_version_}
+.endfor
+
 .endif # COMPILER_CLANG_MK

Index: pkgsrc/mk/compiler/gcc.mk
diff -u pkgsrc/mk/compiler/gcc.mk:1.200 pkgsrc/mk/compiler/gcc.mk:1.201
--- pkgsrc/mk/compiler/gcc.mk:1.200     Tue Jul  9 15:46:02 2019
+++ pkgsrc/mk/compiler/gcc.mk   Mon Jul 15 16:06:19 2019
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.200 2019/07/09 15:46:02 riastradh Exp $
+# $NetBSD: gcc.mk,v 1.201 2019/07/15 16:06:19 ryoon Exp $
 #
 # This is the compiler definition for the GNU Compiler Collection.
 #
@@ -189,6 +189,14 @@ _GCC_VERSION=      0
 .endif
 _GCC_PKG=      gcc-${_GCC_VERSION:C/-.*$//}
 
+.for _version_ in ${_CXX_STD_VERSIONS}
+_CXX_STD_FLAG.${_version_}?=   -std=${_version_}
+.  if !empty(_GCC_VERSION:M[34].[1234].*)
+_CXX_STD_FLAG.c++03=   -std=c++0x
+_CXX_STD_FLAG.gnu++03= -std=gnu++0x
+.  endif
+.endfor
+
 .if !empty(_CC:M${LOCALBASE}/*)
 _IS_BUILTIN_GCC=       NO
 GCC_REQD+=             ${_GCC_VERSION}



Home | Main Index | Thread Index | Old Index