[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2020-08-17 Thread Sergei Trofimovich
commit: 717271374986e434e35d6f8806c0da15c91208ba
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Mon Aug 17 22:25:24 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Mon Aug 17 22:25:24 2020 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=71727137

9.2.0: abandon branch in favour of 9.3.0

Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/README.history | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 794d76c..ffd2ed0 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-7  TODO
+7  Abandoned
+ 38_all_libcpp-ar.patch
 
 6  11 Mar 2019



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2020-06-05 Thread Sergei Trofimovich
commit: 8de1017bc7cec033dc5447bfc824ca10568b1696
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Fri Jun  5 07:39:22 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Fri Jun  5 07:39:22 2020 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=8de1017b

9.2.0: clarify that 38_all_libcpp-ar.patch did not get into 6 patchset

Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/README.history | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 0a433e0..794d76c 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,6 +1,8 @@
+7  TODO
+   + 38_all_libcpp-ar.patch
+
 6  11 Mar 2019
+ 37_all_whitespace-pa.patch
-   + 38_all_libcpp-ar.patch
 
 5  15 Feb 2020
+ 34_all_ia64-neg-insn-cost.patch



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2020-05-29 Thread Sergei Trofimovich
commit: af4164c093d4682a080c240a9840eb4dbb13e3e4
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Fri May 29 07:07:17 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Fri May 29 07:07:17 2020 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=af4164c0

9.2.0: fix libcpp ar detection

Reported-by: Agostino Sarubbo
Bug: https://bugs.gentoo.org/718004
Bug: https://gcc.gnu.org/PR94657
Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/38_all_libcpp-ar.patch | 143 
 9.2.0/gentoo/README.history |   1 +
 2 files changed, 144 insertions(+)

diff --git a/9.2.0/gentoo/38_all_libcpp-ar.patch 
b/9.2.0/gentoo/38_all_libcpp-ar.patch
new file mode 100644
index 000..55f2944
--- /dev/null
+++ b/9.2.0/gentoo/38_all_libcpp-ar.patch
@@ -0,0 +1,143 @@
+https://bugs.gentoo.org/718004
+https://gcc.gnu.org/PR94657
+
+Make sue we use ${CHOST}-ar and not 'ar'.
+
+--- a/libcpp/configure.ac
 b/libcpp/configure.ac
+@@ -12,6 +12,7 @@ AC_PROG_INSTALL
+ AC_PROG_CC
+ AC_PROG_CXX
+ AC_PROG_RANLIB
++AC_CHECK_TOOL(AR, ar)
+ 
+ AC_USE_SYSTEM_EXTENSIONS
+ AC_SYS_LARGEFILE
+--- a/libcpp/Makefile.in
 b/libcpp/Makefile.in
+@@ -25,7 +25,7 @@ srcdir = @srcdir@
+ top_builddir = .
+ VPATH = @srcdir@
+ INSTALL = @INSTALL@
+-AR = ar
++AR = @AR@
+ ARFLAGS = cru
+ ACLOCAL = @ACLOCAL@
+ AUTOCONF = @AUTOCONF@
+--- a/libcpp/configure
 b/libcpp/configure
+@@ -657,6 +657,7 @@ ACLOCAL
+ EGREP
+ GREP
+ CPP
++AR
+ RANLIB
+ ac_ct_CXX
+ CXXFLAGS
+@@ -1038,6 +1039,7 @@ do
+   | -silent | --silent | --silen | --sile | --sil)
+ silent=yes ;;
+ 
++
+   -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+ ac_prev=sbindir ;;
+   -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+@@ -4006,6 +4008,98 @@ else
+   RANLIB="$ac_cv_prog_RANLIB"
+ fi
+ 
++if test -n "$ac_tool_prefix"; then
++  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program 
name with args.
++set dummy ${ac_tool_prefix}ar; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_AR+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$AR"; then
++  ac_cv_prog_AR="$AR" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++for ac_exec_ext in '' $ac_executable_extensions; do
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ac_cv_prog_AR="${ac_tool_prefix}ar"
++$as_echo "$as_me:${as_lineno-$LINENO}: found 
$as_dir/$ac_word$ac_exec_ext" >&5
++break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++AR=$ac_cv_prog_AR
++if test -n "$AR"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
++$as_echo "$AR" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++
++fi
++if test -z "$ac_cv_prog_AR"; then
++  ac_ct_AR=$AR
++  # Extract the first word of "ar", so it can be a program name with args.
++set dummy ar; ac_word=$2
++{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
++$as_echo_n "checking for $ac_word... " >&6; }
++if ${ac_cv_prog_ac_ct_AR+:} false; then :
++  $as_echo_n "(cached) " >&6
++else
++  if test -n "$ac_ct_AR"; then
++  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
++else
++as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
++for as_dir in $PATH
++do
++  IFS=$as_save_IFS
++  test -z "$as_dir" && as_dir=.
++for ac_exec_ext in '' $ac_executable_extensions; do
++  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
++ac_cv_prog_ac_ct_AR="ar"
++$as_echo "$as_me:${as_lineno-$LINENO}: found 
$as_dir/$ac_word$ac_exec_ext" >&5
++break 2
++  fi
++done
++  done
++IFS=$as_save_IFS
++
++fi
++fi
++ac_ct_AR=$ac_cv_prog_ac_ct_AR
++if test -n "$ac_ct_AR"; then
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
++$as_echo "$ac_ct_AR" >&6; }
++else
++  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
++$as_echo "no" >&6; }
++fi
++
++  if test "x$ac_ct_AR" = x; then
++AR=""
++  else
++case $cross_compiling:$ac_tool_warned in
++yes:)
++{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not 
prefixed with host triplet" >&5
++$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" 
>&2;}
++ac_tool_warned=yes ;;
++esac
++AR=$ac_ct_AR
++  fi
++else
++  AR="$ac_cv_prog_AR"
++fi
++
+ 
+ 
+ ac_ext=c

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index b0acdb5..0a433e0 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,5 +1,6 @@
 6  11 Mar 2019
+ 37_all_whitespace-pa.patch
+   + 38_all_libcpp-ar.patch
 
 5  15 Feb 2020
+ 34_all_ia64-neg-insn-cost.patch



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2020-03-11 Thread Sergei Trofimovich
commit: 73c75c6b496177402d52502207c9164b13608a05
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Wed Mar 11 23:44:36 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Wed Mar 11 23:44:36 2020 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=73c75c6b

9.2.0: cut 6 patchset

Single new patch:
- 37_all_whitespace-pa.patch: fix hppa target built with gcc-10

Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/README.history | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index ee72ffd..b0acdb5 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-6  TODO
+6  11 Mar 2019
+ 37_all_whitespace-pa.patch
 
 5  15 Feb 2020



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2020-03-01 Thread Sergei Trofimovich
commit: 0573e14f67231cbde43a90c8953896ab0d2d7e58
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sun Mar  1 20:55:32 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sun Mar  1 20:55:32 2020 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=0573e14f

9.2.0: pull upstream 37_all_whitespace-pa.patch

Fix gcc build failure against hppa target.

Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/37_all_whitespace-pa.patch | 27 +++
 9.2.0/gentoo/README.history |  3 +++
 2 files changed, 30 insertions(+)

diff --git a/9.2.0/gentoo/37_all_whitespace-pa.patch 
b/9.2.0/gentoo/37_all_whitespace-pa.patch
new file mode 100644
index 000..ad398df
--- /dev/null
+++ b/9.2.0/gentoo/37_all_whitespace-pa.patch
@@ -0,0 +1,27 @@
+From bd7a5c5dc082707dd62083514bbb88c6f78e5bdb Mon Sep 17 00:00:00 2001
+From: John David Anglin 
+Date: Fri, 20 Sep 2019 21:47:56 +
+Subject: [PATCH] pa.c (pa_trampoline_init): Remove spurious extended
+ character.
+
+   * config/pa/pa.c (pa_trampoline_init): Remove spurious extended
+   character.
+
+From-SVN: r276007
+---
+ gcc/config/pa/pa.c | 2 +-
+
+--- a/gcc/config/pa/pa.c
 b/gcc/config/pa/pa.c
+@@ -10197,7 +10197,7 @@ pa_trampoline_init (rtx m_tramp, tree fndecl, rtx 
chain_value)
+ }
+ 
+ #ifdef HAVE_ENABLE_EXECUTE_STACK
+-  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"),
++  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__enable_execute_stack"),
+LCT_NORMAL, VOIDmode, XEXP (m_tramp, 0), Pmode);
+ #endif
+ }
+-- 
+2.25.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 713dcaf..ee72ffd 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+6  TODO
+   + 37_all_whitespace-pa.patch
+
 5  15 Feb 2020
+ 34_all_ia64-neg-insn-cost.patch
+ 35_all_glibc-2.31-libsanitizer-1.patch



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2020-02-15 Thread Sergei Trofimovich
commit: 13d06bce45982c7abc0d6cb4fb9e07e67a70aadd
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sat Feb 15 19:54:50 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sat Feb 15 19:54:50 2020 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=13d06bce

9.2.0: cut 5 patchset

Three new patches:
+ 34_all_ia64-neg-insn-cost.patch: fix lz4 code generation on ia64
+ 35_all_glibc-2.31-libsanitizer-{1,2}.patch: fix build against glibc-2.31

https://bugs.gentoo.org/707958
https://gcc.gnu.org/PR88879
https://bugs.gentoo.org/708346
Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/README.history | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 01df09a..713dcaf 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,9 +1,9 @@
-5  TODO
+5  15 Feb 2020
+ 34_all_ia64-neg-insn-cost.patch
+ 35_all_glibc-2.31-libsanitizer-1.patch
+ 36_all_glibc-2.31-libsanitizer-2.patch
 
-4  22 Dec 2012
+4  22 Dec 2019
+ 31_all_openmp-for-SEGV.patch
+ 27_all_sparc-PIC-constant-PR91472.patch
+ 32_all_sparc-PIC-constant-part2.patch



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2020-02-06 Thread Sergei Trofimovich
commit: 7d1022a04284035ab567d85e356e14e06aab121d
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Thu Feb  6 22:19:38 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Thu Feb  6 22:19:38 2020 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=7d1022a0

9.2.0: backport libsanitizer tweaks for glibc-2.31

Reported-by: Mike Lothian
Bug: https://bugs.gentoo.org/708346
Signed-off-by: Sergei Trofimovich  gentoo.org>

 .../gentoo/35_all_glibc-2.31-libsanitizer-1.patch  | 40 
 .../gentoo/36_all_glibc-2.31-libsanitizer-2.patch  | 76 ++
 9.2.0/gentoo/README.history|  2 +
 3 files changed, 118 insertions(+)

diff --git a/9.2.0/gentoo/35_all_glibc-2.31-libsanitizer-1.patch 
b/9.2.0/gentoo/35_all_glibc-2.31-libsanitizer-1.patch
new file mode 100644
index 000..4906ae0
--- /dev/null
+++ b/9.2.0/gentoo/35_all_glibc-2.31-libsanitizer-1.patch
@@ -0,0 +1,40 @@
+https://bugs.gentoo.org/708346
+
+From ce9568e9e9cf6094be30e748821421e703754ffc Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek 
+Date: Fri, 8 Nov 2019 19:53:18 +0100
+Subject: [PATCH] backport: re PR sanitizer/92154 (new glibc breaks arm
+ bootstrap due to libsanitizer)
+
+   Backported from mainline
+   2019-10-22  Tamar Christina  
+
+   PR sanitizer/92154
+   * sanitizer_common/sanitizer_platform_limits_posix.cc:
+   Cherry-pick compiler-rt revision r375220.
+
+From-SVN: r277981
+---
+ libsanitizer/ChangeLog   | 9 +
+ .../sanitizer_common/sanitizer_platform_limits_posix.cc  | 6 +-
+ 2 files changed, 14 insertions(+), 1 deletion(-)
+
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
 b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -1156,8 +1156,12 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
+-#if !defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)
++#if (!defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)) && \
++!defined(__arm__)
+ /* On aarch64 glibc 2.20 and earlier provided incorrect mode field.  */
++/* On Arm glibc 2.31 and later provide a different mode field, this field is
++   never used by libsanitizer so we can simply ignore this assert for all 
glibc
++   versions.  */
+ CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
+ #endif
+ 
+-- 
+2.25.0
+

diff --git a/9.2.0/gentoo/36_all_glibc-2.31-libsanitizer-2.patch 
b/9.2.0/gentoo/36_all_glibc-2.31-libsanitizer-2.patch
new file mode 100644
index 000..1960a11
--- /dev/null
+++ b/9.2.0/gentoo/36_all_glibc-2.31-libsanitizer-2.patch
@@ -0,0 +1,76 @@
+https://bugs.gentoo.org/708346
+
+From 75003cdd23c310ec385344e8040d490e8dd6d2be Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek 
+Date: Fri, 20 Dec 2019 17:58:35 +0100
+Subject: [PATCH] backport: re PR sanitizer/92154 (new glibc breaks arm
+ bootstrap due to libsanitizer)
+
+   Backported from mainline
+   2019-11-26  Jakub Jelinek  
+
+   PR sanitizer/92154
+   * sanitizer_common/sanitizer_platform_limits_posix.h: Cherry-pick
+   llvm-project revision 947f9692440836dcb8d88b74b69dd379d85974ce.
+   * sanitizer_common/sanitizer_platform_limits_posix.cc: Likewise.
+
+From-SVN: r279653
+---
+ libsanitizer/ChangeLog| 10 ++
+ .../sanitizer_platform_limits_posix.cc|  9 +++--
+ .../sanitizer_platform_limits_posix.h | 15 +--
+ 3 files changed, 14 insertions(+), 20 deletions(-)
+
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
 b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -1156,12 +1156,9 @@ CHECK_SIZE_AND_OFFSET(ipc_perm, uid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, gid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cuid);
+ CHECK_SIZE_AND_OFFSET(ipc_perm, cgid);
+-#if (!defined(__aarch64__) || !SANITIZER_LINUX || __GLIBC_PREREQ (2, 21)) && \
+-!defined(__arm__)
+-/* On aarch64 glibc 2.20 and earlier provided incorrect mode field.  */
+-/* On Arm glibc 2.31 and later provide a different mode field, this field is
+-   never used by libsanitizer so we can simply ignore this assert for all 
glibc
+-   versions.  */
++#if !SANITIZER_LINUX || __GLIBC_PREREQ (2, 31)
++/* glibc 2.30 and earlier provided 16-bit mode field instead of 32-bit
++   on many architectures.  */
+ CHECK_SIZE_AND_OFFSET(ipc_perm, mode);
+ #endif
+ 
+diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h 
b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+index 73af92af1e8..6a673a7c995 100644
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
 b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -211,26 +211,13 @@ namespace __sanitizer {
+ u64 __unused1;
+ u64 __unused2;
+ #elif defined(__sparc__)
+-#if 

[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2020-02-06 Thread Sergei Trofimovich
commit: 38039a107e4ac09fc34d9433dfe2fba9a20e1b92
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Thu Feb  6 19:22:55 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Thu Feb  6 19:22:55 2020 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=38039a10

9.2.0: pull in PR88879 (negative insn cost), bug #707958

Single new upstream patch 34_all_ia64-neg-insn-cost.patch
to allow zstd to build successfully.

Reported-by: Matt Turner
Closes: https://bugs.gentoo.org/707958
Bug: https://gcc.gnu.org/PR88879
Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/34_all_ia64-neg-insn-cost.patch | 29 
 9.2.0/gentoo/README.history  |  3 +++
 2 files changed, 32 insertions(+)

diff --git a/9.2.0/gentoo/34_all_ia64-neg-insn-cost.patch 
b/9.2.0/gentoo/34_all_ia64-neg-insn-cost.patch
new file mode 100644
index 000..7a6bebd
--- /dev/null
+++ b/9.2.0/gentoo/34_all_ia64-neg-insn-cost.patch
@@ -0,0 +1,29 @@
+https://bugs.gentoo.org/707958
+https://gcc.gnu.org/PR88879
+
+Subject: [PATCH] sel-sched: allow negative insn priority (PR 88879)
+From: Alexander Monakov 
+
+   PR rtl-optimization/88879
+   * sel-sched.c (sel_target_adjust_priority): Remove assert.
+
+From-SVN: r271039
+---
+ gcc/ChangeLog   | 5 +
+ gcc/sel-sched.c | 2 --
+ 2 files changed, 5 insertions(+), 2 deletions(-)
+
+--- a/gcc/sel-sched.c
 b/gcc/sel-sched.c
+@@ -3331,8 +3331,6 @@ sel_target_adjust_priority (expr_t expr)
+   else
+ new_priority = priority;
+ 
+-  gcc_assert (new_priority >= 0);
+-
+   /* If the priority has changed, adjust EXPR_PRIORITY_ADJ accordingly.  */
+   EXPR_PRIORITY_ADJ (expr) = new_priority - EXPR_PRIORITY (expr);
+ 
+-- 
+2.25.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 3324fed..0ac54f3 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+5  TODO
+   + 34_all_ia64-neg-insn-cost.patch
+
 4  22 Dec 2012
+ 31_all_openmp-for-SEGV.patch
+ 27_all_sparc-PIC-constant-PR91472.patch



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2019-12-22 Thread Sergei Trofimovich
commit: 35beff919bc59076c5c1aa549e04d8119c559261
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sun Dec 22 11:07:00 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sun Dec 22 11:07:00 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=35beff91

9.2.0: cut 4 patchset

4 new patches:
- 27_all_sparc-PIC-constant-PR91472.patch: fix PIC register alocation
  (bug detected by gmp test suite)
- 31_all_openmp-for-SEGV.patch: fix opemnmp for loop condition folding
- 32_all_sparc-PIC-constant-part2.patch: fix PIC register allocation
  (bug detected by python regressin)
- 33_all_extend-lifetime.patch: fix lifetime extension on ':?' operator
  (bug detected by firefox LTO build

Bug: https://gcc.gnu.org/PR91472
Bug: https://bugs.gentoo.org/699938
Bug: https://gcc.gnu.org/PR92504
Bug: https://bugs.gentoo.org/697708
Bug: https://gcc.gnu.org/PR92095
Bug: https://bugs.gentoo.org/701866
Bug: https://gcc.gnu.org/PR92831
Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/README.history | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 3535536..3324fed 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-4  TODO
+4  22 Dec 2012
+ 31_all_openmp-for-SEGV.patch
+ 27_all_sparc-PIC-constant-PR91472.patch
+ 32_all_sparc-PIC-constant-part2.patch



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2019-12-21 Thread Sergei Trofimovich
commit: ba1c1c9ab955b533393e343bdfd8a0e7d7650639
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sun Dec 22 00:04:55 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sun Dec 22 00:04:55 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ba1c1c9a

9.2.0: backport PR92831 (':?' lifetime extension)

It's a backport of upstream commit 59693b226e245aeb99.

Bug: https://gcc.gnu.org/PR92831
Bug: https://bugs.gentoo.org/701866
Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/33_all_extend-lifetime.patch | 240 ++
 9.2.0/gentoo/README.history   |   1 +
 2 files changed, 241 insertions(+)

diff --git a/9.2.0/gentoo/33_all_extend-lifetime.patch 
b/9.2.0/gentoo/33_all_extend-lifetime.patch
new file mode 100644
index 000..520d491
--- /dev/null
+++ b/9.2.0/gentoo/33_all_extend-lifetime.patch
@@ -0,0 +1,240 @@
+https://github.com/gcc-mirror/gcc/commit/59693b226e245aeb991ab2275a9c37d35da1191b.patch
+https://bugs.gentoo.org/701866
+
+From 59693b226e245aeb991ab2275a9c37d35da1191b Mon Sep 17 00:00:00 2001
+From: jakub 
+Date: Fri, 20 Dec 2019 17:37:45 +
+Subject: [PATCH]   Backported from mainline2019-12-06  Jakub
+ Jelinek  
+
+   PR c++/92831 - CWG 1299, not extending temporary lifetime for ?:
+   * cp-tree.h (extend_ref_init_temps): Add a new argument with NULL
+   default arg.
+   * call.c (set_up_extended_ref_temp): Add COND_GUARD argument, pass it
+   down to extend_ref_init_temps.  Before pushing cleanup, if COND_GUARD
+   is non-NULL, create a bool temporary if needed, initialize to false
+   and guard the cleanup with the temporary being true.
+   (extend_ref_init_temps_1): Add COND_GUARD argument, pass it down
+   to recursive calls and set_up_extended_ref_temp.  Handle COND_EXPR.
+   (extend_ref_init_temps): Add COND_GUARD argument, pass it down to
+   recursive calls and to extend_ref_init_temps_1.
+
+   * g++.dg/cpp0x/temp-extend2.C: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@279669 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/cp/call.c | 83 +++
+ gcc/cp/cp-tree.h  |  4 +-
+ gcc/testsuite/g++.dg/cpp0x/temp-extend2.C | 36 ++
+ 5 files changed, 129 insertions(+), 13 deletions(-)
+ create mode 100644 gcc/testsuite/g++.dg/cpp0x/temp-extend2.C
+
+--- a/gcc/cp/call.c
 b/gcc/cp/call.c
+@@ -11449,7 +11449,7 @@ make_temporary_var_for_ref_to_temp (tree decl, tree 
type)
+ 
+ static tree
+ set_up_extended_ref_temp (tree decl, tree expr, vec **cleanups,
+-tree *initp)
++tree *initp, tree *cond_guard)
+ {
+   tree init;
+   tree type;
+@@ -11480,7 +11480,8 @@ set_up_extended_ref_temp (tree decl, tree expr, 
vec **cleanups,
+ 
+   /* Recursively extend temps in this initializer.  */
+   TARGET_EXPR_INITIAL (expr)
+-= extend_ref_init_temps (decl, TARGET_EXPR_INITIAL (expr), cleanups);
++= extend_ref_init_temps (decl, TARGET_EXPR_INITIAL (expr), cleanups,
++   cond_guard);
+ 
+   /* Any reference temp has a non-trivial initializer.  */
+   DECL_NONTRIVIALLY_INITIALIZED_P (var) = true;
+@@ -11521,7 +11522,29 @@ set_up_extended_ref_temp (tree decl, tree expr, 
vec **cleanups,
+   {
+ tree cleanup = cxx_maybe_build_cleanup (var, tf_warning_or_error);
+ if (cleanup)
+-  vec_safe_push (*cleanups, cleanup);
++  {
++if (cond_guard && cleanup != error_mark_node)
++  {
++if (*cond_guard == NULL_TREE)
++  {
++*cond_guard = build_decl (input_location, VAR_DECL,
++  NULL_TREE, boolean_type_node);
++DECL_ARTIFICIAL (*cond_guard) = 1;
++DECL_IGNORED_P (*cond_guard) = 1;
++DECL_CONTEXT (*cond_guard) = current_function_decl;
++layout_decl (*cond_guard, 0);
++add_decl_expr (*cond_guard);
++tree set = cp_build_modify_expr (UNKNOWN_LOCATION,
++ *cond_guard, NOP_EXPR,
++ boolean_false_node,
++ tf_warning_or_error);
++finish_expr_stmt (set);
++  }
++cleanup = build3 (COND_EXPR, void_type_node,
++  *cond_guard, cleanup, NULL_TREE);
++  }
++vec_safe_push (*cleanups, cleanup);
++  }
+   }
+ 
+   /* We must be careful to destroy the temporary only
+@@ -11626,7 +11649,8 @@ initialize_reference (tree type, tree expr,
+which is bound either to a reference or a std::initializer_list.  */
+ 
+ static tree

[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2019-11-19 Thread Sergei Trofimovich
commit: 6b896455828ae89e5aa2220493cc224fae315290
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Wed Nov 20 07:27:13 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Wed Nov 20 07:27:13 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6b896455

9.2.0: fix gmp test suite failures, take 2

Two new patches:
+ 27_all_sparc-PIC-constant-PR91472.patch: fix gmp test failure
+ 32_all_sparc-PIC-constant-part2.patch: fix PIC register initialization

Bug: https://gcc.gnu.org/PR91472
Bug: https://gcc.gnu.org/PR92095
Bug: https://bugs.gentoo.org/697708
Signed-off-by: Sergei Trofimovich  gentoo.org>

 .../gentoo/27_all_sparc-PIC-constant-PR91472.patch |  83 ++
 9.2.0/gentoo/32_all_sparc-PIC-constant-part2.patch | 310 +
 9.2.0/gentoo/README.history|   2 +
 3 files changed, 395 insertions(+)

diff --git a/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch 
b/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch
new file mode 100644
index 000..aeacdde
--- /dev/null
+++ b/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch
@@ -0,0 +1,83 @@
+https://gcc.gnu.org/PR91472
+Fix gmp test suite failrues.
+
+From 0a09a00c87081e0a8d1d382b33bb0b1ec03875e7 Mon Sep 17 00:00:00 2001
+From: ebotcazou 
+Date: Sun, 1 Sep 2019 12:55:22 +
+Subject: [PATCH]   PR target/91472 * config/sparc/sparc.c
+ (sparc_cannot_force_const_mem): Return true   during LRA/reload in PIC mode
+ if the PIC register hasn't been used yet. (sparc_pic_register_p): Test
+ reload_in_progress for consistency's sake.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275270 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/sparc/sparc.c  |  9 -
+ .../gcc.c-torture/execute/20190901-1.c| 36 +++
+
+--- a/gcc/config/sparc/sparc.c
 b/gcc/config/sparc/sparc.c
+@@ -4201,6 +4201,13 @@ eligible_for_sibcall_delay (rtx_insn *trial)
+ static bool
+ sparc_cannot_force_const_mem (machine_mode mode, rtx x)
+ {
++  /* After IRA has run in PIC mode, it is too late to put anything into the
++ constant pool if the PIC register hasn't already been initialized.  */
++  if ((lra_in_progress || reload_in_progress)
++  && flag_pic
++  && !crtl->uses_pic_offset_table)
++return true;
++
+   switch (GET_CODE (x))
+ {
+ case CONST_INT:
+@@ -4450,7 +4457,7 @@ sparc_pic_register_p (rtx x)
+ return true;
+ 
+   if (!HARD_REGISTER_P (pic_offset_table_rtx)
+-  && (HARD_REGISTER_P (x) || lra_in_progress)
++  && (HARD_REGISTER_P (x) || lra_in_progress || reload_in_progress)
+   && ORIGINAL_REGNO (x) == REGNO (pic_offset_table_rtx))
+ return true;
+ 
+--- /dev/null
 b/gcc/testsuite/gcc.c-torture/execute/20190901-1.c
+@@ -0,0 +1,36 @@
++/* PR target/91472 */
++/* Reported by John Paul Adrian Glaubitz  */
++
++typedef unsigned int gmp_uint_least32_t;
++
++union ieee_double_extract
++{
++  struct
++{
++  gmp_uint_least32_t sig:1;
++  gmp_uint_least32_t exp:11;
++  gmp_uint_least32_t manh:20;
++  gmp_uint_least32_t manl:32;
++} s;
++  double d;
++};
++
++double __attribute__((noipa))
++tests_infinity_d (void)
++{
++  union ieee_double_extract x;
++  x.s.exp = 2047;
++  x.s.manl = 0;
++  x.s.manh = 0;
++  x.s.sig = 0;
++  return x.d;
++}
++
++int
++main (void)
++{
++  double x = tests_infinity_d ();
++  if (x == 0.0)
++__builtin_abort ();
++  return 0;
++}
+-- 
+2.23.0
+

diff --git a/9.2.0/gentoo/32_all_sparc-PIC-constant-part2.patch 
b/9.2.0/gentoo/32_all_sparc-PIC-constant-part2.patch
new file mode 100644
index 000..b054f97
--- /dev/null
+++ b/9.2.0/gentoo/32_all_sparc-PIC-constant-part2.patch
@@ -0,0 +1,310 @@
+https://gcc.gnu.org/PR92095
+https://bugs.gentoo.org/697708
+
+
+From 1a839ffee6ffae07948055a81051fad05a8c0b30 Mon Sep 17 00:00:00 2001
+From: ebotcazou 
+Date: Fri, 8 Nov 2019 12:33:48 +
+Subject: [PATCH]   PR target/92095 * config/sparc/sparc-protos.h
+ (output_load_pcrel_sym): Declare. * config/sparc/sparc.c
+ (sparc_cannot_force_const_mem): Revert latest change. 
+ (got_helper_needed): New static variable. (output_load_pcrel_sym): New
+ function. (get_pc_thunk_name): Remove after inlining... 
+ (load_got_register): ...here.  Rework the initialization of the GOT 
+ register and of the GOT helper.   (save_local_or_in_reg_p): Test the
+ REGNO of the GOT register.(sparc_file_end): Test got_helper_needed to
+ decide whether the GOThelper must be emitted.  Use output_asm_insn
+ instead of fprintf.   (sparc_init_pic_reg): In PIC mode, always initialize
+ the PIC register  if optimization is enabled. *
+ config/sparc/sparc.md (load_pcrel_sym): Emit the assembly by
+ calling output_load_pcrel_sym.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@277967 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/sparc/sparc-protos.h   |   1 +
+ 

[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2019-11-19 Thread Sergei Trofimovich
commit: e9c37fb661aed82754e6fd374457a88d697e3091
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Tue Nov 19 22:55:04 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Tue Nov 19 22:55:04 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=e9c37fb6

9.2.0: backport openmp for loop SIGSEGV fix

Reported-by: Marc Vinyals
Bug: https://gcc.gnu.org/PR92504
Bug: https://bugs.gentoo.org/699938
Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/31_all_openmp-for-SEGV.patch | 62 +++
 9.2.0/gentoo/README.history   |  3 ++
 2 files changed, 65 insertions(+)

diff --git a/9.2.0/gentoo/31_all_openmp-for-SEGV.patch 
b/9.2.0/gentoo/31_all_openmp-for-SEGV.patch
new file mode 100644
index 000..a9399ca
--- /dev/null
+++ b/9.2.0/gentoo/31_all_openmp-for-SEGV.patch
@@ -0,0 +1,62 @@
+https://gcc.gnu.org/PR92504
+https://bugs.gentoo.org/699938
+
+From 5bf4317d82f5cb4c7360e6c9e5cbe8fa577583a3 Mon Sep 17 00:00:00 2001
+From: jakub 
+Date: Tue, 19 Nov 2019 08:52:31 +
+Subject: [PATCH]   PR c++/92504* semantics.c
+ (handle_omp_for_class_iterator): Don't call   cp_fully_fold on cond.
+
+   * g++.dg/gomp/pr92504.C: New test.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@278433 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/cp/semantics.c  |  1 -
+ gcc/testsuite/g++.dg/gomp/pr92504.C | 29 +
+
+--- a/gcc/cp/semantics.c
 b/gcc/cp/semantics.c
+@@ -8434,7 +8434,6 @@ handle_omp_for_class_iterator (int i, location_t locus, 
enum tree_code code,
+   if (init && EXPR_HAS_LOCATION (init))
+ elocus = EXPR_LOCATION (init);
+ 
+-  cond = cp_fully_fold (cond);
+   switch (TREE_CODE (cond))
+ {
+ case GT_EXPR:
+--- /dev/null
 b/gcc/testsuite/g++.dg/gomp/pr92504.C
+@@ -0,0 +1,29 @@
++// PR c++/92504
++// { dg-do compile { target c++11 } }
++// { dg-additional-options "-O2" }
++
++namespace std {
++  typedef __SIZE_TYPE__ size_t;
++  typedef __PTRDIFF_TYPE__ ptrdiff_t;
++}
++
++struct A {
++  A ();
++  A (const A &);
++  A & operator++ ();
++  bool operator != (const A &) const;
++  std::ptrdiff_t operator - (const A &);
++  A & operator += (std::size_t);
++  int a;
++  A & begin ();
++  A & end (); // { dg-message "declared here" }
++};
++
++void
++bar ()
++{
++  A a;
++  #pragma omp for
++  for (auto b = a; b != a.end; ++b)   // { dg-error "invalid use of 
non-static member function" }
++;
++}
+-- 
+2.24.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 4f182e3..09ae269 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+4  TODO
+   + 31_all_openmp-for-SEGV.patch
+
 3  04 Nov 2019
+ 30_all_arm64-march-native.patch
- 27_all_sparc-PIC-constant-PR91472.patch



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2019-11-04 Thread Sergei Trofimovich
commit: af8edf96ed0717a820a0c38202eb94de54bc2c83
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Mon Nov  4 08:28:24 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Mon Nov  4 08:28:24 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=af8edf96

9.2.0: cut 3 patchset

New patch:
+ 30_all_arm64-march-native.patch: fix -march= ordering handling on arm64

Dropped patch:
- 27_all_sparc-PIC-constant-PR91472.patch: restore python codegen on sparc

Bug: https://bugs.gentoo.org/697708
Bug: https://bugs.gentoo.org/695420
Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/README.history | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 95c018c..4f182e3 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-3  TODO
+3  04 Nov 2019
+ 30_all_arm64-march-native.patch
- 27_all_sparc-PIC-constant-PR91472.patch
 



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2019-11-04 Thread Sergei Trofimovich
commit: 01a86d6fd8497feb5459f4f66a8836a8fae2f5a7
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Mon Nov  4 08:21:50 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Mon Nov  4 08:21:50 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=01a86d6f

9.2.0: drop 27_all_sparc-PIC-constant-PR91472.patch

PR91472 fixed obscure code generation bug on gmp testsuite but
introduced gcc regression in compiling python.

Let's revert the fix. It will break gmp tests on sparc again
but at least restore python building.

Reported-by: Rolf Eike Beer
Bug: https://bugs.gentoo.org/697708
Bug: https://gcc.gnu.org/PR92095
Signed-off-by: Sergei Trofimovich  gentoo.org>

 .../gentoo/27_all_sparc-PIC-constant-PR91472.patch | 83 --
 9.2.0/gentoo/README.history|  1 +
 2 files changed, 1 insertion(+), 83 deletions(-)

diff --git a/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch 
b/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch
deleted file mode 100644
index aeacdde..000
--- a/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch
+++ /dev/null
@@ -1,83 +0,0 @@
-https://gcc.gnu.org/PR91472
-Fix gmp test suite failrues.
-
-From 0a09a00c87081e0a8d1d382b33bb0b1ec03875e7 Mon Sep 17 00:00:00 2001
-From: ebotcazou 
-Date: Sun, 1 Sep 2019 12:55:22 +
-Subject: [PATCH]   PR target/91472 * config/sparc/sparc.c
- (sparc_cannot_force_const_mem): Return true   during LRA/reload in PIC mode
- if the PIC register hasn't been used yet. (sparc_pic_register_p): Test
- reload_in_progress for consistency's sake.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275270 
138bc75d-0d04-0410-961f-82ee72b054a4

- gcc/config/sparc/sparc.c  |  9 -
- .../gcc.c-torture/execute/20190901-1.c| 36 +++
-
 a/gcc/config/sparc/sparc.c
-+++ b/gcc/config/sparc/sparc.c
-@@ -4201,6 +4201,13 @@ eligible_for_sibcall_delay (rtx_insn *trial)
- static bool
- sparc_cannot_force_const_mem (machine_mode mode, rtx x)
- {
-+  /* After IRA has run in PIC mode, it is too late to put anything into the
-+ constant pool if the PIC register hasn't already been initialized.  */
-+  if ((lra_in_progress || reload_in_progress)
-+  && flag_pic
-+  && !crtl->uses_pic_offset_table)
-+return true;
-+
-   switch (GET_CODE (x))
- {
- case CONST_INT:
-@@ -4450,7 +4457,7 @@ sparc_pic_register_p (rtx x)
- return true;
- 
-   if (!HARD_REGISTER_P (pic_offset_table_rtx)
--  && (HARD_REGISTER_P (x) || lra_in_progress)
-+  && (HARD_REGISTER_P (x) || lra_in_progress || reload_in_progress)
-   && ORIGINAL_REGNO (x) == REGNO (pic_offset_table_rtx))
- return true;
- 
 /dev/null
-+++ b/gcc/testsuite/gcc.c-torture/execute/20190901-1.c
-@@ -0,0 +1,36 @@
-+/* PR target/91472 */
-+/* Reported by John Paul Adrian Glaubitz  */
-+
-+typedef unsigned int gmp_uint_least32_t;
-+
-+union ieee_double_extract
-+{
-+  struct
-+{
-+  gmp_uint_least32_t sig:1;
-+  gmp_uint_least32_t exp:11;
-+  gmp_uint_least32_t manh:20;
-+  gmp_uint_least32_t manl:32;
-+} s;
-+  double d;
-+};
-+
-+double __attribute__((noipa))
-+tests_infinity_d (void)
-+{
-+  union ieee_double_extract x;
-+  x.s.exp = 2047;
-+  x.s.manl = 0;
-+  x.s.manh = 0;
-+  x.s.sig = 0;
-+  return x.d;
-+}
-+
-+int
-+main (void)
-+{
-+  double x = tests_infinity_d ();
-+  if (x == 0.0)
-+__builtin_abort ();
-+  return 0;
-+}
--- 
-2.23.0
-

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index cbeef2d..95c018c 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,5 +1,6 @@
 3  TODO
+ 30_all_arm64-march-native.patch
+   - 27_all_sparc-PIC-constant-PR91472.patch
 
 2  22 Sep 2019
+ 27_all_sparc-PIC-constant-PR91472.patch



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2019-09-26 Thread Sergei Trofimovich
commit: f1aedb7402ea1a0dec4d02e85fe7a3889c41f249
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Thu Sep 26 22:05:42 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Thu Sep 26 22:05:42 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f1aedb74

9.2.0: backport arm64 -march=native precedence handling, bug #695420

Reported-by: Aaron Bauman
Bug: https://bugs.gentoo.org/695420
Bug: https://gcc.gnu.org/PR69471#c13
Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/30_all_arm64-march-native.patch | 90 
 9.2.0/gentoo/README.history  |  3 +
 2 files changed, 93 insertions(+)

diff --git a/9.2.0/gentoo/30_all_arm64-march-native.patch 
b/9.2.0/gentoo/30_all_arm64-march-native.patch
new file mode 100644
index 000..0fb6f76
--- /dev/null
+++ b/9.2.0/gentoo/30_all_arm64-march-native.patch
@@ -0,0 +1,90 @@
+https://bugs.gentoo.org/695420
+https://gcc.gnu.org/PR69471#c13
+
+From 537fd9d4dcaed8dae6248ec22a50603a591a3752 Mon Sep 17 00:00:00 2001
+From: ktkachov 
+Date: Thu, 26 Sep 2019 10:52:42 +
+Subject: [PATCH] driver: Also prune joined switches with negation
+
+When -march=native is passed to host_detect_local_cpu to the backend,
+it overrides all command lines after it.  That means
+
+$ gcc -march=native -march=armv8-a
+
+is treated as
+
+$ gcc -march=armv8-a -march=native
+
+Prune joined switches with Negative and RejectNegative to allow
+-march=armv8-a to override previous -march=native on command-line.
+
+This is the same fix as was applied for i386 in SVN revision 269164 but for
+aarch64 and arm.
+
+2019-09-26  Matt Turner  
+
+   PR driver/69471
+   * config/aarch64/aarch64.opt (march=): Add Negative(march=).
+   (mtune=): Add Negative(mtune=).
+   (mcpu=): Add Negative(mcpu=).
+   * config/arm/arm.opt: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@276148 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/aarch64/aarch64.opt | 6 +++---
+ gcc/config/arm/arm.opt | 6 +++---
+
+--- a/gcc/config/aarch64/aarch64.opt
 b/gcc/config/aarch64/aarch64.opt
+@@ -119,15 +119,15 @@ EnumValue
+ Enum(aarch64_tls_size) String(48) Value(48)
+ 
+ march=
+-Target RejectNegative ToLower Joined Var(aarch64_arch_string)
++Target RejectNegative Negative(march=) ToLower Joined Var(aarch64_arch_string)
+ Use features of architecture ARCH.
+ 
+ mcpu=
+-Target RejectNegative ToLower Joined Var(aarch64_cpu_string)
++Target RejectNegative Negative(mcpu=) ToLower Joined Var(aarch64_cpu_string)
+ Use features of and optimize for CPU.
+ 
+ mtune=
+-Target RejectNegative ToLower Joined Var(aarch64_tune_string)
++Target RejectNegative Negative(mtune=) ToLower Joined Var(aarch64_tune_string)
+ Optimize for CPU.
+ 
+ mabi=
+--- a/gcc/config/arm/arm.opt
 b/gcc/config/arm/arm.opt
+@@ -82,7 +82,7 @@ mapcs-stack-check
+ Target Report Mask(APCS_STACK) Undocumented
+ 
+ march=
+-Target RejectNegative ToLower Joined Var(arm_arch_string)
++Target RejectNegative Negative(march=) ToLower Joined Var(arm_arch_string)
+ Specify the name of the target architecture.
+ 
+ ; Other arm_arch values are loaded from arm-tables.opt
+@@ -107,7 +107,7 @@ Target Report Mask(CALLER_INTERWORKING)
+ Thumb: Assume function pointers may go to non-Thumb aware code.
+ 
+ mcpu=
+-Target RejectNegative ToLower Joined Var(arm_cpu_string)
++Target RejectNegative Negative(mcpu=) ToLower Joined Var(arm_cpu_string)
+ Specify the name of the target CPU.
+ 
+ mfloat-abi=
+@@ -232,7 +232,7 @@ Target Report Mask(TPCS_LEAF_FRAME)
+ Thumb: Generate (leaf) stack frames even if not needed.
+ 
+ mtune=
+-Target RejectNegative ToLower Joined Var(arm_tune_string)
++Target RejectNegative Negative(mtune=) ToLower Joined Var(arm_tune_string)
+ Tune code for the given processor.
+ 
+ mprint-tune-info
+-- 
+2.23.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index a2cbd76..cbeef2d 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+3  TODO
+   + 30_all_arm64-march-native.patch
+
 2  22 Sep 2019
+ 27_all_sparc-PIC-constant-PR91472.patch
+ 28_all_sparc-fpu-subregs-91269.patch



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2019-09-22 Thread Sergei Trofimovich
commit: 609cee1b4c3a179da56be7ae5cae8564fbf086c7
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sun Sep 22 09:10:39 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sun Sep 22 09:10:39 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=609cee1b

9.2.0: cut 2 patchset

3 new backports:
+ 27_all_sparc-PIC-constant-PR91472.patch: fix -fPIE sparc codegen
+ 28_all_sparc-fpu-subregs-91269.patch: fix another -fPIE sparc codegen
+ 29_all_mips_split_move-SEGV.patch: fix crashes on mips16 code

Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/README.history | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 079fbf1..a2cbd76 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,4 +1,4 @@
-2  TODO
+2  22 Sep 2019
+ 27_all_sparc-PIC-constant-PR91472.patch
+ 28_all_sparc-fpu-subregs-91269.patch
+ 29_all_mips_split_move-SEGV.patch



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2019-09-20 Thread Sergei Trofimovich
commit: 0d735eed5eb8d1e0fc7948719e682a3110193e52
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Fri Sep 20 23:44:17 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Fri Sep 20 23:44:17 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=0d735eed

9.2.0: backport https://gcc.gnu.org/PR91702 (ICE on mips16 code)

Bug: https://gcc.gnu.org/PR91702
Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/29_all_mips_split_move-SEGV.patch | 47 ++
 9.2.0/gentoo/README.history|  1 +
 2 files changed, 48 insertions(+)

diff --git a/9.2.0/gentoo/29_all_mips_split_move-SEGV.patch 
b/9.2.0/gentoo/29_all_mips_split_move-SEGV.patch
new file mode 100644
index 000..dc154e9
--- /dev/null
+++ b/9.2.0/gentoo/29_all_mips_split_move-SEGV.patch
@@ -0,0 +1,47 @@
+https://gcc.gnu.org/PR91702
+
+From d57faea9337ad595d005687247c3322252f70ba1 Mon Sep 17 00:00:00 2001
+From: rsandifo 
+Date: Sun, 7 Jul 2019 09:49:14 +
+Subject: [PATCH] Fix uninitialised use in mips_split_move
+
+While testing the fix for PR91068, I hit an rtl checking failure
+while building newlib.  mips_split_move was decomposing an address that
+happened to be symbolic and then tried to access the REGNO of the base
+register field, which wasn't initialised but which by chance pointed to
+valid memory.
+
+2019-07-07  Richard Sandiford  
+
+gcc/
+   * config/mips/mips.c (mips_split_move): Zero-initialize addr
+   and check whether addr.reg is nonnull before using it.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@273174 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/mips/mips.c | 4 ++--
+
+--- a/gcc/config/mips/mips.c
 b/gcc/config/mips/mips.c
+@@ -4849,7 +4849,7 @@ mips_split_move (rtx dest, rtx src, enum mips_split_type 
split_type, rtx insn_)
+  can forward SRC for DEST.  This is most useful if the next insn is a
+  simple store.   */
+   rtx_insn *insn = (rtx_insn *)insn_;
+-  struct mips_address_info addr;
++  struct mips_address_info addr = {};
+   if (insn)
+ {
+   rtx_insn *next = next_nonnote_nondebug_insn_bb (insn);
+@@ -4862,7 +4862,7 @@ mips_split_move (rtx dest, rtx src, enum mips_split_type 
split_type, rtx insn_)
+   {
+ rtx tmp = XEXP (src, 0);
+ mips_classify_address (, tmp, GET_MODE (tmp), true);
+-if (REGNO (addr.reg) != REGNO (dest))
++if (addr.reg && REGNO (addr.reg) != REGNO (dest))
+   validate_change (next, _SRC (set), src, false);
+   }
+ else
+-- 
+2.23.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index 37c8298..079fbf1 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,6 +1,7 @@
 2  TODO
+ 27_all_sparc-PIC-constant-PR91472.patch
+ 28_all_sparc-fpu-subregs-91269.patch
+   + 29_all_mips_split_move-SEGV.patch
 
 1  12 Aug 2019
+ 01_all_default-fortify-source.patch



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2019-09-20 Thread Sergei Trofimovich
commit: f762cf0401bbf5efc86031ba284338c0fb74023d
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Fri Sep 20 21:49:00 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Fri Sep 20 21:49:00 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f762cf04

9.2.0: packport PR91269 (sparc subreg regression)

Bug: https://gcc.gnu.org/PR91269
Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/28_all_sparc-fpu-subregs-91269.patch | 105 ++
 9.2.0/gentoo/README.history   |   1 +
 2 files changed, 106 insertions(+)

diff --git a/9.2.0/gentoo/28_all_sparc-fpu-subregs-91269.patch 
b/9.2.0/gentoo/28_all_sparc-fpu-subregs-91269.patch
new file mode 100644
index 000..e21d07d
--- /dev/null
+++ b/9.2.0/gentoo/28_all_sparc-fpu-subregs-91269.patch
@@ -0,0 +1,105 @@
+https://gcc.gnu.org/PR91269
+
+From bebaf06774baca584c7e9f8410d0e49606a11d60 Mon Sep 17 00:00:00 2001
+From: ebotcazou 
+Date: Fri, 20 Sep 2019 09:42:40 +
+Subject: [PATCH]   PR target/91269 * config/sparc/sparc.h
+ (HARD_REGNO_CALLER_SAVE_MODE): Define.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275994 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/sparc/sparc.h   |  7 
+ gcc/testsuite/gcc.dg/pr91269.c | 70 ++
+
+--- a/gcc/config/sparc/sparc.h
 b/gcc/config/sparc/sparc.h
+@@ -711,6 +711,13 @@ along with GCC; see the file COPYING3.  If not see
+register window instruction in the prologue.  */
+ #define HARD_REGNO_RENAME_OK(FROM, TO) ((FROM) != 1)
+ 
++/* Select a register mode required for caller save of hard regno REGNO.
++   Contrary to what is documented, the default is not the smallest suitable
++   mode but the largest suitable mode for the given (REGNO, NREGS) pair and
++   it quickly creates paradoxical subregs that can be problematic.  */
++#define HARD_REGNO_CALLER_SAVE_MODE(REGNO, NREGS, MODE) \
++  ((MODE) == VOIDmode ? choose_hard_reg_mode (REGNO, NREGS, false) : (MODE))
++
+ /* Specify the registers used for certain standard purposes.
+The values of these macros are register numbers.  */
+ 
+--- /dev/null
 b/gcc/testsuite/gcc.dg/pr91269.c
+@@ -0,0 +1,70 @@
++/* PR target/91269 */
++/* Testcase by Sergei Trofimovich  */
++
++/* { dg-do assemble } */
++/* { dg-options "-O2 -Wno-int-conversion" }  */
++/* { dg-additional-options "-fcall-used-g6 -fPIE -mcpu=niagara4" { target 
sparc*-*-* } } */
++
++struct m;
++
++enum { a = 2 };
++int b[1];
++int d[2715];
++int e, f, h;
++enum { i = 2 } j;
++inline int c(int k) {
++  char *cp;
++  if (k >= 62 && k <= 247)
++cp = b[k];
++  if (cp)
++return 65533;
++  return 2;
++}
++inline int g(int k) {
++  if (k < sizeof(d))
++return e;
++  return 0;
++}
++
++int u(struct m*, char*, char*);
++
++int l(struct m *k, char n, long o, int *p) {
++  int q, flags = j, r, s, lasttwo = *p;
++  char inptr, outptr;
++  while (inptr) {
++if (__builtin_expect(h, 0))
++  break;
++unsigned ch = inptr;
++if (lasttwo) {
++  long need = lasttwo >> 3;
++  if (__builtin_expect(need > n, 0))
++break;
++} else if (s == i) {
++  long t = c(ch);
++  if (t != 65533) {
++int jch = g(ch);
++if (jch & 8)
++  continue;
++  }
++}
++if (ch <= 5)
++  ;
++else {
++  long t = c(ch);
++  if (t != 65533)
++;
++  else {
++switch (f >> 8)
++case 79:
++  q = f == 20308 || f == 20350;
++if (q)
++  if (j)
++r = u(k, , );
++s = *p;
++if (r)
++  if (o && flags & a)
++break;
++  }
++}
++  }
++}
+-- 
+2.23.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index c34d76c..37c8298 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,5 +1,6 @@
 2  TODO
+ 27_all_sparc-PIC-constant-PR91472.patch
+   + 28_all_sparc-fpu-subregs-91269.patch
 
 1  12 Aug 2019
+ 01_all_default-fortify-source.patch



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2019-09-12 Thread Sergei Trofimovich
commit: 9bd463dc1be0f9cf00924b50767db97088237b1d
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Thu Sep 12 21:53:32 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Thu Sep 12 21:53:32 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=9bd463dc

9.2.0: backport 27_all_sparc-PIC-constant-PR91472.patch

Fix gmp test suite failures.

Bug: https://gcc.gnu.org/PR91472
Signed-off-by: Sergei Trofimovich  gentoo.org>

 .../gentoo/27_all_sparc-PIC-constant-PR91472.patch | 83 ++
 9.2.0/gentoo/README.history|  3 +
 2 files changed, 86 insertions(+)

diff --git a/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch 
b/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch
new file mode 100644
index 000..aeacdde
--- /dev/null
+++ b/9.2.0/gentoo/27_all_sparc-PIC-constant-PR91472.patch
@@ -0,0 +1,83 @@
+https://gcc.gnu.org/PR91472
+Fix gmp test suite failrues.
+
+From 0a09a00c87081e0a8d1d382b33bb0b1ec03875e7 Mon Sep 17 00:00:00 2001
+From: ebotcazou 
+Date: Sun, 1 Sep 2019 12:55:22 +
+Subject: [PATCH]   PR target/91472 * config/sparc/sparc.c
+ (sparc_cannot_force_const_mem): Return true   during LRA/reload in PIC mode
+ if the PIC register hasn't been used yet. (sparc_pic_register_p): Test
+ reload_in_progress for consistency's sake.
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@275270 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+ gcc/config/sparc/sparc.c  |  9 -
+ .../gcc.c-torture/execute/20190901-1.c| 36 +++
+
+--- a/gcc/config/sparc/sparc.c
 b/gcc/config/sparc/sparc.c
+@@ -4201,6 +4201,13 @@ eligible_for_sibcall_delay (rtx_insn *trial)
+ static bool
+ sparc_cannot_force_const_mem (machine_mode mode, rtx x)
+ {
++  /* After IRA has run in PIC mode, it is too late to put anything into the
++ constant pool if the PIC register hasn't already been initialized.  */
++  if ((lra_in_progress || reload_in_progress)
++  && flag_pic
++  && !crtl->uses_pic_offset_table)
++return true;
++
+   switch (GET_CODE (x))
+ {
+ case CONST_INT:
+@@ -4450,7 +4457,7 @@ sparc_pic_register_p (rtx x)
+ return true;
+ 
+   if (!HARD_REGISTER_P (pic_offset_table_rtx)
+-  && (HARD_REGISTER_P (x) || lra_in_progress)
++  && (HARD_REGISTER_P (x) || lra_in_progress || reload_in_progress)
+   && ORIGINAL_REGNO (x) == REGNO (pic_offset_table_rtx))
+ return true;
+ 
+--- /dev/null
 b/gcc/testsuite/gcc.c-torture/execute/20190901-1.c
+@@ -0,0 +1,36 @@
++/* PR target/91472 */
++/* Reported by John Paul Adrian Glaubitz  */
++
++typedef unsigned int gmp_uint_least32_t;
++
++union ieee_double_extract
++{
++  struct
++{
++  gmp_uint_least32_t sig:1;
++  gmp_uint_least32_t exp:11;
++  gmp_uint_least32_t manh:20;
++  gmp_uint_least32_t manl:32;
++} s;
++  double d;
++};
++
++double __attribute__((noipa))
++tests_infinity_d (void)
++{
++  union ieee_double_extract x;
++  x.s.exp = 2047;
++  x.s.manl = 0;
++  x.s.manh = 0;
++  x.s.sig = 0;
++  return x.d;
++}
++
++int
++main (void)
++{
++  double x = tests_infinity_d ();
++  if (x == 0.0)
++__builtin_abort ();
++  return 0;
++}
+-- 
+2.23.0
+

diff --git a/9.2.0/gentoo/README.history b/9.2.0/gentoo/README.history
index ae5ec16..c34d76c 100644
--- a/9.2.0/gentoo/README.history
+++ b/9.2.0/gentoo/README.history
@@ -1,3 +1,6 @@
+2  TODO
+   + 27_all_sparc-PIC-constant-PR91472.patch
+
 1  12 Aug 2019
+ 01_all_default-fortify-source.patch
+ 02_all_default-warn-format-security.patch



[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2019-08-12 Thread Sergei Trofimovich
commit: 39341b837bba83478e24f45804830a5c4c743245
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Tue Aug 13 00:13:23 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Tue Aug 13 00:13:23 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=39341b83

9.2.0: drop 27_all_hppa64-patchable-entry-90751.patch as well

27_all_hppa64-patchable-entry-90751.patch was backported to 9.2.0

Signed-off-by: Sergei Trofimovich  gentoo.org>

 .../27_all_hppa64-patchable-entry-90751.patch  | 120 -
 9.2.0/gentoo/README.history|   1 -
 2 files changed, 121 deletions(-)

diff --git a/9.2.0/gentoo/27_all_hppa64-patchable-entry-90751.patch 
b/9.2.0/gentoo/27_all_hppa64-patchable-entry-90751.patch
deleted file mode 100644
index d93fe0a..000
--- a/9.2.0/gentoo/27_all_hppa64-patchable-entry-90751.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-https://gcc.gnu.org/PR90751
-
-From 5df07cedc211b67011688e911db34ee18997eedf Mon Sep 17 00:00:00 2001
-From: danglin 
-Date: Fri, 7 Jun 2019 23:20:44 +
-Subject: [PATCH]   PR target/90751 * config/pa/pa-linux.h
- (ASM_DECLARE_FUNCTION_NAME): Update comment.  Call pa_output_function_label.
-   (TARGET_ASM_FUNCTION_PROLOGUE): define. *
- config/pa/pa-protos.h (pa_output_function_label): Declare.*
- config/pa/pa.c (pa_output_function_prologue): Add ATTRIBUTE_UNUSEDto
- declaration.  (pa_linux_output_function_prologue): Declare. 
- (TARGET_ASM_FUNCTION_PROLOGUE): Delete define. 
- (pa_output_function_label): New.  (pa_output_function_prologue): Revise
- to use pa_output_function_label.  (pa_linux_output_function_prologue):
- New.  * config/pa/pa.h (TARGET_ASM_FUNCTION_PROLOGUE): Define.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-9-branch@272061 
138bc75d-0d04-0410-961f-82ee72b054a4
 a/gcc/config/pa/pa-linux.h
-+++ b/gcc/config/pa/pa-linux.h
-@@ -109,9 +109,14 @@ along with GCC; see the file COPYING3.  If not see
- { \
-   ASM_OUTPUT_TYPE_DIRECTIVE (FILE, NAME, "function"); \
-   ASM_DECLARE_RESULT (FILE, DECL_RESULT (DECL));  \
-+  pa_output_function_label (FILE);\
- } \
-   while (0)
- 
-+/* Output function prologue for linux.  */
-+#undef TARGET_ASM_FUNCTION_PROLOGUE
-+#define TARGET_ASM_FUNCTION_PROLOGUE pa_linux_output_function_prologue
-+
- /* As well as globalizing the label, we need to encode the label
-to ensure a plabel is generated in an indirect call.  */
- 
 a/gcc/config/pa/pa-protos.h
-+++ b/gcc/config/pa/pa-protos.h
-@@ -108,6 +108,7 @@ extern void pa_asm_output_aligned_local (FILE *, const 
char *,
- extern void pa_hpux_asm_output_external (FILE *, tree, const char *);
- extern HOST_WIDE_INT pa_initial_elimination_offset (int, int);
- extern HOST_WIDE_INT pa_function_arg_size (machine_mode, const_tree);
-+extern void pa_output_function_label (FILE *);
- 
- extern const int pa_magic_milli[];
- 
 a/gcc/config/pa/pa.c
-+++ b/gcc/config/pa/pa.c
-@@ -118,7 +118,8 @@ static void set_reg_plus_d (int, int, HOST_WIDE_INT, int);
- static rtx pa_function_value (const_tree, const_tree, bool);
- static rtx pa_libcall_value (machine_mode, const_rtx);
- static bool pa_function_value_regno_p (const unsigned int);
--static void pa_output_function_prologue (FILE *);
-+static void pa_output_function_prologue (FILE *) ATTRIBUTE_UNUSED;
-+static void pa_linux_output_function_prologue (FILE *) ATTRIBUTE_UNUSED;
- static void update_total_code_bytes (unsigned int);
- static void pa_output_function_epilogue (FILE *);
- static int pa_adjust_cost (rtx_insn *, int, rtx_insn *, int, unsigned int);
-@@ -262,8 +263,6 @@ static size_t n_deferred_plabels = 0;
- #undef TARGET_ASM_INTEGER
- #define TARGET_ASM_INTEGER pa_assemble_integer
- 
--#undef TARGET_ASM_FUNCTION_PROLOGUE
--#define TARGET_ASM_FUNCTION_PROLOGUE pa_output_function_prologue
- #undef TARGET_ASM_FUNCTION_EPILOGUE
- #define TARGET_ASM_FUNCTION_EPILOGUE pa_output_function_epilogue
- 
-@@ -3842,16 +3841,10 @@ pa_compute_frame_size (poly_int64 size, int 
*fregs_live)
- & ~(PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT - 1));
- }
- 
--/* On HP-PA, move-double insns between fpu and cpu need an 8-byte block
--   of memory.  If any fpu reg is used in the function, we allocate
--   such a block here, at the bottom of the frame, just in case it's needed.
-+/* Output function label, and associated .PROC and .CALLINFO statements.  */
- 
--   If this function is a leaf procedure, then we may choose not
--   to do a "save" insn.  The decision about whether or not
--   to do this is made in regclass.c.  */
--
--static void
--pa_output_function_prologue (FILE *file)
-+void
-+pa_output_function_label (FILE *file)
- {
-   /* The function's label and associated .PROC must never be
-  separated and must be output 

[gentoo-commits] proj/gcc-patches:master commit in: 9.2.0/gentoo/

2019-08-12 Thread Sergei Trofimovich
commit: b2f1fe64d5b63950a9ca1b3e4306af3aeb05906c
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Mon Aug 12 19:36:37 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Mon Aug 12 19:36:37 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=b2f1fe64

9.2.0: cut initial patchset, a copy of 9.1.0 patches

Two upstreamed patches removed:
- 26_all_ipa-incomplete.patch
- 27_all_es-po.patch

Signed-off-by: Sergei Trofimovich  gentoo.org>

 9.2.0/gentoo/01_all_default-fortify-source.patch   |  22 
 .../02_all_default-warn-format-security.patch  |  22 
 9.2.0/gentoo/03_all_default-warn-trampolines.patch |  13 ++
 9.2.0/gentoo/04_all_default-ssp-fix.patch  |  38 ++
 9.2.0/gentoo/05_all_alpha-mieee-default.patch  |  39 ++
 9.2.0/gentoo/06_all_ia64_note.GNU-stack.patch  |  92 +
 .../gentoo/07_all_i386_libgcc_note.GNU-stack.patch |  54 
 9.2.0/gentoo/08_all_libiberty-asprintf.patch   |  18 +++
 9.2.0/gentoo/09_all_libiberty-pic.patch|  10 ++
 9.2.0/gentoo/10_all_nopie-all-flags.patch  |  18 +++
 9.2.0/gentoo/11_all_extra-options.patch|  89 +
 .../12_all_pr55930-dependency-tracking.patch   |  18 +++
 9.2.0/gentoo/13_all_sh-drop-sysroot-suffix.patch   |  32 +
 9.2.0/gentoo/14_all_ia64-TEXTREL.patch |  22 
 9.2.0/gentoo/15_all_disable-systemtap-switch.patch | 142 +
 9.2.0/gentoo/16_all_m68k-textrel-on-libgcc.patch   |  93 ++
 9.2.0/gentoo/17_all_respect-build-cxxflags.patch   |  39 ++
 9.2.0/gentoo/18_all_libgfortran-Werror.patch   |  20 +++
 9.2.0/gentoo/19_all_libgomp-Werror.patch   |  20 +++
 9.2.0/gentoo/20_all_libitm-Werror.patch|  19 +++
 9.2.0/gentoo/21_all_libatomic-Werror.patch |  19 +++
 9.2.0/gentoo/22_all_libbacktrace-Werror.patch  |  17 +++
 9.2.0/gentoo/23_all_libsanitizer-Werror.patch  |  17 +++
 9.2.0/gentoo/24_all_libstdcxx-no-vtv.patch |  61 +
 9.2.0/gentoo/25_all_ia64-bootstrap.patch   |  41 ++
 9.2.0/gentoo/26_all_disable-riscv32-ABIs.patch |  53 
 .../27_all_hppa64-patchable-entry-90751.patch  | 120 +
 9.2.0/gentoo/README.history|  28 
 28 files changed, 1176 insertions(+)

diff --git a/9.2.0/gentoo/01_all_default-fortify-source.patch 
b/9.2.0/gentoo/01_all_default-fortify-source.patch
new file mode 100644
index 000..d307474
--- /dev/null
+++ b/9.2.0/gentoo/01_all_default-fortify-source.patch
@@ -0,0 +1,22 @@
+Taken Debian's patch and removed docs matches:
+https://salsa.debian.org/toolchain-team/gcc.git
+Also see https://bugs.gentoo.org/621036 where
+initially Gentoo used too complicated macro.
+
+# DP: Turn on -D_FORTIFY_SOURCE=2 by default for C, C++, ObjC, ObjC++,
+# DP: if the optimization level is > 0
+--- a/gcc/c-family/c-cppbuiltin.c
 b/gcc/c-family/c-cppbuiltin.c
+@@ -951,6 +951,12 @@ c_cpp_builtins (cpp_reader *pfile)
+   builtin_define_with_value ("__REGISTER_PREFIX__", REGISTER_PREFIX, 0);
+   builtin_define_with_value ("__USER_LABEL_PREFIX__", user_label_prefix, 0);
+ 
++#if !defined(ACCEL_COMPILER)
++  /* Fortify Source enabled by default for optimization levels > 0 */
++  if (optimize)
++builtin_define_with_int_value ("_FORTIFY_SOURCE", 2);
++#endif
++
+   /* Misc.  */
+   if (flag_gnu89_inline)
+ cpp_define (pfile, "__GNUC_GNU_INLINE__");

diff --git a/9.2.0/gentoo/02_all_default-warn-format-security.patch 
b/9.2.0/gentoo/02_all_default-warn-format-security.patch
new file mode 100644
index 000..f809abd
--- /dev/null
+++ b/9.2.0/gentoo/02_all_default-warn-format-security.patch
@@ -0,0 +1,22 @@
+Enable -Wformat and -Wformat-security by default.
+
+--- a/gcc/c-family/c.opt   2016-03-23 18:51:56.0 +0100
 b/gcc/c-family/c.opt   2016-04-28 23:45:54.063351272 +0200
+@@ -459,7 +459,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonlit
+ Warn about format strings that are not literals.
+ 
+ Wformat-security
+-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ 
ObjC++,Wformat=, warn_format >= 2, 0)
++C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C 
ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
+ Warn about possible security problems with format functions.
+ 
+ Wformat-signedness
+@@ -475,7 +475,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_l
+ Warn about zero-length formats.
+ 
+ Wformat=
+-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning 
LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
++C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) 
Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
+ Warn about printf/scanf/strftime/strfmon format string anomalies.
+ 
+ Wignored-qualifiers

diff --git a/9.2.0/gentoo/03_all_default-warn-trampolines.patch