pkgsrc-Changes-HG archive

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

[pkgsrc/trunk]: pkgsrc/mk Do not pass -std=c++03 to GCC 4.4



details:   https://anonhg.NetBSD.org/pkgsrc/rev/61d509188031
branches:  trunk
changeset: 398288:61d509188031
user:      ryoon <ryoon%pkgsrc.org@localhost>
date:      Mon Jul 15 16:06:19 2019 +0000

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

No objection on tech-pkg@.

diffstat:

 mk/compiler.mk       |  11 ++++++-----
 mk/compiler/clang.mk |   6 +++++-
 mk/compiler/gcc.mk   |  10 +++++++++-
 3 files changed, 20 insertions(+), 7 deletions(-)

diffs (76 lines):

diff -r d52b47cd31e1 -r 61d509188031 mk/compiler.mk
--- a/mk/compiler.mk    Mon Jul 15 15:12:04 2019 +0000
+++ b/mk/compiler.mk    Mon Jul 15 16:06:19 2019 +0000
@@ -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
 .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 @@
 # 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 -r d52b47cd31e1 -r 61d509188031 mk/compiler/clang.mk
--- a/mk/compiler/clang.mk      Mon Jul 15 15:12:04 2019 +0000
+++ b/mk/compiler/clang.mk      Mon Jul 15 16:06:19 2019 +0000
@@ -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 @@
 _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 -r d52b47cd31e1 -r 61d509188031 mk/compiler/gcc.mk
--- a/mk/compiler/gcc.mk        Mon Jul 15 15:12:04 2019 +0000
+++ b/mk/compiler/gcc.mk        Mon Jul 15 16:06:19 2019 +0000
@@ -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 @@
 .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