pkgsrc-Changes archive

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

CVS commit: pkgsrc/lang/gcc12



Module Name:    pkgsrc
Committed By:   ryoon
Date:           Wed May 15 12:22:18 UTC 2024

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

Log Message:
lang/gcc12: undefined reference to `__stack_chk_fail_local' errors

* Patch from NetBSD src. Fix -fPIC/-fPIE and -fstack-protector-strong/
  -fstack-protector-all causes undefined reference to `__stack_chk_fail_local'.
* This fixes a build of misc/libreoffice under NetBSD/i386 9 at least.
* Bump PKGREVISION.


To generate a diff of this commit:
cvs rdiff -u -r1.8 -r1.9 pkgsrc/lang/gcc12/Makefile
cvs rdiff -u -r1.5 -r1.6 pkgsrc/lang/gcc12/distinfo
cvs rdiff -u -r0 -r1.1 pkgsrc/lang/gcc12/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/gcc12/Makefile
diff -u pkgsrc/lang/gcc12/Makefile:1.8 pkgsrc/lang/gcc12/Makefile:1.9
--- pkgsrc/lang/gcc12/Makefile:1.8      Mon Nov 27 14:45:40 2023
+++ pkgsrc/lang/gcc12/Makefile  Wed May 15 12:22:17 2024
@@ -1,6 +1,7 @@
-# $NetBSD: Makefile,v 1.8 2023/11/27 14:45:40 jperkin Exp $
+# $NetBSD: Makefile,v 1.9 2024/05/15 12:22:17 ryoon Exp $
 
 PKGNAME=       ${GCC_PKGNAME}-${GCC12_DIST_VERSION}
+PKGREVISION=   1
 ## When bumping the PKGREVISION of this package the PKGREVISION of
 ## lang/gcc12-libs needs to be bumped to be at least 1 more than the
 ## PKGREVISION of this package!

Index: pkgsrc/lang/gcc12/distinfo
diff -u pkgsrc/lang/gcc12/distinfo:1.5 pkgsrc/lang/gcc12/distinfo:1.6
--- pkgsrc/lang/gcc12/distinfo:1.5      Thu Jul  6 12:22:14 2023
+++ pkgsrc/lang/gcc12/distinfo  Wed May 15 12:22:17 2024
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.5 2023/07/06 12:22:14 jperkin Exp $
+$NetBSD: distinfo,v 1.6 2024/05/15 12:22:17 ryoon Exp $
 
 BLAKE2s (gcc-12.3.0.diff) = 0ec7a208da1a1297fb09b7b8cd50855d1fd7cefacc02610cd43525dee2d8b554
 SHA512 (gcc-12.3.0.diff) = 21f9e9f1e9f59385876b1ffdab70fdd4d72d2a6cbbe5e9f68fafa0001d1daca25c6a825210fabd96f5a39a14d6649539b52d789427d64c7a050c3c10525ff054
@@ -21,6 +21,7 @@ SHA1 (patch-gcc_config_arm_netbsd-eabi.h
 SHA1 (patch-gcc_config_arm_netbsd-elf.h) = 367d83c808fd7b5b1989d0490b532ad06b425b31
 SHA1 (patch-gcc_config_nvptx_gen-opt.sh) = 67b8c84f198561c1d964a50946937a0a9cc26749
 SHA1 (patch-gcc_configure) = f13d23c46315d18fdbc3bbbad26d0763e2b27690
+SHA1 (patch-gcc_targhooks.cc) = 3bd54b7c3efc310aa2277f33cbd87b4a877cafea
 SHA1 (patch-isl_configure) = 5523c76d95b229b3cd25461b4c2b7af24bf2534e
 SHA1 (patch-libffi_configure) = 919bbe094e3ce547a0186eeaddb20a662595f79a
 SHA1 (patch-libffi_testsuite_libffi.call_float2.c) = 89e2dd6aaf2c1f75726f02362d8a8bf7178694ea

Added files:

Index: pkgsrc/lang/gcc12/patches/patch-gcc_targhooks.cc
diff -u /dev/null pkgsrc/lang/gcc12/patches/patch-gcc_targhooks.cc:1.1
--- /dev/null   Wed May 15 12:22:18 2024
+++ pkgsrc/lang/gcc12/patches/patch-gcc_targhooks.cc    Wed May 15 12:22:18 2024
@@ -0,0 +1,26 @@
+$NetBSD: patch-gcc_targhooks.cc,v 1.1 2024/05/15 12:22:18 ryoon Exp $
+
+* Patch from NetBSD src. Fix -fPIC/-fPIE and -fstack-protector-strong/
+  -fstack-protector-all causes undefined reference to `__stack_chk_fail_local'
+  under NetBSD/i386 9 at least.
+
+--- gcc/targhooks.cc.orig      2024-05-14 16:02:43.062711061 +0000
++++ gcc/targhooks.cc
+@@ -961,7 +961,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