[packages/gcc/GCC_8] - up to 8.5.0 (final gcc 8 release, branch diff is empty now) - added ada-99264 patch (fixes build w

qboosh qboosh at pld-linux.org
Tue Feb 15 18:50:20 CET 2022


commit df93cd4f8ff87dcd2e828a065a9e594f6330e5d5
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Tue Feb 15 18:51:41 2022 +0100

    - up to 8.5.0 (final gcc 8 release, branch diff is empty now)
    - added ada-99264 patch (fixes build with glibc 2.34+)
    - added sanitizer-100379 patch (fix for cyclades driver removal from Linux 5.12)

 branch.sh                  |   2 +-
 gcc-ada-99264.patch        |  39 +++++++++++++++
 gcc-sanitizer-100379.patch | 121 +++++++++++++++++++++++++++++++++++++++++++++
 gcc.spec                   |  18 ++++---
 4 files changed, 172 insertions(+), 8 deletions(-)
---
diff --git a/gcc.spec b/gcc.spec
index fd66dbc..71560ba 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -93,7 +93,7 @@
 # Stable is: any major_ver and minor_ver >= 1.0
 # For PLD we usually use gcc when minor_ver >= 2.0 (first bugfix release or later)
 %define		major_ver	8
-%define		minor_ver	4.0
+%define		minor_ver	5.0
 
 Summary:	GNU Compiler Collection: the C compiler and shared files
 Summary(es.UTF-8):	Colección de compiladores GNU: el compilador C y ficheros compartidos
@@ -106,19 +106,20 @@ Epoch:		6
 License:	GPL v3+
 Group:		Development/Languages
 Source0:	https://ftp.gnu.org/gnu/gcc/gcc-%{version}/%{name}-%{version}.tar.xz
-# Source0-md5:	bb815a8e3b7be43c4a26fa89dbbd9795
+# Source0-md5:	0c1f625768840187ef3b10adebe8e3b0
 Source1:	%{name}-optimize-la.pl
 # check libffi version with libffi/configure.ac
 Source3:	libffi.pc.in
 Source4:	branch.sh
 # use branch.sh to update gcc-branch.diff
-Patch100:	%{name}-branch.diff
-# Patch100-md5:	f13ade4c91d6a65bcccb315d67054d91
+#Patch100:	%{name}-branch.diff
+## Patch100-md5:	d41d8cd98f00b204e9800998ecf8427e
 Patch0:		%{name}-info.patch
+Patch1:		%{name}-ada-99264.patch
 Patch2:		%{name}-nodebug.patch
 Patch3:		%{name}-ada-link.patch
 Patch4:		%{name}-ada-x32.patch
-
+Patch5:		%{name}-sanitizer-100379.patch
 Patch10:	%{name}-moresparcs.patch
 Patch11:	%{name}-install-libffi.patch
 URL:		http://gcc.gnu.org/
@@ -176,6 +177,7 @@ BuildRequires:	mpfr-devel >= 2.4.2
 BuildRequires:	python-devel
 BuildRequires:	rpm-pythonprov
 %endif
+BuildRequires:	rpm-build >= 4.6
 BuildRequires:	rpmbuild(macros) >= 1.752
 BuildRequires:	tar >= 1:1.22
 BuildRequires:	texinfo >= 4.7
@@ -940,7 +942,7 @@ Summary:	C++ standard library API documentation
 Summary(pl.UTF-8):	Dokumentacja API biblioteki standardowej C++
 License:	FDL v1.3 (mainly), GPL v3+ (doxygen generated parts)
 Group:		Documentation
-%{?noarchpackage}
+BuildArch:	noarch
 
 %description -n libstdc++-apidocs
 API and internal documentation for C++ standard library.
@@ -2664,11 +2666,13 @@ Extensions dla języka C.
 
 %prep
 %setup -q
-%patch100 -p1
+#patch100 -p1
 %patch0 -p1
+%patch1 -p1
 %patch2 -p1
 %patch3 -p1
 %patch4 -p1
+%patch5 -p1
 
 %patch10 -p1
 %if %{with gcc_libffi}
diff --git a/branch.sh b/branch.sh
index 473fa56..fc3587e 100755
--- a/branch.sh
+++ b/branch.sh
@@ -2,7 +2,7 @@
 set -e
 url=git://gcc.gnu.org/git/gcc.git
 package=gcc
-tag=releases/gcc-8.4.0
+tag=releases/gcc-8.5.0
 branch=releases/gcc-8
 out=$package-branch.diff
 repo=$package.git
diff --git a/gcc-ada-99264.patch b/gcc-ada-99264.patch
new file mode 100644
index 0000000..df7a104
--- /dev/null
+++ b/gcc-ada-99264.patch
@@ -0,0 +1,39 @@
+2021-03-05  Eric Botcazou  <ebotcazou at adacore.com>
+
+  PR ada/99264
+  * init.c (__gnat_alternate_sta) [Linux]: Remove preprocessor test on
+  MINSIGSTKSZ and bump size to 32KB.
+  * libgnarl/s-osinte__linux.ads (Alternate_Stack_Size): Bump to 32KB.
+
+diff --git a/gcc/ada/init.c b/gcc/ada/init.c
+index e76aa79c5a8..3ceb1a31b02 100644
+--- a/gcc/ada/init.c
++++ b/gcc/ada/init.c
+@@ -579,12 +579,8 @@ __gnat_error_handler (int sig, siginfo_t *si ATTRIBUTE_UNUSED, void *ucontext)
+ 
+ #ifndef __ia64__
+ #define HAVE_GNAT_ALTERNATE_STACK 1
+-/* This must be in keeping with System.OS_Interface.Alternate_Stack_Size.
+-   It must be larger than MINSIGSTKSZ and hopefully near 2 * SIGSTKSZ.  */
+-# if 16 * 1024 < MINSIGSTKSZ
+-#  error "__gnat_alternate_stack too small"
+-# endif
+-char __gnat_alternate_stack[16 * 1024];
++/* This must be in keeping with System.OS_Interface.Alternate_Stack_Size.  */
++char __gnat_alternate_stack[32 * 1024];
+ #endif
+ 
+ #ifdef __XENO__
+diff --git a/gcc/ada/libgnarl/s-osinte__linux.ads b/gcc/ada/libgnarl/s-osinte__linux.ads
+index f7af00bf5e2..2272f83d68d 100644
+--- a/gcc/ada/libgnarl/s-osinte__linux.ads
++++ b/gcc/ada/libgnarl/s-osinte__linux.ads
+@@ -328,7 +328,7 @@ package System.OS_Interface is
+       oss : access stack_t) return int;
+    pragma Import (C, sigaltstack, "sigaltstack");
+ 
+-   Alternate_Stack_Size : constant := 16 * 1024;
++   Alternate_Stack_Size : constant := 32 * 1024;
+    --  This must be in keeping with init.c:__gnat_alternate_stack
+ 
+    Alternate_Stack : aliased char_array (1 .. Alternate_Stack_Size);
diff --git a/gcc-sanitizer-100379.patch b/gcc-sanitizer-100379.patch
new file mode 100644
index 0000000..3411983
--- /dev/null
+++ b/gcc-sanitizer-100379.patch
@@ -0,0 +1,121 @@
+From 2b40941d23b1570cdd90083b58fa0f66aa58c86e Mon Sep 17 00:00:00 2001
+From: Tamar Christina <tamar.christina at arm.com>
+Date: Fri, 21 May 2021 12:16:56 +0100
+Subject: [PATCH] libsanitizer: Remove cyclades from libsanitizer
+
+The Linux kernel has removed the interface to cyclades from
+the latest kernel headers[1] due to them being orphaned for the
+past 13 years.
+
+libsanitizer uses this header when compiling against glibc, but
+glibcs itself doesn't seem to have any references to cyclades.
+
+Further more it seems that the driver is broken in the kernel and
+the firmware doesn't seem to be available anymore.
+
+As such since this is breaking the build of libsanitizer (and so the
+GCC bootstrap[2]) I propose to remove this.
+
+[1] https://lkml.org/lkml/2021/3/2/153
+[2] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100379
+
+libsanitizer/ChangeLog:
+
+	PR sanitizer/100379
+	* sanitizer_common/sanitizer_common_interceptors_ioctl.inc: Cherry-pick
+	llvm-project revision f7c5351552387bd43f6ca3631016d7f0dfe0f135.
+	* sanitizer_common/sanitizer_platform_limits_posix.cc: Likewise.
+	* sanitizer_common/sanitizer_platform_limits_posix.h: Likewise.
+---
+ .../sanitizer_common_interceptors_ioctl.inc           |  9 ---------
+ .../sanitizer_platform_limits_posix.cc                | 11 -----------
+ .../sanitizer_platform_limits_posix.h                 | 10 ----------
+ 3 files changed, 30 deletions(-)
+
+diff --git a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+index 5408ea17c59..7a9cd3f5968 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
++++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc
+@@ -365,15 +365,6 @@ static void ioctl_table_fill() {
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   // _(SIOCDEVPLIP, WRITE, struct_ifreq_sz); // the same as EQL_ENSLAVE
+-  _(CYGETDEFTHRESH, WRITE, sizeof(int));
+-  _(CYGETDEFTIMEOUT, WRITE, sizeof(int));
+-  _(CYGETMON, WRITE, struct_cyclades_monitor_sz);
+-  _(CYGETTHRESH, WRITE, sizeof(int));
+-  _(CYGETTIMEOUT, WRITE, sizeof(int));
+-  _(CYSETDEFTHRESH, NONE, 0);
+-  _(CYSETDEFTIMEOUT, NONE, 0);
+-  _(CYSETTHRESH, NONE, 0);
+-  _(CYSETTIMEOUT, NONE, 0);
+   _(EQL_EMANCIPATE, WRITE, struct_ifreq_sz);
+   _(EQL_ENSLAVE, WRITE, struct_ifreq_sz);
+   _(EQL_GETMASTRCFG, WRITE, struct_ifreq_sz);
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+index d823a12190c..e8fce8a0287 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -157,7 +157,6 @@ typedef struct user_fpregs elf_fpregset_t;
+ # include <sys/procfs.h>
+ #endif
+ #include <sys/user.h>
+-#include <linux/cyclades.h>
+ #include <linux/if_eql.h>
+ #include <linux/if_plip.h>
+ #include <linux/lp.h>
+@@ -466,7 +465,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   unsigned struct_ax25_parms_struct_sz = sizeof(struct ax25_parms_struct);
+-  unsigned struct_cyclades_monitor_sz = sizeof(struct cyclades_monitor);
+ #if EV_VERSION > (0x010000)
+   unsigned struct_input_keymap_entry_sz = sizeof(struct input_keymap_entry);
+ #else
+@@ -833,15 +831,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
+ #endif // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+-  unsigned IOCTL_CYGETDEFTHRESH = CYGETDEFTHRESH;
+-  unsigned IOCTL_CYGETDEFTIMEOUT = CYGETDEFTIMEOUT;
+-  unsigned IOCTL_CYGETMON = CYGETMON;
+-  unsigned IOCTL_CYGETTHRESH = CYGETTHRESH;
+-  unsigned IOCTL_CYGETTIMEOUT = CYGETTIMEOUT;
+-  unsigned IOCTL_CYSETDEFTHRESH = CYSETDEFTHRESH;
+-  unsigned IOCTL_CYSETDEFTIMEOUT = CYSETDEFTIMEOUT;
+-  unsigned IOCTL_CYSETTHRESH = CYSETTHRESH;
+-  unsigned IOCTL_CYSETTIMEOUT = CYSETTIMEOUT;
+   unsigned IOCTL_EQL_EMANCIPATE = EQL_EMANCIPATE;
+   unsigned IOCTL_EQL_ENSLAVE = EQL_ENSLAVE;
+   unsigned IOCTL_EQL_GETMASTRCFG = EQL_GETMASTRCFG;
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+index 6a673a7c995..f921bf2b5b5 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -1040,7 +1040,6 @@ struct __sanitizer_cookie_io_functions_t {
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+   extern unsigned struct_ax25_parms_struct_sz;
+-  extern unsigned struct_cyclades_monitor_sz;
+   extern unsigned struct_input_keymap_entry_sz;
+   extern unsigned struct_ipx_config_data_sz;
+   extern unsigned struct_kbdiacrs_sz;
+@@ -1385,15 +1384,6 @@ struct __sanitizer_cookie_io_functions_t {
+ #endif  // SANITIZER_LINUX || SANITIZER_FREEBSD
+ 
+ #if SANITIZER_LINUX && !SANITIZER_ANDROID
+-  extern unsigned IOCTL_CYGETDEFTHRESH;
+-  extern unsigned IOCTL_CYGETDEFTIMEOUT;
+-  extern unsigned IOCTL_CYGETMON;
+-  extern unsigned IOCTL_CYGETTHRESH;
+-  extern unsigned IOCTL_CYGETTIMEOUT;
+-  extern unsigned IOCTL_CYSETDEFTHRESH;
+-  extern unsigned IOCTL_CYSETDEFTIMEOUT;
+-  extern unsigned IOCTL_CYSETTHRESH;
+-  extern unsigned IOCTL_CYSETTIMEOUT;
+   extern unsigned IOCTL_EQL_EMANCIPATE;
+   extern unsigned IOCTL_EQL_ENSLAVE;
+   extern unsigned IOCTL_EQL_GETMASTRCFG;
+-- 
+2.27.0
+
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gcc.git/commitdiff/df93cd4f8ff87dcd2e828a065a9e594f6330e5d5



More information about the pld-cvs-commit mailing list