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

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

8.3.0: abandon branch in favour of 8.4.0

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

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

diff --git a/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index 946f48d..d3d7a5d 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,4 +1,4 @@
-5  TODO
+5  Abandoned
+ 35_all_libcpp-ar.patch
+ 36_all_whitespace-pa.patch
 



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

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

8.3.0: fix libcpp ar detection, backport whitespace change

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

 8.3.0/gentoo/35_all_libcpp-ar.patch | 143 
 8.3.0/gentoo/36_all_whitespace-pa.patch |  27 ++
 8.3.0/gentoo/README.history |   4 +
 3 files changed, 174 insertions(+)

diff --git a/8.3.0/gentoo/35_all_libcpp-ar.patch 
b/8.3.0/gentoo/35_all_libcpp-ar.patch
new file mode 100644
index 000..55f2944
--- /dev/null
+++ b/8.3.0/gentoo/35_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/8.3.0/gentoo/36_all_whitespace-pa.patch 
b/8.3.0/gentoo/36_all_whitespace-pa.patch
new file mode 100644
index 000..ad398df
--- /dev/null
+++ b/8.3.0/gentoo/36_all_whitespace-pa.patch
@@ -0,0 +1,27 @@
+From 

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

2020-04-12 Thread Sergei Trofimovich
commit: b0d592c9bb86e16e993d6f03cc3a7c2d9652abfc
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sun Apr 12 16:14:20 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sun Apr 12 16:14:20 2020 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=b0d592c9

README.history: cut 4 patchset

3 new patches: riscv32 ABI patch and libsanitiser patch

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

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

diff --git a/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index cca69eb..7ba6a12 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,4 +1,4 @@
-4  Abandoned
+4  12 Apr 2020
+ 32_all_disable-riscv32-ABIs.patch
+ 33_all_libsanitizer-p1.patch
+ 34_all_libsanitizer-p2.patch



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

2020-03-21 Thread Sergei Trofimovich
commit: 83808f54aa403692e7adb1fbb1b93c87c9cc51bf
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sat Mar 21 11:14:35 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sat Mar 21 11:14:35 2020 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=83808f54

8.3.0: backport glibc-2.31 libsanitizer fixes

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

 8.3.0/gentoo/33_all_libsanitizer-p1.patch | 32 +++
 8.3.0/gentoo/34_all_libsanitizer-p2.patch | 65 +++
 8.3.0/gentoo/README.history   |  2 +
 3 files changed, 99 insertions(+)

diff --git a/8.3.0/gentoo/33_all_libsanitizer-p1.patch 
b/8.3.0/gentoo/33_all_libsanitizer-p1.patch
new file mode 100644
index 000..80cc074
--- /dev/null
+++ b/8.3.0/gentoo/33_all_libsanitizer-p1.patch
@@ -0,0 +1,32 @@
+From 54d87ffe4b34052f159ac5b72b250129ce813b2a Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek 
+Date: Fri, 14 Feb 2020 12:33:27 +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.
+---
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
 b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -1147,8 +1147,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.2
+

diff --git a/8.3.0/gentoo/34_all_libsanitizer-p2.patch 
b/8.3.0/gentoo/34_all_libsanitizer-p2.patch
new file mode 100644
index 000..37ddc9d
--- /dev/null
+++ b/8.3.0/gentoo/34_all_libsanitizer-p2.patch
@@ -0,0 +1,65 @@
+From dbdf86838aaaef76620c00c53096cfe157d5af6e Mon Sep 17 00:00:00 2001
+From: Jakub Jelinek 
+Date: Fri, 14 Feb 2020 12:38:30 +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.
+---
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
 b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cc
+@@ -1147,12 +1147,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
+ 
+--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
 b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h
+@@ -210,26 +210,13 @@ namespace __sanitizer {
+ u64 __unused1;
+ u64 __unused2;
+ #elif defined(__sparc__)
+-#if defined(__arch64__)
+ unsigned mode;
+-unsigned short __pad1;
+-#else
+-unsigned short __pad1;
+-unsigned short mode;
+ unsigned short __pad2;
+-#endif
+ unsigned short __seq;
+ unsigned long long __unused1;
+ unsigned long long __unused2;
+-#elif defined(__mips__) || defined(__aarch64__) || defined(__s390x__)
+-unsigned int mode;
+-unsigned short __seq;
+-unsigned short __pad1;
+-unsigned long __unused1;
+-unsigned long __unused2;
+ #else
+-unsigned short mode;
+-unsigned short __pad1;
++unsigned int mode;
+ unsigned short __seq;
+ unsigned short __pad2;
+ #if defined(__x86_64__) && !defined(_LP64)
+-- 
+2.25.2
+

diff --git a/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index 1d0ef1f..cca69eb 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,5 +1,7 @@
 4  Abandoned
   

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

2020-03-04 Thread Sergei Trofimovich
commit: ad25982fa143cc9c49b159ed99bc5b1f33f38907
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Wed Mar  4 11:06:05 2020 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Wed Mar  4 11:06:05 2020 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=ad25982f

8.3.0: abandon patchset in favour of 8.4.0 release

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

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

diff --git a/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index 6ede7c5..1d0ef1f 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,4 +1,4 @@
-4  TODO
+4  Abandoned
+ 32_all_disable-riscv32-ABIs.patch
 
 3  04 Not 2019



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

2019-11-04 Thread Sergei Trofimovich
commit: 39178e83208513117241da885ef83e20ccbe2a44
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Mon Nov  4 22:37:12 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Mon Nov  4 22:37:12 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=39178e83

8.3.0: disable riscv32 ABIs

Currently glibc does not support riscv32.

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

 8.3.0/gentoo/32_all_disable-riscv32-ABIs.patch | 28 ++
 8.3.0/gentoo/README.history|  3 +++
 2 files changed, 31 insertions(+)

diff --git a/8.3.0/gentoo/32_all_disable-riscv32-ABIs.patch 
b/8.3.0/gentoo/32_all_disable-riscv32-ABIs.patch
new file mode 100644
index 000..52476e6
--- /dev/null
+++ b/8.3.0/gentoo/32_all_disable-riscv32-ABIs.patch
@@ -0,0 +1,28 @@
+https://gcc.gnu.org/PR90419
+
+--- gcc-8.3.0.orig/gcc/config/riscv/t-linux-multilib   2017-02-06 
22:38:37.0 +0100
 gcc-8.3.0/gcc/config/riscv/t-linux-multilib2019-04-28 
16:37:44.377841943 +0200
+@@ -20,21 +20,9 @@
+ ilp32d \
+ lp64 \
+ lp64d
+-MULTILIB_REQUIRED = march=rv32imac/mabi=ilp32 \
+-march=rv32imafdc/mabi=ilp32d \
+-march=rv64imac/mabi=lp64 \
++MULTILIB_REQUIRED = march=rv64imac/mabi=lp64 \
+ march=rv64imafdc/mabi=lp64d
+-MULTILIB_REUSE = march.rv32imac/mabi.ilp32=march.rv32ima/mabi.ilp32 \
+-march.rv32imac/mabi.ilp32=march.rv32imaf/mabi.ilp32 \
+-march.rv32imac/mabi.ilp32=march.rv32imafd/mabi.ilp32 \
+-march.rv32imac/mabi.ilp32=march.rv32imafc/mabi.ilp32 \
+-march.rv32imac/mabi.ilp32=march.rv32imafdc/mabi.ilp32 \
+-march.rv32imac/mabi.ilp32=march.rv32g/mabi.ilp32 \
+-march.rv32imac/mabi.ilp32=march.rv32gc/mabi.ilp32 \
+-march.rv32imafdc/mabi.ilp32d=march.rv32imafd/mabi.ilp32d \
+-march.rv32imafdc/mabi.ilp32d=march.rv32gc/mabi.ilp32d \
+-march.rv32imafdc/mabi.ilp32d=march.rv32g/mabi.ilp32d \
+-march.rv64imac/mabi.lp64=march.rv64ima/mabi.lp64 \
++MULTILIB_REUSE = march.rv64imac/mabi.lp64=march.rv64ima/mabi.lp64 \
+ march.rv64imac/mabi.lp64=march.rv64imaf/mabi.lp64 \
+ march.rv64imac/mabi.lp64=march.rv64imafd/mabi.lp64 \
+ march.rv64imac/mabi.lp64=march.rv64imafc/mabi.lp64 \

diff --git a/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index 94ff87a..6ede7c5 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,3 +1,6 @@
+4  TODO
+   + 32_all_disable-riscv32-ABIs.patch
+
 3  04 Not 2019
- 30_all_sparc-PIC-constant-PR91472.patch
 



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

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

8.3.0: cut 3 patchset

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

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

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

diff --git a/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index 745589a..94ff87a 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,4 +1,4 @@
-3  TODO
+3  04 Not 2019
- 30_all_sparc-PIC-constant-PR91472.patch
 
 2  22 Sep 2019



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

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

8.3.0: drop 30_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/30_all_sparc-PIC-constant-PR91472.patch | 83 --
 8.3.0/gentoo/README.history|  3 +
 2 files changed, 3 insertions(+), 83 deletions(-)

diff --git a/8.3.0/gentoo/30_all_sparc-PIC-constant-PR91472.patch 
b/8.3.0/gentoo/30_all_sparc-PIC-constant-PR91472.patch
deleted file mode 100644
index aeacdde..000
--- a/8.3.0/gentoo/30_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/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index 429137b..745589a 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,3 +1,6 @@
+3  TODO
+   - 30_all_sparc-PIC-constant-PR91472.patch
+
 2  22 Sep 2019
+ 29_all_ia64-bootstrap.patch
+ 30_all_sparc-PIC-constant-PR91472.patch



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

2019-09-22 Thread Sergei Trofimovich
commit: 97b8531fbe9aeea7960a693979df72d1bb7184cb
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sun Sep 22 09:19:14 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sun Sep 22 09:19:14 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=97b8531f

9.3.0: cut 2 patchset

3 new backports:
+ 29_all_ia64-bootstrap.patch: fix bootstrap on ia64 (debug wibble)
+ 30_all_sparc-PIC-constant-PR91472.patch: fix -fPIE sparc codegen
+ 31_all_sparc-fpu-subregs-91269.patch: fix -fPIE sparc codegen

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

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

diff --git a/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index 3400182..429137b 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,4 +1,4 @@
-1.2TODO
+2  22 Sep 2019
+ 29_all_ia64-bootstrap.patch
+ 30_all_sparc-PIC-constant-PR91472.patch
+ 31_all_sparc-fpu-subregs-91269.patch



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

2019-09-20 Thread Sergei Trofimovich
commit: b15b261d1b08f083920d0af5e3640d8ab620302a
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Fri Sep 20 23:12:19 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Fri Sep 20 23:12:19 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=b15b261d

8.3.0: backport PR91269 (sparc subreg regression)

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

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

diff --git a/8.3.0/gentoo/31_all_sparc-fpu-subregs-91269.patch 
b/8.3.0/gentoo/31_all_sparc-fpu-subregs-91269.patch
new file mode 100644
index 000..e21d07d
--- /dev/null
+++ b/8.3.0/gentoo/31_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/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index 68b1fd8..3400182 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,6 +1,7 @@
 1.2TODO
+ 29_all_ia64-bootstrap.patch
+ 30_all_sparc-PIC-constant-PR91472.patch
+   + 31_all_sparc-fpu-subregs-91269.patch
 
 1.106 Apr 2019
+ 26_all_overridable_native.patch



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

2019-09-12 Thread Sergei Trofimovich
commit: f5d94ac0dde9af3de0f36928d31ca5bdc51352e3
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Thu Sep 12 21:54:36 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Thu Sep 12 21:54:36 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=f5d94ac0

8.3.0: backport 30_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/30_all_sparc-PIC-constant-PR91472.patch | 83 ++
 8.3.0/gentoo/README.history|  1 +
 2 files changed, 84 insertions(+)

diff --git a/8.3.0/gentoo/30_all_sparc-PIC-constant-PR91472.patch 
b/8.3.0/gentoo/30_all_sparc-PIC-constant-PR91472.patch
new file mode 100644
index 000..aeacdde
--- /dev/null
+++ b/8.3.0/gentoo/30_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/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index fc32cd2..68b1fd8 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,5 +1,6 @@
 1.2TODO
+ 29_all_ia64-bootstrap.patch
+   + 30_all_sparc-PIC-constant-PR91472.patch
 
 1.106 Apr 2019
+ 26_all_overridable_native.patch



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

2019-04-30 Thread Sergei Trofimovich
commit: bf27cf0934d866b0b9d3d2f78dc25db8aa829e78
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Tue Apr 30 15:49:47 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Tue Apr 30 15:49:47 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=bf27cf09

8.3.0: fix ia64 bootstrap

On ia64 stage2/3 comparison fails due to label wibble.

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

 8.3.0/gentoo/29_all_ia64-bootstrap.patch | 41 
 8.3.0/gentoo/README.history  |  3 +++
 2 files changed, 44 insertions(+)

diff --git a/8.3.0/gentoo/29_all_ia64-bootstrap.patch 
b/8.3.0/gentoo/29_all_ia64-bootstrap.patch
new file mode 100644
index 000..0a0a25b
--- /dev/null
+++ b/8.3.0/gentoo/29_all_ia64-bootstrap.patch
@@ -0,0 +1,41 @@
+https://gcc.gnu.org/PR87338
+
+From 1cc1dc32fcf6b47db4e6d28f55de343713f824a4 Mon Sep 17 00:00:00 2001
+From: James Clarke 
+Date: Thu, 25 Apr 2019 15:58:55 +0200
+Subject: [PATCH] PR bootstrap/87338: Fix ia64 bootstrap comparison regression
+ in r257511
+To: gcc-patc...@gcc.gnu.org
+
+By using ASM_OUTPUT_LABEL, r257511 forced the assembler to start a new
+bundle when emitting an inline entry label on. Instead, use
+ASM_OUTPUT_DEBUG_LABEL like for the block begin and end labels so tags are
+emitted rather than labels.
+
+gcc/
+   PR bootstrap/87338
+   * dwarf2out.c (dwarf2out_inline_entry): Use ASM_OUTPUT_DEBUG_LABEL
+   instead of ASM_GENERATE_INTERNAL_LABEL and ASM_OUTPUT_LABEL.
+---
+ gcc/dwarf2out.c | 7 ++-
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+--- a/gcc/dwarf2out.c
 b/gcc/dwarf2out.c
+@@ -27670,11 +27670,8 @@ dwarf2out_inline_entry (tree block)
+   if (cur_line_info_table)
+ ied->view = cur_line_info_table->view;
+ 
+-  char label[MAX_ARTIFICIAL_LABEL_BYTES];
+-
+-  ASM_GENERATE_INTERNAL_LABEL (label, BLOCK_INLINE_ENTRY_LABEL,
+- BLOCK_NUMBER (block));
+-  ASM_OUTPUT_LABEL (asm_out_file, label);
++  ASM_OUTPUT_DEBUG_LABEL (asm_out_file, BLOCK_INLINE_ENTRY_LABEL,
++BLOCK_NUMBER (block));
+ }
+ 
+ /* Called from finalize_size_functions for size functions so that their body
+-- 
+1.8.5.3
+

diff --git a/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index d1f0c0d..fc32cd2 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,3 +1,6 @@
+1.2TODO
+   + 29_all_ia64-bootstrap.patch
+
 1.106 Apr 2019
+ 26_all_overridable_native.patch
+ 27_all_flto-make-all.patch



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

2019-04-06 Thread Sergei Trofimovich
commit: c8e228e9ad5ff6e81cf0fb3a6c0f7fb2929519bf
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Sat Apr  6 10:44:29 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Sat Apr  6 10:44:29 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=c8e228e9

8.3.0: cut 1.1 patchset

Three new patches:
- 26_all_overridable_native.patch
- 27_all_flto-make-all.patch
- 28_all_i386_retpoline-and-jumptable.patch

Bug: https://bugs.gentoo.org/679738
Bug: https://bugs.gentoo.org/682018
Bug: https://bugs.gentoo.org/682218
Signed-off-by: Sergei Trofimovich  gentoo.org>

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

diff --git a/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index 2e14fb3..d1f0c0d 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,4 +1,4 @@
-1.1TODO
+1.106 Apr 2019
+ 26_all_overridable_native.patch
+ 27_all_flto-make-all.patch
+ 28_all_i386_retpoline-and-jumptable.patch



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

2019-04-04 Thread Sergei Trofimovich
commit: 8f536c47fddf4a9fe15b969b888f4dbd22c1f82a
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Thu Apr  4 07:00:23 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Thu Apr  4 07:00:23 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=8f536c47

8.3.0: backport retpoline/jumptable optimization on i386

Reported-by: Thomas Deutschmann
Bug: https://gcc.gnu.org/PR86952
Bug: https://bugs.gentoo.org/682218
Signed-off-by: Sergei Trofimovich  gentoo.org>

 .../28_all_i386_retpoline-and-jumptable.patch  | 64 ++
 8.3.0/gentoo/README.history|  1 +
 2 files changed, 65 insertions(+)

diff --git a/8.3.0/gentoo/28_all_i386_retpoline-and-jumptable.patch 
b/8.3.0/gentoo/28_all_i386_retpoline-and-jumptable.patch
new file mode 100644
index 000..64e9528
--- /dev/null
+++ b/8.3.0/gentoo/28_all_i386_retpoline-and-jumptable.patch
@@ -0,0 +1,64 @@
+https://gcc.gnu.org/PR86952
+https://bugs.gentoo.org/682218
+
+From 4fa11b10fc05a132b68b6df198706a97c3f4d61e Mon Sep 17 00:00:00 2001
+From: marxin 
+Date: Mon, 11 Mar 2019 09:38:06 +
+Subject: [PATCH] Backport r269492
+
+2019-03-11  Martin Liska  
+
+   Backport from mainline
+   2019-03-08  Martin Liska  
+
+   PR target/86952
+   * config/i386/i386.c (ix86_option_override_internal): Disable
+   jump tables when retpolines are used.
+2019-03-11  Martin Liska  
+
+   Backport from mainline
+   2019-03-08  Martin Liska  
+
+   PR target/86952
+   * gcc.target/i386/indirect-thunk-7.c: Use jump tables to match
+   scanned pattern.
+   * gcc.target/i386/indirect-thunk-inline-7.c: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@269572 
138bc75d-0d04-0410-961f-82ee72b054a4
+--- a/gcc/config/i386/i386.c
 b/gcc/config/i386/i386.c
+@@ -4958,6 +4958,12 @@ ix86_option_override_internal (bool main_args_p,
+  opts->x_param_values,
+  opts_set->x_param_values);
+ 
++  /* PR86952: jump table usage with retpolines is slow.
++ The PR provides some numbers about the slowness.  */
++  if (ix86_indirect_branch != indirect_branch_keep
++  && !opts_set->x_flag_jump_tables)
++opts->x_flag_jump_tables = 0;
++
+   return true;
+ }
+ 
+--- a/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
 b/gcc/testsuite/gcc.target/i386/indirect-thunk-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep 
-mindirect-branch=thunk -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep 
-mindirect-branch=thunk -fno-pic -fjump-tables" } */
+ 
+ void func0 (void);
+ void func1 (void);
+--- a/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
 b/gcc/testsuite/gcc.target/i386/indirect-thunk-inline-7.c
+@@ -1,5 +1,5 @@
+ /* { dg-do compile } */
+-/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep 
-mindirect-branch=thunk-inline -fno-pic" } */
++/* { dg-options "-O2 -mno-indirect-branch-register -mfunction-return=keep 
-mindirect-branch=thunk-inline -fno-pic -fjump-tables" } */
+ 
+ void func0 (void);
+ void func1 (void);
+-- 
+2.21.0
+

diff --git a/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index 1a755db..2e14fb3 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,6 +1,7 @@
 1.1TODO
+ 26_all_overridable_native.patch
+ 27_all_flto-make-all.patch
+   + 28_all_i386_retpoline-and-jumptable.patch
 
 1.022 Feb 2019
+ 01_all_default-fortify-source.patch



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

2019-04-04 Thread Sergei Trofimovich
commit: 6480d86a84ad176452fa3b269570f372bcf84d6e
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Thu Apr  4 06:57:36 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Thu Apr  4 06:57:36 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=6480d86a

8.3.0: backport -flto=2 build failure on isl (all.c)

Reported-by: Fabio Coatti
Bug: https://gcc.gnu.org/PR89896
Bug: https://bugs.gentoo.org/682018
Signed-off-by: Sergei Trofimovich  gentoo.org>

 8.3.0/gentoo/27_all_flto-make-all.patch | 31 +++
 8.3.0/gentoo/README.history |  1 +
 2 files changed, 32 insertions(+)

diff --git a/8.3.0/gentoo/27_all_flto-make-all.patch 
b/8.3.0/gentoo/27_all_flto-make-all.patch
new file mode 100644
index 000..abfe2f8
--- /dev/null
+++ b/8.3.0/gentoo/27_all_flto-make-all.patch
@@ -0,0 +1,31 @@
+https://gcc.gnu.org/PR89896
+https://bugs.gentoo.org/682018
+
+From e5e34c317c02b16cef2c6c71a18e4b1a358b626c Mon Sep 17 00:00:00 2001
+From: rguenth 
+Date: Wed, 3 Apr 2019 08:46:35 +
+Subject: [PATCH] 2019-04-03  Richard Biener  
+
+   PR lto/89896
+   * lto-wrapper.c (run_gcc): Avoid implicit rules making
+   the all target phony.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-8-branch@270113 
138bc75d-0d04-0410-961f-82ee72b054a4
+---
+--- a/gcc/lto-wrapper.c
 b/gcc/lto-wrapper.c
+@@ -1669,7 +1669,9 @@ cont:
+ struct pex_obj *pex;
+ char jobs[32];
+ 
+-fprintf (mstream, "all:");
++fprintf (mstream,
++ ".PHONY: all\n"
++ "all:");
+ for (i = 0; i < nr; ++i)
+   {
+ int j = ltrans_priorities[i*2 + 1];
+-- 
+2.21.0
+

diff --git a/8.3.0/gentoo/README.history b/8.3.0/gentoo/README.history
index c1e5bb1..1a755db 100644
--- a/8.3.0/gentoo/README.history
+++ b/8.3.0/gentoo/README.history
@@ -1,5 +1,6 @@
 1.1TODO
+ 26_all_overridable_native.patch
+   + 27_all_flto-make-all.patch
 
 1.022 Feb 2019
+ 01_all_default-fortify-source.patch



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

2019-03-07 Thread Sergei Trofimovich
commit: 28e55a54934fa758aa6af045b61bd8f268a9c11b
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Fri Mar  8 07:50:57 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Fri Mar  8 07:50:57 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=28e55a54

8.3.0: allow -march=native override with -march=

That fixes build breakage like https://bugs.gentoo.org/672946
where Qt build system uses -march=core-avx2 instead of
individual -mavx2 (and friends).

Bug: https://bugs.gentoo.org/679738
Bug: https://gcc.gnu.org/PR69471
Bug: https://bugs.gentoo.org/672946
Signed-off-by: Sergei Trofimovich  gentoo.org>

 8.3.0/gentoo/26_all_overridable_native.patch | 126 +++
 8.3.0/gentoo/README.history  |   3 +
 2 files changed, 129 insertions(+)

diff --git a/8.3.0/gentoo/26_all_overridable_native.patch 
b/8.3.0/gentoo/26_all_overridable_native.patch
new file mode 100644
index 000..c292f1c
--- /dev/null
+++ b/8.3.0/gentoo/26_all_overridable_native.patch
@@ -0,0 +1,126 @@
+https://gcc.gnu.org/PR69471
+https://bugs.gentoo.org/679738
+
+From 8c0f695d83d1b4b92b9e7e8dad003701dbc04d27 Mon Sep 17 00:00:00 2001
+From: hjl 
+Date: Sat, 23 Feb 2019 19:39:35 +
+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=skylake-avx512
+
+is the treated as
+
+$ gcc -march=skylake-avx512 -march=native
+
+Prune joined switches with Negative and RejectNegative to allow
+-march=skylake-avx512 to override previous -march=native on command-line.
+
+gcc/
+
+   PR driver/69471
+   * opts-common.c (prune_options): Also prune joined switches
+   with Negative and RejectNegative.
+   * config/i386/i386.opt (march=): Add Negative(march=).
+   (mtune=): Add Negative(mtune=).
+   * doc/options.texi: Document Negative used together with Joined
+   and RejectNegative.
+
+gcc/testsuite/
+
+   PR driver/69471
+   * gcc.dg/pr69471-1.c: New test.
+   * gcc.dg/pr69471-2.c: Likewise.
+   * gcc.target/i386/pr69471-3.c: Likewise.
+
+
+git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@269164 
138bc75d-0d04-0410-961f-82ee72b054a4
+--- a/gcc/config/i386/i386.opt
 b/gcc/config/i386/i386.opt
+@@ -253,7 +253,7 @@ EnumValue
+ Enum(ix86_align_data) String(cacheline) Value(ix86_align_data_type_cacheline)
+ 
+ march=
+-Target RejectNegative Joined Var(ix86_arch_string)
++Target RejectNegative Negative(march=) Joined Var(ix86_arch_string)
+ Generate code for given CPU.
+ 
+ masm=
+@@ -510,7 +510,7 @@ Target Report Mask(TLS_DIRECT_SEG_REFS)
+ Use direct references against %gs when accessing tls data.
+ 
+ mtune=
+-Target RejectNegative Joined Var(ix86_tune_string)
++Target RejectNegative Negative(mtune=) Joined Var(ix86_tune_string)
+ Schedule code for given CPU.
+ 
+ mtune-ctrl=
+--- a/gcc/opts-common.c
 b/gcc/opts-common.c
+@@ -1015,7 +1015,9 @@ prune_options (struct cl_decoded_option 
**decoded_options,
+   goto keep;
+ 
+ /* Skip joined switches.  */
+-if ((option->flags & CL_JOINED))
++if ((option->flags & CL_JOINED)
++&& (!option->cl_reject_negative
++|| (unsigned int) option->neg_index != opt_idx))
+   goto keep;
+ 
+ for (j = i + 1; j < old_decoded_options_count; j++)
+@@ -1027,8 +1029,11 @@ prune_options (struct cl_decoded_option 
**decoded_options,
+   continue;
+ if (cl_options[next_opt_idx].neg_index < 0)
+   continue;
+-if ((cl_options[next_opt_idx].flags & CL_JOINED))
+-continue;
++if ((cl_options[next_opt_idx].flags & CL_JOINED)
++&& (!cl_options[next_opt_idx].cl_reject_negative
++|| ((unsigned int) cl_options[next_opt_idx].neg_index
++!= next_opt_idx)))
++  continue;
+ if (cancel_option (opt_idx, next_opt_idx, next_opt_idx))
+   break;
+   }
+--- /dev/null
 b/gcc/testsuite/gcc.dg/pr69471-1.c
+@@ -0,0 +1,9 @@
++/* { dg-do compile } */
++/* { dg-options "-Wno-implicit-function-declaration -Wno-int-conversion 
-fno-builtin-free -fno-builtin-malloc" } */
++
++void *
++foo (void * p)
++{
++  free (p);
++  return malloc (p);
++}
+--- /dev/null
 b/gcc/testsuite/gcc.dg/pr69471-2.c
+@@ -0,0 +1,8 @@
++/* { dg-do compile } */
++/* { dg-options "-gstabs2 -gdwarf-4 -gstabs3" } */
++/* { dg-error "conflicts with prior selectio" "" { target *-*-* } 0 } */
++
++void
++foo (void)
++{
++}
+--- /dev/null
 b/gcc/testsuite/gcc.target/i386/pr69471-3.c
+@@ -0,0 +1,11 @@
++/* { dg-do compile } */
++/* { dg-options "-march=native -march=knl" } */
++
++/* NB: We want to verify that -march=native -march=processor is the same
++   as -march=processor.  Since it is very unlikely that GCC will be built
++   on 

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

2019-02-22 Thread Sergei Trofimovich
commit: 27afb80e661ba54a9c71dcb3f52ebe8d46504cc2
Author: Sergei Trofimovich  gentoo  org>
AuthorDate: Fri Feb 22 23:45:59 2019 +
Commit: Sergei Trofimovich  gentoo  org>
CommitDate: Fri Feb 22 23:45:59 2019 +
URL:https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=27afb80e

8.3.0: cut patchset 1.0

It's a verbatim copy of 8.2.0 patchset with upstreamed patches removed.

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

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

diff --git a/8.3.0/gentoo/01_all_default-fortify-source.patch 
b/8.3.0/gentoo/01_all_default-fortify-source.patch
new file mode 100644
index 000..d307474
--- /dev/null
+++ b/8.3.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/8.3.0/gentoo/02_all_default-warn-format-security.patch 
b/8.3.0/gentoo/02_all_default-warn-format-security.patch
new file mode 100644
index 000..f809abd
--- /dev/null
+++ b/8.3.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/8.3.0/gentoo/03_all_default-warn-trampolines.patch 
b/8.3.0/gentoo/03_all_default-warn-trampolines.patch
new file mode 100644
index 000..7a644cb
--- /dev/null
+++ b/8.3.0/gentoo/03_all_default-warn-trampolines.patch
@@ -0,0 +1,13 @@
+Enable -Wtrampolines by default.