pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang



Module Name:    pkgsrc
Committed By:   tnn
Date:           Wed Sep 16 09:06:02 UTC 2026

Modified Files:
        pkgsrc/lang/gcc14: Makefile distinfo
        pkgsrc/lang/gcc14-libs: Makefile
        pkgsrc/lang/gcc14/patches: patch-gcc_config_darwin-driver.cc
        pkgsrc/lang/gcc15: Makefile distinfo
        pkgsrc/lang/gcc15-libs: Makefile
        pkgsrc/lang/gcc15/patches: patch-gcc_config_darwin-driver.cc

Log Message:
gcc{14,15}: backport macOS 27 fix from upstream


To generate a diff of this commit:
cvs rdiff -u -r1.5 -r1.6 pkgsrc/lang/gcc14/Makefile
cvs rdiff -u -r1.13 -r1.14 pkgsrc/lang/gcc14/distinfo
cvs rdiff -u -r1.7 -r1.8 pkgsrc/lang/gcc14-libs/Makefile
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/lang/gcc14/patches/patch-gcc_config_darwin-driver.cc
cvs rdiff -u -r1.7 -r1.8 pkgsrc/lang/gcc15/Makefile \
    pkgsrc/lang/gcc15/distinfo
cvs rdiff -u -r1.7 -r1.8 pkgsrc/lang/gcc15-libs/Makefile
cvs rdiff -u -r1.1 -r1.2 \
    pkgsrc/lang/gcc15/patches/patch-gcc_config_darwin-driver.cc

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/lang/gcc14/Makefile
diff -u pkgsrc/lang/gcc14/Makefile:1.5 pkgsrc/lang/gcc14/Makefile:1.6
--- pkgsrc/lang/gcc14/Makefile:1.5      Mon Jul 20 08:02:51 2026
+++ pkgsrc/lang/gcc14/Makefile  Wed Sep 16 09:06:02 2026
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.5 2026/07/20 08:02:51 he Exp $
+# $NetBSD: Makefile,v 1.6 2026/09/16 09:06:02 tnn Exp $
 
 PKGNAME=       ${GCC_PKGNAME}-${GCC14_DIST_VERSION}
 ## When bumping the PKGREVISION of this package the PKGREVISION of
 ## lang/gcc14-libs needs to be bumped to be at least 1 more than the
 ## PKGREVISION of this package!
-PKGREVISION=   2
+PKGREVISION=   3
 COMMENT=       The GNU Compiler Collection (GCC) - 14.0 Release Series
 
 LANGS=         c

Index: pkgsrc/lang/gcc14/distinfo
diff -u pkgsrc/lang/gcc14/distinfo:1.13 pkgsrc/lang/gcc14/distinfo:1.14
--- pkgsrc/lang/gcc14/distinfo:1.13     Mon Jul 27 08:40:18 2026
+++ pkgsrc/lang/gcc14/distinfo  Wed Sep 16 09:06:02 2026
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2026/07/27 08:40:18 tnn Exp $
+$NetBSD: distinfo,v 1.14 2026/09/16 09:06:02 tnn Exp $
 
 BLAKE2s (gcc-14.3.0.tar.xz) = 70036c7d07767bba3476d19a6fd52f0b09dc05651c6cf5d136afe18ffa3b63a9
 SHA512 (gcc-14.3.0.tar.xz) = cb4e3259640721bbd275c723fe4df53d12f9b1673afb3db274c22c6aa457865dccf2d6ea20b4fd4c591f6152e6d4b87516c402015900f06ce9d43af66d3b7a93
@@ -48,7 +48,7 @@ SHA1 (patch-gcc_config_arm_bpabi.h) = 0b
 SHA1 (patch-gcc_config_arm_elf.h) = 57748157084319cb92d892f2ea5b2f3355567551
 SHA1 (patch-gcc_config_arm_netbsd-eabi.h) = 85eb89de6f2e64fac50251f06d7e4eab35903dae
 SHA1 (patch-gcc_config_arm_netbsd-elf.h) = 568f537d624199ef9f9f56088fe4fff7e946b2e2
-SHA1 (patch-gcc_config_darwin-driver.cc) = ac24a7ff6562bd69427a86942d40653a0301d3fd
+SHA1 (patch-gcc_config_darwin-driver.cc) = 3e5f767b99f9eba1ac4775f763e05b51979af1e6
 SHA1 (patch-gcc_config_darwin-protos.h) = dc33fd8f7e70f08b4f723b669b6fd46ce49f091b
 SHA1 (patch-gcc_config_darwin.cc) = 2e6f967fbff313ff16fe95edeaa4380f740512ee
 SHA1 (patch-gcc_config_darwin.h) = 5ffb2337cb94148be1b2e486227761cfcefbda87

Index: pkgsrc/lang/gcc14-libs/Makefile
diff -u pkgsrc/lang/gcc14-libs/Makefile:1.7 pkgsrc/lang/gcc14-libs/Makefile:1.8
--- pkgsrc/lang/gcc14-libs/Makefile:1.7 Mon Jul 20 08:02:51 2026
+++ pkgsrc/lang/gcc14-libs/Makefile     Wed Sep 16 09:06:02 2026
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2026/07/20 08:02:51 he Exp $
+# $NetBSD: Makefile,v 1.8 2026/09/16 09:06:02 tnn Exp $
 
 GCC_PKGNAME=   gcc14
 .include       "../../lang/${GCC_PKGNAME}/version.mk"
@@ -9,7 +9,7 @@ PKGNAME=        ${GCC_PKGNAME}-libs-${GCC14_DIS
 ## The PKGREVISION of this package needs to be at least 1 more than the
 ## PKGREVISION of the lang/gcc14 package so that with the dependence pattern
 ## '{gcc14,gcc14-libs}>=14.1.*' pkg_add will choose gcc14-libs over gcc14.
-PKGREVISION=   3
+PKGREVISION=   4
 
 CATEGORIES=    lang
 MASTER_SITES=  # empty

Index: pkgsrc/lang/gcc14/patches/patch-gcc_config_darwin-driver.cc
diff -u pkgsrc/lang/gcc14/patches/patch-gcc_config_darwin-driver.cc:1.1 pkgsrc/lang/gcc14/patches/patch-gcc_config_darwin-driver.cc:1.2
--- pkgsrc/lang/gcc14/patches/patch-gcc_config_darwin-driver.cc:1.1     Wed Feb  5 16:30:35 2025
+++ pkgsrc/lang/gcc14/patches/patch-gcc_config_darwin-driver.cc Wed Sep 16 09:06:02 2026
@@ -1,10 +1,51 @@
-$NetBSD: patch-gcc_config_darwin-driver.cc,v 1.1 2025/02/05 16:30:35 adam Exp $
+$NetBSD: patch-gcc_config_darwin-driver.cc,v 1.2 2026/09/16 09:06:02 tnn Exp $
 
-Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
+- Support Darwin/aarch64, from https://github.com/Homebrew/formula-patches.
+- Backport macOS 27 fix:
+  https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=bd4b33d265d44bfb3222c7bb962818179242bf4b
 
---- gcc/config/darwin-driver.cc.orig   2024-08-01 08:17:14.000000000 +0000
+  cc4f3397331f6ecd5e775cf963c65face0145f3f  Darwin: account for macOS 26
+  bd4b33d265d44bfb3222c7bb962818179242bf4b  Darwin: account for macOS 27
+--- gcc/config/darwin-driver.cc.orig   2025-05-23 11:02:04.332198151 +0000
 +++ gcc/config/darwin-driver.cc
-@@ -268,10 +268,13 @@ darwin_driver_init (unsigned int *decode
+@@ -64,7 +64,8 @@ validate_macosx_version_min (const char
+ 
+   major = strtoul (version_str, &end, 10);
+ 
+-  /* macOS 10, 11, and 12 are known. clang accepts up to 99.  */
++  /* macOS 10 to 15 and 26 upwards are known.
++     clang accepts up to 99.  */
+   if (major < 10 || major > 99)
+     return NULL;
+ 
+@@ -159,15 +160,17 @@ darwin_find_version_from_kernel (void)
+   if (*version_p++ != '.')
+     goto parse_failed;
+ 
+-  /* Darwin20 sees a transition to macOS 11.  In this, it seems that the
+-     mapping to macOS minor version and patch level is now always 0, 0
+-     (at least for macOS 11 and 12).  */
+-  if (major_vers >= 20)
+-    {
+-      /* Apple clang doesn't include the minor version or the patch level
+-       in the object file, nor does it pass it to ld  */
+-      asprintf (&new_flag, "%d.00.00", major_vers - 9);
+-    }
++  /* macOS 27 aligned version number with Darwin27.  */
++  if (major_vers >= 27)
++    /* Apple clang doesn't include the minor version or the patch level
++       in the object file, nor does it pass it to ld  */
++    asprintf (&new_flag, "%d.00.00", major_vers);
++  /* Darwin25 saw a transition to macOS 26.  */
++  else if (major_vers >= 25)
++    asprintf (&new_flag, "%d.00.00", major_vers + 1);
++  /* Darwin20 saw a transition to macOS 11.  */
++  else if (major_vers >= 20)
++    asprintf (&new_flag, "%d.00.00", major_vers - 9);
+   else if (major_vers - 4 <= 4)
+     /* On 10.4 and earlier, the old linker is used which does not
+        support three-component system versions.
+@@ -268,10 +271,13 @@ darwin_driver_init (unsigned int *decode
    bool seenX86_64 = false;
    bool seenPPC = false;
    bool seenPPC64 = false;
@@ -18,7 +59,7 @@ Support Darwin/aarch64, from https://git
    const char *vers_string = NULL;
    bool seen_version_min = false;
    bool seen_sysroot_p = false;
-@@ -296,6 +299,12 @@ darwin_driver_init (unsigned int *decode
+@@ -296,6 +302,12 @@ darwin_driver_init (unsigned int *decode
            seenPPC = true;
          else if (!strcmp ((*decoded_options)[i].arg, "ppc64"))
            seenPPC64 = true;
@@ -31,7 +72,7 @@ Support Darwin/aarch64, from https://git
          else
            error ("this compiler does not support %qs",
                   (*decoded_options)[i].arg);
-@@ -309,7 +318,7 @@ darwin_driver_init (unsigned int *decode
+@@ -309,7 +321,7 @@ darwin_driver_init (unsigned int *decode
          --i;
          --*decoded_options_count; 
          break;
@@ -40,7 +81,7 @@ Support Darwin/aarch64, from https://git
        case OPT_m32:
          seenM32 = true;
          break;
-@@ -317,6 +326,7 @@ darwin_driver_init (unsigned int *decode
+@@ -317,6 +329,7 @@ darwin_driver_init (unsigned int *decode
        case OPT_m64:
          seenM64 = true;
          break;
@@ -48,7 +89,7 @@ Support Darwin/aarch64, from https://git
  
        case OPT_mmacosx_version_min_:
          seen_version_min = true;
-@@ -366,6 +376,9 @@ darwin_driver_init (unsigned int *decode
+@@ -366,6 +379,9 @@ darwin_driver_init (unsigned int *decode
    if (seenPPC || seenPPC64)
      warning (0, "this compiler does not support PowerPC"
                " (%<-arch%> option ignored)");
@@ -58,7 +99,7 @@ Support Darwin/aarch64, from https://git
    if (seenX86)
      {
        if (seenX86_64 || seenM64)
-@@ -389,6 +402,9 @@ darwin_driver_init (unsigned int *decode
+@@ -389,6 +405,9 @@ darwin_driver_init (unsigned int *decode
    if (seenX86 || seenX86_64)
      warning (0, "this compiler does not support x86"
                " (%<-arch%> option ignored)");
@@ -68,7 +109,7 @@ Support Darwin/aarch64, from https://git
    if (seenPPC)
      {
        if (seenPPC64 || seenM64)
-@@ -408,12 +424,20 @@ darwin_driver_init (unsigned int *decode
+@@ -408,12 +427,20 @@ darwin_driver_init (unsigned int *decode
        if (! seenM64) /* Add -m64 if the User didn't. */
        appendM64 = true;
      }
@@ -89,7 +130,7 @@ Support Darwin/aarch64, from https://git
    if (appendM32 || appendM64)
      {
        ++*decoded_options_count;
-@@ -423,6 +447,7 @@ darwin_driver_init (unsigned int *decode
+@@ -423,6 +450,7 @@ darwin_driver_init (unsigned int *decode
        generate_option (appendM32 ? OPT_m32 : OPT_m64, NULL, 1, CL_DRIVER,
                       &(*decoded_options)[*decoded_options_count - 1]);
      }

Index: pkgsrc/lang/gcc15/Makefile
diff -u pkgsrc/lang/gcc15/Makefile:1.7 pkgsrc/lang/gcc15/Makefile:1.8
--- pkgsrc/lang/gcc15/Makefile:1.7      Wed Jul 22 19:28:26 2026
+++ pkgsrc/lang/gcc15/Makefile  Wed Sep 16 09:06:02 2026
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.7 2026/07/22 19:28:26 he Exp $
+# $NetBSD: Makefile,v 1.8 2026/09/16 09:06:02 tnn Exp $
 
 PKGNAME=       ${GCC_PKGNAME}-${GCC15_DIST_VERSION}
 ## When bumping the PKGREVISION of this package the PKGREVISION of
 ## lang/gcc15-libs needs to be bumped to be at least 1 more than the
 ## PKGREVISION of this package!
-PKGREVISION=   1
+PKGREVISION=   2
 COMMENT=       The GNU Compiler Collection (GCC) - 15.0 Release Series
 
 LANGS=         c
Index: pkgsrc/lang/gcc15/distinfo
diff -u pkgsrc/lang/gcc15/distinfo:1.7 pkgsrc/lang/gcc15/distinfo:1.8
--- pkgsrc/lang/gcc15/distinfo:1.7      Wed Jul 22 19:28:26 2026
+++ pkgsrc/lang/gcc15/distinfo  Wed Sep 16 09:06:02 2026
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.7 2026/07/22 19:28:26 he Exp $
+$NetBSD: distinfo,v 1.8 2026/09/16 09:06:02 tnn Exp $
 
 BLAKE2s (gcc-15.3.0.tar.xz) = 4230d4aaa5a4740a3101d5a06478d92d265796df542be1ddd6985be695a3e6ee
 SHA512 (gcc-15.3.0.tar.xz) = 0de9e296153b52c021b1c7e63c9c62151d7a0ac03f23ce6e9f772c1b0eb783f6acdd81cc4567bfe4128a6f64968c2cfc8eff40b36229cba7425349f7d637c654
@@ -49,7 +49,7 @@ SHA1 (patch-gcc_config_arm_bpabi.h) = 0b
 SHA1 (patch-gcc_config_arm_elf.h) = 57748157084319cb92d892f2ea5b2f3355567551
 SHA1 (patch-gcc_config_arm_netbsd-eabi.h) = 85eb89de6f2e64fac50251f06d7e4eab35903dae
 SHA1 (patch-gcc_config_arm_netbsd-elf.h) = 568f537d624199ef9f9f56088fe4fff7e946b2e2
-SHA1 (patch-gcc_config_darwin-driver.cc) = a02dcb37b47c04dc0a6cc95b562651fb56f2331f
+SHA1 (patch-gcc_config_darwin-driver.cc) = 55a22a7be2e8f5fccb050c7a6d19ba996177f677
 SHA1 (patch-gcc_config_darwin-protos.h) = f97bafbfacee04eb686d73343541e44150da7bef
 SHA1 (patch-gcc_config_darwin-sections.def) = d652d541dc15bac80e674bf174abaae064325bc6
 SHA1 (patch-gcc_config_darwin.cc) = 1b81349a8c1703fb028c6e6f8be31ec5c3772c98

Index: pkgsrc/lang/gcc15-libs/Makefile
diff -u pkgsrc/lang/gcc15-libs/Makefile:1.7 pkgsrc/lang/gcc15-libs/Makefile:1.8
--- pkgsrc/lang/gcc15-libs/Makefile:1.7 Wed Jul 22 19:28:27 2026
+++ pkgsrc/lang/gcc15-libs/Makefile     Wed Sep 16 09:06:02 2026
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.7 2026/07/22 19:28:27 he Exp $
+# $NetBSD: Makefile,v 1.8 2026/09/16 09:06:02 tnn Exp $
 
 GCC_PKGNAME=   gcc15
 .include       "../../lang/${GCC_PKGNAME}/version.mk"
@@ -9,7 +9,7 @@ PKGNAME=        ${GCC_PKGNAME}-libs-${GCC15_DIS
 ## The PKGREVISION of this package needs to be at least 1 more than the
 ## PKGREVISION of the lang/gcc15 package so that with the dependence pattern
 ## '{gcc15,gcc15-libs}>=15.1.*' pkg_add will choose gcc15-libs over gcc15.
-PKGREVISION=   2
+PKGREVISION=   3
 
 CATEGORIES=    lang
 MASTER_SITES=  # empty

Index: pkgsrc/lang/gcc15/patches/patch-gcc_config_darwin-driver.cc
diff -u pkgsrc/lang/gcc15/patches/patch-gcc_config_darwin-driver.cc:1.1 pkgsrc/lang/gcc15/patches/patch-gcc_config_darwin-driver.cc:1.2
--- pkgsrc/lang/gcc15/patches/patch-gcc_config_darwin-driver.cc:1.1     Sun Jul 19 11:17:43 2026
+++ pkgsrc/lang/gcc15/patches/patch-gcc_config_darwin-driver.cc Wed Sep 16 09:06:02 2026
@@ -1,11 +1,43 @@
-$NetBSD: patch-gcc_config_darwin-driver.cc,v 1.1 2026/07/19 11:17:43 adam Exp $
+$NetBSD: patch-gcc_config_darwin-driver.cc,v 1.2 2026/09/16 09:06:02 tnn Exp $
 
-Support Darwin/aarch64.
-https://github.com/Homebrew/homebrew-core/blob/main/Patches/gcc/gcc-15.3.0.diff
+- Support Darwin/aarch64.
+  https://github.com/Homebrew/homebrew-core/blob/main/Patches/gcc/gcc-15.3.0.diff
+- Backport macOS 27 fix:
+  https://gcc.gnu.org/git/?p=gcc.git;a=patch;h=bd4b33d265d44bfb3222c7bb962818179242bf4b
 
 --- gcc/config/darwin-driver.cc.orig   2026-06-12 06:09:06.164518915 +0000
 +++ gcc/config/darwin-driver.cc
-@@ -270,10 +270,13 @@ darwin_driver_init (unsigned int *decode
+@@ -64,7 +64,7 @@ validate_macosx_version_min (const char
+ 
+   major = strtoul (version_str, &end, 10);
+ 
+-  /* macOS 10, 11, 12, 13, 14, 15 and 26 are known.
++  /* macOS 10 to 15 and 26 upwards are known.
+      clang accepts up to 99.  */
+   if (major < 10 || major > 99)
+     return NULL;
+@@ -160,15 +160,16 @@ darwin_find_version_from_kernel (void)
+   if (*version_p++ != '.')
+     goto parse_failed;
+ 
+-  /* Darwin25 saw a transition to macOS 26.  */
+-  if (major_vers >= 25)
++  /* macOS 27 aligned version number with Darwin27.  */
++  if (major_vers >= 27)
+     /* Apple clang doesn't include the minor version or the patch level
+        in the object file, nor does it pass it to ld  */
++    asprintf (&new_flag, "%d.00.00", major_vers);
++  /* Darwin25 saw a transition to macOS 26.  */
++  else if (major_vers >= 25)
+     asprintf (&new_flag, "%d.00.00", major_vers + 1);
+   /* Darwin20 saw a transition to macOS 11.  */
+   else if (major_vers >= 20)
+-    /* Apple clang doesn't include the minor version or the patch level
+-       in the object file, nor does it pass it to ld  */
+     asprintf (&new_flag, "%d.00.00", major_vers - 9);
+   else if (major_vers - 4 <= 4)
+     /* On 10.4 and earlier, the old linker is used which does not
+@@ -270,10 +271,13 @@ darwin_driver_init (unsigned int *decode
    bool seenX86_64 = false;
    bool seenPPC = false;
    bool seenPPC64 = false;
@@ -19,7 +51,7 @@ https://github.com/Homebrew/homebrew-cor
    const char *vers_string = NULL;
    bool seen_version_min = false;
    bool seen_sysroot_p = false;
-@@ -298,6 +301,12 @@ darwin_driver_init (unsigned int *decode
+@@ -298,6 +302,12 @@ darwin_driver_init (unsigned int *decode
            seenPPC = true;
          else if (!strcmp ((*decoded_options)[i].arg, "ppc64"))
            seenPPC64 = true;
@@ -32,7 +64,7 @@ https://github.com/Homebrew/homebrew-cor
          else
            error ("this compiler does not support %qs",
                   (*decoded_options)[i].arg);
-@@ -311,7 +320,7 @@ darwin_driver_init (unsigned int *decode
+@@ -311,7 +321,7 @@ darwin_driver_init (unsigned int *decode
          --i;
          --*decoded_options_count;
          break;
@@ -41,15 +73,15 @@ https://github.com/Homebrew/homebrew-cor
        case OPT_m32:
          seenM32 = true;
          break;
-@@ -319,6 +328,7 @@ darwin_driver_init (unsigned int *decode
+@@ -319,6 +329,7 @@ darwin_driver_init (unsigned int *decode
        case OPT_m64:
          seenM64 = true;
          break;
 +#endif
-
+ 
        case OPT_mmacosx_version_min_:
          seen_version_min = true;
-@@ -378,6 +388,9 @@ darwin_driver_init (unsigned int *decode
+@@ -378,6 +389,9 @@ darwin_driver_init (unsigned int *decode
    if (seenPPC || seenPPC64)
      warning (0, "this compiler does not support PowerPC"
                " (%<-arch%> option ignored)");
@@ -59,7 +91,7 @@ https://github.com/Homebrew/homebrew-cor
    if (seenX86)
      {
        if (seenX86_64 || seenM64)
-@@ -401,6 +414,9 @@ darwin_driver_init (unsigned int *decode
+@@ -401,6 +415,9 @@ darwin_driver_init (unsigned int *decode
    if (seenX86 || seenX86_64)
      warning (0, "this compiler does not support x86"
                " (%<-arch%> option ignored)");
@@ -69,7 +101,7 @@ https://github.com/Homebrew/homebrew-cor
    if (seenPPC)
      {
        if (seenPPC64 || seenM64)
-@@ -420,12 +436,20 @@ darwin_driver_init (unsigned int *decode
+@@ -420,12 +437,20 @@ darwin_driver_init (unsigned int *decode
        if (! seenM64) /* Add -m64 if the User didn't. */
        appendM64 = true;
      }
@@ -81,20 +113,20 @@ https://github.com/Homebrew/homebrew-cor
 +    warning (0, "this compiler does not support x86"
 +              " (%<-arch%> option ignored)");
  #endif
-
+ 
    /* If there is nothing else on the command line, do not add sysroot etc.  */
    if (*decoded_options_count <= 1)
      return;
-
+ 
 +#if !DARWIN_ARM64
    if (appendM32 || appendM64)
      {
        ++*decoded_options_count;
-@@ -435,6 +459,7 @@ darwin_driver_init (unsigned int *decode
+@@ -435,6 +460,7 @@ darwin_driver_init (unsigned int *decode
        generate_option (appendM32 ? OPT_m32 : OPT_m64, NULL, 1, CL_DRIVER,
                       &(*decoded_options)[*decoded_options_count - 1]);
      }
 +#endif
-
+ 
    if (!seen_sysroot_p)
      {



Home | Main Index | Thread Index | Old Index