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:   nia
Date:           Thu Nov  9 08:47:42 UTC 2023

Modified Files:
        pkgsrc/mk/compiler: gcc.mk
        pkgsrc/mk/platform: Darwin.mk

Log Message:
mk: More build aids for Darwin/powerpc.


To generate a diff of this commit:
cvs rdiff -u -r1.265 -r1.266 pkgsrc/mk/compiler/gcc.mk
cvs rdiff -u -r1.132 -r1.133 pkgsrc/mk/platform/Darwin.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.265 pkgsrc/mk/compiler/gcc.mk:1.266
--- pkgsrc/mk/compiler/gcc.mk:1.265     Tue Nov  7 11:36:57 2023
+++ pkgsrc/mk/compiler/gcc.mk   Thu Nov  9 08:47:42 2023
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.265 2023/11/07 11:36:57 nia Exp $
+# $NetBSD: gcc.mk,v 1.266 2023/11/09 08:47:42 nia Exp $
 #
 # This is the compiler definition for the GNU Compiler Collection.
 #
@@ -325,7 +325,7 @@ _GCC_VERSION=       0
 .endif
 _GCC_PKG=      gcc-${_GCC_VERSION:C/-.*$//}
 
-.if !empty(_GCC_VERSION:M[23]\..*) || !empty(_GCC_VERSION:M4.[01]\..*)
+.if !empty(_GCC_VERSION:M[23]..*) || !empty(_GCC_VERSION:M4.[01].*)
 # A lot of packages attempt to do this as a workaround for a
 # well-intentioned default in XCode 12+, but it's a common cause of
 # build failures on old versions of Darwin which use gcc and don't
@@ -335,7 +335,17 @@ _GCC_PKG=  gcc-${_GCC_VERSION:C/-.*$//}
 BUILDLINK_TRANSFORM+=  rm:-Wno-error=implicit-function-declaration
 .endif
 
-.if !empty(_GCC_VERSION:M[23]\..*) || !empty(_GCC_VERSION:M4.[0-8]\..*)
+.if !empty(_GCC_VERSION:M[23]..*) || !empty(_GCC_VERSION:M4.[012].*)
+# Added in GCC 4.3
+BUILDLINK_TRANSFORM+=  rm:-Wvla
+.endif
+
+.if !empty(_GCC_VERSION:M[23]..*) || !empty(_GCC_VERSION:M4.0.*)
+# Added in GCC 4.3
+BUILDLINK_TRANSFORM+=  rm:-Wc++-compat
+.endif
+
+.if !empty(_GCC_VERSION:M[23]..*) || !empty(_GCC_VERSION:M4.[0-8].*)
 COMPILER_HAS_C11?=     no
 .else
 COMPILER_HAS_C11?=     yes

Index: pkgsrc/mk/platform/Darwin.mk
diff -u pkgsrc/mk/platform/Darwin.mk:1.132 pkgsrc/mk/platform/Darwin.mk:1.133
--- pkgsrc/mk/platform/Darwin.mk:1.132  Sat Oct 28 22:29:47 2023
+++ pkgsrc/mk/platform/Darwin.mk        Thu Nov  9 08:47:42 2023
@@ -1,4 +1,4 @@
-# $NetBSD: Darwin.mk,v 1.132 2023/10/28 22:29:47 nia Exp $
+# $NetBSD: Darwin.mk,v 1.133 2023/11/09 08:47:42 nia Exp $
 #
 # Variable definitions for the Darwin operating system.
 
@@ -230,6 +230,14 @@ OPSYS_HAS_KQUEUE=  # defined
 MAKE_ENV+=     MACOSX_DEPLOYMENT_TARGET="10.4"
 .endif
 
+# Convert to flags that the old toolchain understands.
+#
+# XXX: probably applies to more platforms too, but the GCC docs
+# unhelpfully describe -pthread as a "HP-UX/Solaris flag" to this day
+.if !empty(MACHINE_PLATFORM:MDarwin-*-powerpc)
+BUILDLINK_TRANSFORM+=  opt:-pthread:-lpthread
+.endif
+
 # El Capitan GM has a file system bug where a deep directory hierarchy can be
 # created but not removed.  Avoid running a test which does exactly this.
 # See https://openradar.appspot.com/radar?id=6160634819379200



Home | Main Index | Thread Index | Old Index