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:   tsutsui
Date:           Fri Jul 10 21:28:41 UTC 2026

Modified Files:
        pkgsrc/lang/gcc15: Makefile distinfo
        pkgsrc/lang/gcc15-libs: Makefile
Added Files:
        pkgsrc/lang/gcc15/patches: patch-gcc_targhooks.cc

Log Message:
gcc15: pull targhooks.cc change for NetBSD from prior gcc versions

Use default visibility for __stack_chk_fail_local() on NetBSD.
This fixes shared-library links with -fstack-protector-strong or
-fstack-protector-all on NetBSD/i386 again.

Note comments in NetBSD's gcc/targhooks.cc doesn't look correct:
 https://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gcc/dist/gcc/targhooks.cc.diff?r1=1.1.1.2;r2=1.4
>        * This is a hack:
>        * It appears that our gas does not generate @PLT for hidden
>        * symbols. It could be that we need a newer version, or that
>        * this local function is handled differently on linux.

For 32-bit x86 PIC code, GCC emits a hidden reference to
__stack_chk_fail_local() rather than default_external_stack_protect_fail().
On NetBSD, GCC is configured with --disable-libssp and NetBSD's
__stack_chk_fail_local() is historically provided by libc as a public
symbol:
 https://cvsweb.netbsd.org/bsdweb.cgi/src/lib/libc/sys/Attic/stack_protector.c#rev1.3
so the hidden reference cannot be resolved even with the newer binutils.
(Mabye we should submit this change to GCC upstream?)

Bump PKGREVISION of gcc15 and gcc15-libs.


To generate a diff of this commit:
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/gcc15/Makefile \
    pkgsrc/lang/gcc15/distinfo
cvs rdiff -u -r1.4 -r1.5 pkgsrc/lang/gcc15-libs/Makefile
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/gcc15/patches/patch-gcc_targhooks.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/gcc15/Makefile
diff -u pkgsrc/lang/gcc15/Makefile:1.4 pkgsrc/lang/gcc15/Makefile:1.5
--- pkgsrc/lang/gcc15/Makefile:1.4      Sat Nov  8 07:04:02 2025
+++ pkgsrc/lang/gcc15/Makefile  Fri Jul 10 21:28:41 2026
@@ -1,10 +1,10 @@
-# $NetBSD: Makefile,v 1.4 2025/11/08 07:04:02 mrg Exp $
+# $NetBSD: Makefile,v 1.5 2026/07/10 21:28:41 tsutsui 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.4 pkgsrc/lang/gcc15/distinfo:1.5
--- pkgsrc/lang/gcc15/distinfo:1.4      Sat Nov  8 07:04:02 2025
+++ pkgsrc/lang/gcc15/distinfo  Fri Jul 10 21:28:41 2026
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.4 2025/11/08 07:04:02 mrg Exp $
+$NetBSD: distinfo,v 1.5 2026/07/10 21:28:41 tsutsui Exp $
 
 BLAKE2s (gcc-15.2.0.tar.xz) = ee9b2705b03ef8e6b5a41cf523dad26dcdaa8047be3743121b1673ce2fcc8832
 SHA512 (gcc-15.2.0.tar.xz) = 89047a2e07bd9da265b507b516ed3635adb17491c7f4f67cf090f0bd5b3fc7f2ee6e4cc4008beef7ca884b6b71dffe2bb652b21f01a702e17b468cca2d10b2de
@@ -19,6 +19,7 @@ SHA1 (patch-gcc_config_arm_netbsd-eabi.h
 SHA1 (patch-gcc_config_arm_netbsd-elf.h) = 568f537d624199ef9f9f56088fe4fff7e946b2e2
 SHA1 (patch-gcc_config_i386_t-netbsd64) = 914b4d2fd65f5e46681aa2ea592d0bc75299f09a
 SHA1 (patch-gcc_config_netbsd.h) = ada05409eacb33bc1e7a659f3090f2f43551a35d
+SHA1 (patch-gcc_targhooks.cc) = a390b35d31afa207cee108c0642ce954c6291941
 SHA1 (patch-isl_configure) = a6295c509bdc82e8b54d7dec5252994532463091
 SHA1 (patch-libffi_configure) = 919bbe094e3ce547a0186eeaddb20a662595f79a
 SHA1 (patch-libffi_testsuite_libffi.call_float2.c) = 89e2dd6aaf2c1f75726f02362d8a8bf7178694ea

Index: pkgsrc/lang/gcc15-libs/Makefile
diff -u pkgsrc/lang/gcc15-libs/Makefile:1.4 pkgsrc/lang/gcc15-libs/Makefile:1.5
--- pkgsrc/lang/gcc15-libs/Makefile:1.4 Sat Nov  8 07:04:02 2025
+++ pkgsrc/lang/gcc15-libs/Makefile     Fri Jul 10 21:28:41 2026
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.4 2025/11/08 07:04:02 mrg Exp $
+# $NetBSD: Makefile,v 1.5 2026/07/10 21:28:41 tsutsui 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

Added files:

Index: pkgsrc/lang/gcc15/patches/patch-gcc_targhooks.cc
diff -u /dev/null pkgsrc/lang/gcc15/patches/patch-gcc_targhooks.cc:1.1
--- /dev/null   Fri Jul 10 21:28:42 2026
+++ pkgsrc/lang/gcc15/patches/patch-gcc_targhooks.cc    Fri Jul 10 21:28:41 2026
@@ -0,0 +1,26 @@
+$NetBSD: patch-gcc_targhooks.cc,v 1.1 2026/07/10 21:28:41 tsutsui Exp $
+
+- Pull NetBSD local change for gcc's default_hidden_stack_protect_fail()
+  for NetBSD/i386
+   https://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gcc/dist/gcc/targhooks.cc.diff?r1=1.1.1.2;r2=1.4
+
+--- gcc/targhooks.cc.orig      2026-07-10 18:51:24.043844508 +0000
++++ gcc/targhooks.cc
+@@ -1000,7 +1000,17 @@ default_hidden_stack_protect_fail (void)
+       DECL_ARTIFICIAL (t) = 1;
+       DECL_IGNORED_P (t) = 1;
+       DECL_VISIBILITY_SPECIFIED (t) = 1;
++#if defined(__NetBSD__)
++      /*
++       * This is a hack:
++       * It appears that our gas does not generate @PLT for hidden
++       * symbols. It could be that we need a newer version, or that
++       * this local function is handled differently on linux.
++       */
++      DECL_VISIBILITY (t) = VISIBILITY_DEFAULT;
++#else
+       DECL_VISIBILITY (t) = VISIBILITY_HIDDEN;
++#endif
+ 
+       stack_chk_fail_decl = t;
+     }



Home | Main Index | Thread Index | Old Index