diff options
author | ryoon <ryoon@pkgsrc.org> | 2019-07-15 16:06:19 +0000 |
---|---|---|
committer | ryoon <ryoon@pkgsrc.org> | 2019-07-15 16:06:19 +0000 |
commit | daf9482c0e81c5ba7c70d22345033ff2105127ad (patch) | |
tree | 750b46e2083fc6c4548ef6865bd33dff650c7076 /mk | |
parent | 2fcfdecc5c312f7379891d04267a3597de8c6454 (diff) | |
download | pkgsrc-daf9482c0e81c5ba7c70d22345033ff2105127ad.tar.gz |
Do not pass -std=c++03 to GCC 4.4
No objection on tech-pkg@.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/compiler.mk | 11 | ||||
-rw-r--r-- | mk/compiler/clang.mk | 6 | ||||
-rw-r--r-- | mk/compiler/gcc.mk | 10 |
3 files changed, 20 insertions, 7 deletions
diff --git a/mk/compiler.mk b/mk/compiler.mk index b90620be121..9b726b2c561 100644 --- a/mk/compiler.mk +++ b/mk/compiler.mk @@ -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_asdf_*:S/^_asdf_//:T} ${${_var_}:C/^/_asdf_ # 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 diff --git a/mk/compiler/clang.mk b/mk/compiler/clang.mk index bc298ee8e73..9322a2b767d 100644 --- a/mk/compiler/clang.mk +++ b/mk/compiler/clang.mk @@ -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 diff --git a/mk/compiler/gcc.mk b/mk/compiler/gcc.mk index ea5954f6b9b..39b0cee6e9b 100644 --- a/mk/compiler/gcc.mk +++ b/mk/compiler/gcc.mk @@ -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} |