pkgsrc-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: pkgsrc/mk/compiler
Module Name: pkgsrc
Committed By: nia
Date: Tue Mar 19 23:22:50 UTC 2024
Modified Files:
pkgsrc/mk/compiler: gcc.mk
Log Message:
mk: More BUILDLINK_TRANSFORMs to make software work with old versions
There is an existing rule that translates c++03 to c++0x for old
versions of GCC - this is iffy, GCC treats c++0x as an alias for c++11.
Rewrite c++03 to c++98 for older compilers instead.
To generate a diff of this commit:
cvs rdiff -u -r1.274 -r1.275 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/gcc.mk
diff -u pkgsrc/mk/compiler/gcc.mk:1.274 pkgsrc/mk/compiler/gcc.mk:1.275
--- pkgsrc/mk/compiler/gcc.mk:1.274 Fri Mar 8 12:45:50 2024
+++ pkgsrc/mk/compiler/gcc.mk Tue Mar 19 23:22:50 2024
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.274 2024/03/08 12:45:50 wiz Exp $
+# $NetBSD: gcc.mk,v 1.275 2024/03/19 23:22:50 nia Exp $
#
# This is the compiler definition for the GNU Compiler Collection.
#
@@ -364,6 +364,12 @@ _GCC_PKG= gcc-${_GCC_VERSION:C/-.*$//}
#
# Note that pkgsrc also sets this flag itself for Darwin+clang.
BUILDLINK_TRANSFORM+= rm:-Wno-error=implicit-function-declaration
+BUILDLINK_TRANSFORM+= rm:-Wno-error=sign-conversion
+.endif
+
+.if !empty(_GCC_VERSION:M[23].*) || !empty(_GCC_VERSION:M4.[01234].*)
+# Added in GCC 4.5
+BUILDLINK_TRANSFORM+= rm:-Wno-unused-result
.endif
.if !empty(_GCC_VERSION:M[23].*) || !empty(_GCC_VERSION:M4.[012].*)
@@ -377,6 +383,18 @@ BUILDLINK_TRANSFORM+= rm:-Wc++-compat
BUILDLINK_TRANSFORM+= rm:-Wno-c++-compat
.endif
+.if !empty(_GCC_VERSION:M[23456].*)
+# Added in GCC 7
+BUILDLINK_TRANSFORM+= rm:-Wimplicit-fallthrough
+BUILDLINK_TRANSFORM+= rm:-Wno-implicit-fallthrough
+.endif
+
+.if !empty(_GCC_VERSION:M3.*) || !empty(_GCC_VERSION:M4.[0-7].*)
+# Added in GCC 4.8
+BUILDLINK_TRANSFORM+= opt:-std=c++03:-std=c++98
+BUILDLINK_TRANSFORM+= opt:-std=gnu++03:-std=gnu++98
+.endif
+
.if !empty(_GCC_VERSION:M[23].*) || !empty(_GCC_VERSION:M4.[0-8].*)
COMPILER_HAS_C11?= no
.else
@@ -393,10 +411,6 @@ _C_STD_FLAG.c99= -std=gnu99
.for _version_ in ${_CXX_STD_VERSIONS}
_CXX_STD_FLAG.${_version_}?= -std=${_version_}
.endfor
-.if !empty(_GCC_VERSION:M[34].[1234].*)
-_CXX_STD_FLAG.c++03= -std=c++0x
-_CXX_STD_FLAG.gnu++03= -std=gnu++0x
-.endif
.if !empty(_CC:M${TOOLBASE}/*)
_IS_BUILTIN_GCC= NO
Home |
Main Index |
Thread Index |
Old Index