pkgsrc-Changes archive

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

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   nia
Date:           Tue Nov  7 09:54:50 UTC 2023

Modified Files:
        pkgsrc/lang/perl5: hacks.mk
        pkgsrc/mk/compiler: gcc.mk

Log Message:
Centralize hack for old Darwin gcc, since it's needed by more packages
than expected.


To generate a diff of this commit:
cvs rdiff -u -r1.30 -r1.31 pkgsrc/lang/perl5/hacks.mk
cvs rdiff -u -r1.263 -r1.264 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/lang/perl5/hacks.mk
diff -u pkgsrc/lang/perl5/hacks.mk:1.30 pkgsrc/lang/perl5/hacks.mk:1.31
--- pkgsrc/lang/perl5/hacks.mk:1.30     Sun Nov  5 18:18:46 2023
+++ pkgsrc/lang/perl5/hacks.mk  Tue Nov  7 09:54:49 2023
@@ -1,4 +1,4 @@
-# $NetBSD: hacks.mk,v 1.30 2023/11/05 18:18:46 nia Exp $
+# $NetBSD: hacks.mk,v 1.31 2023/11/07 09:54:49 nia Exp $
 
 .if !defined(PERL5_HACKS_MK)
 PERL5_HACKS_MK=        defined
@@ -57,15 +57,4 @@ CFLAGS+=     -fno-reorder-blocks
 .  endif
 .endif
 
-### [Thu Nov 5 19:00:00 CEST 2023  : nia ]
-# The package includes a hack to disable the default of -Werror
-# for implicit function declarations in the newest versions
-# of XCode (pkgsrc also contains this hack, in mk/). However,
-# very old versions of Darwin use GCC 4 which doesn't understand
-# this command line argument.
-.if ${OPSYS} == "Darwin" && ${CC_VERSION:Mgcc-*}
-PKG_HACKS+=    old-darwin-gcc
-BUILDLINK_TRANSFORM+=  rm:-Wno-error=implicit-function-declaration
-.endif
-
 .endif  # PERL5_HACKS_MK

Index: pkgsrc/mk/compiler/gcc.mk
diff -u pkgsrc/mk/compiler/gcc.mk:1.263 pkgsrc/mk/compiler/gcc.mk:1.264
--- pkgsrc/mk/compiler/gcc.mk:1.263     Mon Oct  9 13:36:13 2023
+++ pkgsrc/mk/compiler/gcc.mk   Tue Nov  7 09:54:49 2023
@@ -1,4 +1,4 @@
-# $NetBSD: gcc.mk,v 1.263 2023/10/09 13:36:13 nia Exp $
+# $NetBSD: gcc.mk,v 1.264 2023/11/07 09:54:49 nia Exp $
 #
 # This is the compiler definition for the GNU Compiler Collection.
 #
@@ -325,6 +325,16 @@ _GCC_VERSION=      0
 .endif
 _GCC_PKG=      gcc-${_GCC_VERSION:C/-.*$//}
 
+.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
+# understand this syntax.
+#
+# Note that pkgsrc also sets this flag itself for Darwin+clang.
+BUILDLINK_TRANSFORM+=  rm:-Wno-error=implicit-function-declaration
+.endif
+
 .for _version_ in ${_C_STD_VERSIONS}
 _C_STD_FLAG.${_version_}?=     -std=${_version_}
 .endfor



Home | Main Index | Thread Index | Old Index