This commit is contained in:
Jakub Jelinek 2017-07-18 10:43:56 +02:00
parent 3ed08a4301
commit d898f48f0c
5 changed files with 101 additions and 72 deletions

1
.gitignore vendored
View File

@ -20,3 +20,4 @@
/gcc-7.1.1-20170622.tar.bz2 /gcc-7.1.1-20170622.tar.bz2
/gcc-7.1.1-20170708.tar.bz2 /gcc-7.1.1-20170708.tar.bz2
/gcc-7.1.1-20170711.tar.bz2 /gcc-7.1.1-20170711.tar.bz2
/gcc-7.1.1-20170718.tar.bz2

View File

@ -1,10 +1,10 @@
%global DATE 20170711 %global DATE 20170718
%global SVNREV 250136 %global SVNREV 250298
%global gcc_version 7.1.1 %global gcc_version 7.1.1
%global gcc_major 7 %global gcc_major 7
# Note, gcc_release must be integer, if you want to add suffixes to # Note, gcc_release must be integer, if you want to add suffixes to
# %{release}, append them after %{gcc_release} on Release: line. # %{release}, append them after %{gcc_release} on Release: line.
%global gcc_release 5 %global gcc_release 6
%global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f %global nvptx_tools_gitrev c28050f60193b3b95a18866a96f03334e874e78f
%global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24 %global nvptx_newlib_gitrev aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24
%global _unpackaged_files_terminate_build 0 %global _unpackaged_files_terminate_build 0
@ -233,7 +233,7 @@ Patch9: gcc7-aarch64-async-unw-tables.patch
Patch10: gcc7-foffload-default.patch Patch10: gcc7-foffload-default.patch
Patch11: gcc7-Wno-format-security.patch Patch11: gcc7-Wno-format-security.patch
Patch12: gcc7-rh1467526.patch Patch12: gcc7-rh1467526.patch
Patch13: gcc7-pr81066.patch Patch13: gcc7-pr81393.patch
Patch1000: nvptx-tools-no-ptxas.patch Patch1000: nvptx-tools-no-ptxas.patch
Patch1001: nvptx-tools-build.patch Patch1001: nvptx-tools-build.patch
@ -824,7 +824,7 @@ package or when debugging this package.
%patch10 -p0 -b .foffload-default~ %patch10 -p0 -b .foffload-default~
%patch11 -p0 -b .Wno-format-security~ %patch11 -p0 -b .Wno-format-security~
%patch12 -p0 -b .rh1467526~ %patch12 -p0 -b .rh1467526~
%patch13 -p0 -b .pr81066~ %patch13 -p0 -b .pr81393~
cd nvptx-tools-%{nvptx_tools_gitrev} cd nvptx-tools-%{nvptx_tools_gitrev}
%patch1000 -p1 -b .nvptx-tools-no-ptxas~ %patch1000 -p1 -b .nvptx-tools-no-ptxas~
@ -3242,6 +3242,15 @@ fi
%endif %endif
%changelog %changelog
* Tue Jul 18 2017 Jakub Jelinek <jakub@redhat.com> 7.1.1-6
- update from the 7 branch
- PRs ada/81446, c++/81258, middle-end/80929, rtl-optimization/81424,
target/79883, target/81225, tree-optimization/81365,
tree-optimization/81428
- fix bootstrap on s390{,x} in libgo (PR go/81393)
- rebuilt against hopefully fixed glibc to reenable TLS support on ppc64le
in libstdc++ (#1470692)
* Tue Jul 11 2017 Jakub Jelinek <jakub@redhat.com> 7.1.1-5 * Tue Jul 11 2017 Jakub Jelinek <jakub@redhat.com> 7.1.1-5
- update from the 7 branch - update from the 7 branch
- PRs libstdc++/80316, target/81375 - PRs libstdc++/80316, target/81375

View File

@ -1,66 +0,0 @@
2017-07-11 Jakub Jelinek <jakub@redhat.com>
PR sanitizer/81066
* sanitizer_common/sanitizer_linux.cc (internal_sigaltstack): Use void
instead of struct sigaltstack.
* sanitizer_common/sanitizer_linux.h (internal_sigaltstack): Likewise.
(struct sigaltstack): Remove forward declaration.
* sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc
(TracerThread): Use stack_t instead of struct sigaltstack.
* tsan/tsan_platform_linux.cc (ExtractResolvFDs): Use struct
__res_state instead of just __res_state.
--- libsanitizer/sanitizer_common/sanitizer_linux.cc.jj 2016-11-09 18:26:30.000000000 +0100
+++ libsanitizer/sanitizer_common/sanitizer_linux.cc 2017-07-11 13:02:10.440483783 +0200
@@ -605,8 +605,7 @@ uptr internal_prctl(int option, uptr arg
}
#endif
-uptr internal_sigaltstack(const struct sigaltstack *ss,
- struct sigaltstack *oss) {
+uptr internal_sigaltstack(const void *ss, void *oss) {
return internal_syscall(SYSCALL(sigaltstack), (uptr)ss, (uptr)oss);
}
--- libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc.jj 2016-11-09 18:26:30.322873896 +0100
+++ libsanitizer/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cc 2017-07-11 13:02:50.027011510 +0200
@@ -273,7 +273,7 @@ static int TracerThread(void* argument)
// Alternate stack for signal handling.
InternalScopedBuffer<char> handler_stack_memory(kHandlerStackSize);
- struct sigaltstack handler_stack;
+ stack_t handler_stack;
internal_memset(&handler_stack, 0, sizeof(handler_stack));
handler_stack.ss_sp = handler_stack_memory.data();
handler_stack.ss_size = kHandlerStackSize;
--- libsanitizer/sanitizer_common/sanitizer_linux.h.jj 2016-11-09 18:26:30.000000000 +0100
+++ libsanitizer/sanitizer_common/sanitizer_linux.h 2017-07-11 13:00:23.671757549 +0200
@@ -19,7 +19,6 @@
#include "sanitizer_platform_limits_posix.h"
struct link_map; // Opaque type returned by dlopen().
-struct sigaltstack;
namespace __sanitizer {
// Dirent structure for getdents(). Note that this structure is different from
@@ -28,8 +27,7 @@ struct linux_dirent;
// Syscall wrappers.
uptr internal_getdents(fd_t fd, struct linux_dirent *dirp, unsigned int count);
-uptr internal_sigaltstack(const struct sigaltstack* ss,
- struct sigaltstack* oss);
+uptr internal_sigaltstack(const void* ss, void* oss);
uptr internal_sigprocmask(int how, __sanitizer_sigset_t *set,
__sanitizer_sigset_t *oldset);
--- libsanitizer/tsan/tsan_platform_linux.cc.jj 2016-11-09 18:26:31.000000000 +0100
+++ libsanitizer/tsan/tsan_platform_linux.cc 2017-07-11 13:03:39.944415988 +0200
@@ -287,7 +287,7 @@ void InitializePlatform() {
int ExtractResolvFDs(void *state, int *fds, int nfd) {
#if SANITIZER_LINUX && !SANITIZER_ANDROID
int cnt = 0;
- __res_state *statp = (__res_state*)state;
+ struct __res_state *statp = (struct __res_state*)state;
for (int i = 0; i < MAXNS && cnt < nfd; i++) {
if (statp->_u._ext.nsaddrs[i] && statp->_u._ext.nssocks[i] != -1)
fds[cnt++] = statp->_u._ext.nssocks[i];

85
gcc7-pr81393.patch Normal file
View File

@ -0,0 +1,85 @@
--- libgo/go/syscall/syscall_linux_s390x.go (revision 250173)
+++ libgo/go/syscall/syscall_linux_s390x.go (revision 250174)
@@ -4,6 +4,23 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// The PtraceRegs struct generated for go looks like this:
+//
+// type PtraceRegs struct
+// {
+// Psw _psw_t;
+// Gprs [15+1]uint64;
+// Acrs [15+1]uint32;
+// Orig_gpr2 uint64;
+// Fp_regs _s390_fp_regs;
+// Per_info _per_struct;
+// Ieee_instruction_pointer uint64;
+// }
+//
+// The GETREGSET/SETREGSET ptrace commands on S/390 only read/write
+// the content up to Orig_gpr2. Hence, we use
+// PEEKUSR_AREA/POKEUSR_AREA like GDB does.
+
package syscall
import "unsafe"
@@ -12,10 +29,20 @@ func (r *PtraceRegs) PC() uint64 { retur
func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.addr = pc }
-func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
- return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
+func PtraceGetRegs(pid int, regs *PtraceRegs) (err error) {
+ parea := _ptrace_area{
+ _sizeof_ptrace_area,
+ 0,
+ uint64(uintptr(unsafe.Pointer(regs))),
+ }
+ return ptrace(PTRACE_PEEKUSR_AREA, pid, uintptr(unsafe.Pointer(&parea)), 0)
}
func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
- return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
+ parea := _ptrace_area{
+ _sizeof_ptrace_area,
+ 0,
+ uint64(uintptr(unsafe.Pointer(regs))),
+ }
+ return ptrace(PTRACE_POKEUSR_AREA, pid, uintptr(unsafe.Pointer(&parea)), 0)
}
--- libgo/go/syscall/syscall_linux_s390.go (revision 250173)
+++ libgo/go/syscall/syscall_linux_s390.go (revision 250174)
@@ -4,6 +4,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+// See the s390x version for why we don't use GETREGSET/SETREGSET
+
package syscall
import "unsafe"
@@ -12,10 +14,20 @@ func (r *PtraceRegs) PC() uint64 { retur
func (r *PtraceRegs) SetPC(pc uint64) { r.Psw.addr = uint32(pc) }
-func PtraceGetRegs(pid int, regsout *PtraceRegs) (err error) {
- return ptrace(PTRACE_GETREGS, pid, 0, uintptr(unsafe.Pointer(regsout)))
+func PtraceGetRegs(pid int, regs *PtraceRegs) (err error) {
+ parea := _ptrace_area{
+ _sizeof_ptrace_area,
+ 0,
+ uint32(uintptr(unsafe.Pointer(regs))),
+ }
+ return ptrace(PTRACE_PEEKUSR_AREA, pid, uintptr(unsafe.Pointer(&parea)), 0)
}
func PtraceSetRegs(pid int, regs *PtraceRegs) (err error) {
- return ptrace(PTRACE_SETREGS, pid, 0, uintptr(unsafe.Pointer(regs)))
+ parea := _ptrace_area{
+ _sizeof_ptrace_area,
+ 0,
+ uint32(uintptr(unsafe.Pointer(regs))),
+ }
+ return ptrace(PTRACE_POKEUSR_AREA, pid, uintptr(unsafe.Pointer(&parea)), 0)
}

View File

@ -1,3 +1,3 @@
SHA512 (gcc-7.1.1-20170711.tar.bz2) = 23d3867081d06b2e7f4bbfb50ca48ed17368f06425b0dc0913d91477a9ded4bcbcc9b343862059421eba7e330fe65c82c47a760665ba504f55ef81e268e0b718 SHA512 (gcc-7.1.1-20170718.tar.bz2) = 727b48bdcbee6b52ec8c64c930d4c1f714b35ffb7df25a9e548b53f5c7dfc5ecafcd82c2bfa04dc3a2ad5f939de196c3775b54bee2b608155eecc656242ed445
SHA512 (nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.bz2) = 38f97c9297ad108568352a4d28277455a3c01fd8b7864e798037e5006b6f757022e874bbf3f165775fe3b873781bc108137bbeb42dd5ed3c7d3e6747746fa918 SHA512 (nvptx-newlib-aadc8eb0ec43b7cd0dd2dfb484bae63c8b05ef24.tar.bz2) = 38f97c9297ad108568352a4d28277455a3c01fd8b7864e798037e5006b6f757022e874bbf3f165775fe3b873781bc108137bbeb42dd5ed3c7d3e6747746fa918
SHA512 (nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.bz2) = 95b577a06a93bb044dbc8033e550cb36bcf2ab2687da030a7318cdc90e7467ed49665e247dcafb5ff4a7e92cdc264291d19728bd17fab902fb64b22491269330 SHA512 (nvptx-tools-c28050f60193b3b95a18866a96f03334e874e78f.tar.bz2) = 95b577a06a93bb044dbc8033e550cb36bcf2ab2687da030a7318cdc90e7467ed49665e247dcafb5ff4a7e92cdc264291d19728bd17fab902fb64b22491269330