From 34835d2021e9dd809ea7749b7fda630a11072b60 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Fri, 12 Jan 2018 07:36:17 +0000 Subject: gcc: fix building against glibc-2.26 (ucontext_t change), bug #629502#c20 Reported-by: Andrey Grozin Bug: https://bugs.gentoo.org/629502#c20 --- .../gcc/4.9.4/gentoo/98_all_libjava-ucontext.patch | 62 ++++++++++++++++++++++ src/patchsets/gcc/4.9.4/gentoo/README.history | 2 + .../gcc/5.4.0/gentoo/95_all_libjava-ucontext.patch | 62 ++++++++++++++++++++++ src/patchsets/gcc/5.4.0/gentoo/README.history | 2 + .../gcc/6.4.0/gentoo/97_all_libjava-ucontext.patch | 62 ++++++++++++++++++++++ src/patchsets/gcc/6.4.0/gentoo/README.history | 2 + 6 files changed, 192 insertions(+) create mode 100644 src/patchsets/gcc/4.9.4/gentoo/98_all_libjava-ucontext.patch create mode 100644 src/patchsets/gcc/5.4.0/gentoo/95_all_libjava-ucontext.patch create mode 100644 src/patchsets/gcc/6.4.0/gentoo/97_all_libjava-ucontext.patch diff --git a/src/patchsets/gcc/4.9.4/gentoo/98_all_libjava-ucontext.patch b/src/patchsets/gcc/4.9.4/gentoo/98_all_libjava-ucontext.patch new file mode 100644 index 0000000000..6b823d863b --- /dev/null +++ b/src/patchsets/gcc/4.9.4/gentoo/98_all_libjava-ucontext.patch @@ -0,0 +1,62 @@ +https://bugs.gentoo.org/629502 + +From 9b9287cde20ea57578cf07efb2a96ed4cc0da36f Mon Sep 17 00:00:00 2001 +From: doko +Date: Thu, 7 Sep 2017 07:22:07 +0000 +Subject: [PATCH] 2017-09-07 Matthias Klose + + * include/x86_64-signal.h (HANDLE_DIVIDE_OVERFLOW): Replace + 'struct ucontext' with ucontext_t. + * include/i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Likewise. + * include/s390-signal.h (HANDLE_DIVIDE_OVERFLOW): Likewise. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@251832 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + libjava/include/i386-signal.h | 2 +- + libjava/include/s390-signal.h | 2 +- + libjava/include/x86_64-signal.h | 2 +- + 4 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/libjava/include/i386-signal.h b/libjava/include/i386-signal.h +index c2409b0e301..ef77e7e99ae 100644 +--- a/libjava/include/i386-signal.h ++++ b/libjava/include/i386-signal.h +@@ -29,7 +29,7 @@ static void _Jv_##_name (int, siginfo_t *, \ + #define HANDLE_DIVIDE_OVERFLOW \ + do \ + { \ +- struct ucontext *_uc = (struct ucontext *)_p; \ ++ ucontext_t *_uc = (ucontext_t *)_p; \ + gregset_t &_gregs = _uc->uc_mcontext.gregs; \ + unsigned char *_eip = (unsigned char *)_gregs[REG_EIP]; \ + \ +diff --git a/libjava/include/s390-signal.h b/libjava/include/s390-signal.h +index 4ca4c108864..9261b52be6e 100644 +--- a/libjava/include/s390-signal.h ++++ b/libjava/include/s390-signal.h +@@ -51,7 +51,7 @@ do \ + struct \ + { \ + unsigned long int uc_flags; \ +- struct ucontext *uc_link; \ ++ ucontext_t *uc_link; \ + stack_t uc_stack; \ + mcontext_t uc_mcontext; \ + unsigned long sigmask[2]; \ +diff --git a/libjava/include/x86_64-signal.h b/libjava/include/x86_64-signal.h +index 12383b5485a..e36c5a32a64 100644 +--- a/libjava/include/x86_64-signal.h ++++ b/libjava/include/x86_64-signal.h +@@ -28,7 +28,7 @@ static void _Jv_##_name (int, siginfo_t *, \ + #define HANDLE_DIVIDE_OVERFLOW \ + do \ + { \ +- struct ucontext *_uc = (struct ucontext *)_p; \ ++ ucontext_t *_uc = (ucontext_t *)_p; \ + gregset_t &_gregs = _uc->uc_mcontext.gregs; \ + unsigned char *_rip = (unsigned char *)_gregs[REG_RIP]; \ + \ +-- +2.15.1 + diff --git a/src/patchsets/gcc/4.9.4/gentoo/README.history b/src/patchsets/gcc/4.9.4/gentoo/README.history index 4a4a1fa016..eec3b4ac8a 100644 --- a/src/patchsets/gcc/4.9.4/gentoo/README.history +++ b/src/patchsets/gcc/4.9.4/gentoo/README.history @@ -1,3 +1,5 @@ +1.3 12 Jan 2018 + + 98_all_libjava-ucontext.patch 1.2 27 Oct 2017 + 95_all_asan-signal_h.patch + 96_all_ucontext-to-ucontext_t.patch diff --git a/src/patchsets/gcc/5.4.0/gentoo/95_all_libjava-ucontext.patch b/src/patchsets/gcc/5.4.0/gentoo/95_all_libjava-ucontext.patch new file mode 100644 index 0000000000..6b823d863b --- /dev/null +++ b/src/patchsets/gcc/5.4.0/gentoo/95_all_libjava-ucontext.patch @@ -0,0 +1,62 @@ +https://bugs.gentoo.org/629502 + +From 9b9287cde20ea57578cf07efb2a96ed4cc0da36f Mon Sep 17 00:00:00 2001 +From: doko +Date: Thu, 7 Sep 2017 07:22:07 +0000 +Subject: [PATCH] 2017-09-07 Matthias Klose + + * include/x86_64-signal.h (HANDLE_DIVIDE_OVERFLOW): Replace + 'struct ucontext' with ucontext_t. + * include/i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Likewise. + * include/s390-signal.h (HANDLE_DIVIDE_OVERFLOW): Likewise. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@251832 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + libjava/include/i386-signal.h | 2 +- + libjava/include/s390-signal.h | 2 +- + libjava/include/x86_64-signal.h | 2 +- + 4 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/libjava/include/i386-signal.h b/libjava/include/i386-signal.h +index c2409b0e301..ef77e7e99ae 100644 +--- a/libjava/include/i386-signal.h ++++ b/libjava/include/i386-signal.h +@@ -29,7 +29,7 @@ static void _Jv_##_name (int, siginfo_t *, \ + #define HANDLE_DIVIDE_OVERFLOW \ + do \ + { \ +- struct ucontext *_uc = (struct ucontext *)_p; \ ++ ucontext_t *_uc = (ucontext_t *)_p; \ + gregset_t &_gregs = _uc->uc_mcontext.gregs; \ + unsigned char *_eip = (unsigned char *)_gregs[REG_EIP]; \ + \ +diff --git a/libjava/include/s390-signal.h b/libjava/include/s390-signal.h +index 4ca4c108864..9261b52be6e 100644 +--- a/libjava/include/s390-signal.h ++++ b/libjava/include/s390-signal.h +@@ -51,7 +51,7 @@ do \ + struct \ + { \ + unsigned long int uc_flags; \ +- struct ucontext *uc_link; \ ++ ucontext_t *uc_link; \ + stack_t uc_stack; \ + mcontext_t uc_mcontext; \ + unsigned long sigmask[2]; \ +diff --git a/libjava/include/x86_64-signal.h b/libjava/include/x86_64-signal.h +index 12383b5485a..e36c5a32a64 100644 +--- a/libjava/include/x86_64-signal.h ++++ b/libjava/include/x86_64-signal.h +@@ -28,7 +28,7 @@ static void _Jv_##_name (int, siginfo_t *, \ + #define HANDLE_DIVIDE_OVERFLOW \ + do \ + { \ +- struct ucontext *_uc = (struct ucontext *)_p; \ ++ ucontext_t *_uc = (ucontext_t *)_p; \ + gregset_t &_gregs = _uc->uc_mcontext.gregs; \ + unsigned char *_rip = (unsigned char *)_gregs[REG_RIP]; \ + \ +-- +2.15.1 + diff --git a/src/patchsets/gcc/5.4.0/gentoo/README.history b/src/patchsets/gcc/5.4.0/gentoo/README.history index 7aec051291..0462e075a8 100644 --- a/src/patchsets/gcc/5.4.0/gentoo/README.history +++ b/src/patchsets/gcc/5.4.0/gentoo/README.history @@ -1,3 +1,5 @@ +1.8 12 Jan 2018 + + 95_all_libjava-ucontext.patch 1.7 26 Oct 2017 + 94_all_no-sigaltstack.patch 1.6 26 Oct 2017 diff --git a/src/patchsets/gcc/6.4.0/gentoo/97_all_libjava-ucontext.patch b/src/patchsets/gcc/6.4.0/gentoo/97_all_libjava-ucontext.patch new file mode 100644 index 0000000000..6b823d863b --- /dev/null +++ b/src/patchsets/gcc/6.4.0/gentoo/97_all_libjava-ucontext.patch @@ -0,0 +1,62 @@ +https://bugs.gentoo.org/629502 + +From 9b9287cde20ea57578cf07efb2a96ed4cc0da36f Mon Sep 17 00:00:00 2001 +From: doko +Date: Thu, 7 Sep 2017 07:22:07 +0000 +Subject: [PATCH] 2017-09-07 Matthias Klose + + * include/x86_64-signal.h (HANDLE_DIVIDE_OVERFLOW): Replace + 'struct ucontext' with ucontext_t. + * include/i386-signal.h (HANDLE_DIVIDE_OVERFLOW): Likewise. + * include/s390-signal.h (HANDLE_DIVIDE_OVERFLOW): Likewise. + + +git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-5-branch@251832 138bc75d-0d04-0410-961f-82ee72b054a4 +--- + libjava/include/i386-signal.h | 2 +- + libjava/include/s390-signal.h | 2 +- + libjava/include/x86_64-signal.h | 2 +- + 4 files changed, 10 insertions(+), 3 deletions(-) + +diff --git a/libjava/include/i386-signal.h b/libjava/include/i386-signal.h +index c2409b0e301..ef77e7e99ae 100644 +--- a/libjava/include/i386-signal.h ++++ b/libjava/include/i386-signal.h +@@ -29,7 +29,7 @@ static void _Jv_##_name (int, siginfo_t *, \ + #define HANDLE_DIVIDE_OVERFLOW \ + do \ + { \ +- struct ucontext *_uc = (struct ucontext *)_p; \ ++ ucontext_t *_uc = (ucontext_t *)_p; \ + gregset_t &_gregs = _uc->uc_mcontext.gregs; \ + unsigned char *_eip = (unsigned char *)_gregs[REG_EIP]; \ + \ +diff --git a/libjava/include/s390-signal.h b/libjava/include/s390-signal.h +index 4ca4c108864..9261b52be6e 100644 +--- a/libjava/include/s390-signal.h ++++ b/libjava/include/s390-signal.h +@@ -51,7 +51,7 @@ do \ + struct \ + { \ + unsigned long int uc_flags; \ +- struct ucontext *uc_link; \ ++ ucontext_t *uc_link; \ + stack_t uc_stack; \ + mcontext_t uc_mcontext; \ + unsigned long sigmask[2]; \ +diff --git a/libjava/include/x86_64-signal.h b/libjava/include/x86_64-signal.h +index 12383b5485a..e36c5a32a64 100644 +--- a/libjava/include/x86_64-signal.h ++++ b/libjava/include/x86_64-signal.h +@@ -28,7 +28,7 @@ static void _Jv_##_name (int, siginfo_t *, \ + #define HANDLE_DIVIDE_OVERFLOW \ + do \ + { \ +- struct ucontext *_uc = (struct ucontext *)_p; \ ++ ucontext_t *_uc = (ucontext_t *)_p; \ + gregset_t &_gregs = _uc->uc_mcontext.gregs; \ + unsigned char *_rip = (unsigned char *)_gregs[REG_RIP]; \ + \ +-- +2.15.1 + diff --git a/src/patchsets/gcc/6.4.0/gentoo/README.history b/src/patchsets/gcc/6.4.0/gentoo/README.history index 0d530c177b..c5c023324b 100644 --- a/src/patchsets/gcc/6.4.0/gentoo/README.history +++ b/src/patchsets/gcc/6.4.0/gentoo/README.history @@ -1,3 +1,5 @@ +1.3 12 Jan 2018 + + 97_all_libjava-ucontext.patch 1.2 06 Jan 2018 + 95_all_static_override_pie.patch + 96_all_powerpc_pie.patch -- cgit v1.2.3-65-gdbad