summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIgor Pashev <pashev.igor@gmail.com>2017-05-13 14:43:40 +0300
committerIgor Pashev <pashev.igor@gmail.com>2017-05-13 14:43:40 +0300
commit8638c410dd65706ad9fe9569fdcd23217b55ec88 (patch)
treeaea8d0f62bcb0b68a34737873c8c00a180e32b01
parent5864e2e380fec584938f62b675d42fdec1a91e7d (diff)
downloadgcc-9-8638c410dd65706ad9fe9569fdcd23217b55ec88.tar.gz
Update Dyson patches
-rw-r--r--debian/patches/illumos-fclone-functions.diff36
-rw-r--r--debian/patches/illumos-libgo-lfstack.diff20
-rw-r--r--debian/patches/illumos-strict-calling-conventions.diff42
-rw-r--r--debian/rules.patch1
4 files changed, 39 insertions, 60 deletions
diff --git a/debian/patches/illumos-fclone-functions.diff b/debian/patches/illumos-fclone-functions.diff
index 9a60ff1..11f1585 100644
--- a/debian/patches/illumos-fclone-functions.diff
+++ b/debian/patches/illumos-fclone-functions.diff
@@ -19,13 +19,13 @@ See http://wiki.illumos.org/display/illumos/GCC+Modifications
gcc/tree-inline.c | 3 ++-
3 files changed, 17 insertions(+), 2 deletions(-)
-Index: gcc-5/src/gcc/common.opt
+Index: gcc-6.git/src/gcc/common.opt
===================================================================
---- gcc-5.orig/src/gcc/common.opt
-+++ gcc-5/src/gcc/common.opt
-@@ -981,6 +981,11 @@ fcheck-new
- Common Var(flag_check_new)
- Check the return value of new in C++
+--- gcc-6.git.orig/src/gcc/common.opt
++++ gcc-6.git/src/gcc/common.opt
+@@ -1029,6 +1029,11 @@ fchecking
+ Common Var(flag_checking) Init(CHECKING_P)
+ Perform internal consistency checkings.
+fclone-functions
+Common Report Var(flag_clone_functions) Init(1)
@@ -35,20 +35,20 @@ Index: gcc-5/src/gcc/common.opt
fcombine-stack-adjustments
Common Report Var(flag_combine_stack_adjustments) Optimization
Looks for opportunities to reduce stack adjustments and stack references.
-Index: gcc-5/src/gcc/doc/invoke.texi
+Index: gcc-6.git/src/gcc/doc/invoke.texi
===================================================================
---- gcc-5.orig/src/gcc/doc/invoke.texi
-+++ gcc-5/src/gcc/doc/invoke.texi
-@@ -383,7 +383,7 @@ Objective-C and Objective-C++ Dialects}.
+--- gcc-6.git.orig/src/gcc/doc/invoke.texi
++++ gcc-6.git/src/gcc/doc/invoke.texi
+@@ -340,7 +340,7 @@ Objective-C and Objective-C++ Dialects}.
-fbranch-target-load-optimize -fbranch-target-load-optimize2 @gol
-fbtr-bb-exclusive -fcaller-saves @gol
- -fcheck-data-deps -fcombine-stack-adjustments -fconserve-stack @gol
+ -fcombine-stack-adjustments -fconserve-stack @gol
--fcompare-elim -fcprop-registers -fcrossjumping @gol
+-fcompare-elim -fclone-functions -fcprop-registers -fcrossjumping @gol
-fcse-follow-jumps -fcse-skip-blocks -fcx-fortran-rules @gol
-fcx-limited-range @gol
-fdata-sections -fdce -fdelayed-branch @gol
-@@ -9516,6 +9516,15 @@ to these tools. With non fat LTO makefil
+@@ -8188,6 +8188,15 @@ to these tools. With non fat LTO makefil
The default is @option{-fno-fat-lto-objects} on targets with linker plugin
support.
@@ -64,16 +64,16 @@ Index: gcc-5/src/gcc/doc/invoke.texi
@item -fcompare-elim
@opindex fcompare-elim
After register allocation and post-register allocation instruction splitting,
-Index: gcc-5/src/gcc/tree-inline.c
+Index: gcc-6.git/src/gcc/tree-inline.c
===================================================================
---- gcc-5.orig/src/gcc/tree-inline.c
-+++ gcc-5/src/gcc/tree-inline.c
-@@ -5457,7 +5457,8 @@ bool
+--- gcc-6.git.orig/src/gcc/tree-inline.c
++++ gcc-6.git/src/gcc/tree-inline.c
+@@ -5541,7 +5541,8 @@ bool
tree_versionable_function_p (tree fndecl)
{
return (!lookup_attribute ("noclone", DECL_ATTRIBUTES (fndecl))
-- && copy_forbidden (DECL_STRUCT_FUNCTION (fndecl), fndecl) == NULL);
-+ && (copy_forbidden (DECL_STRUCT_FUNCTION (fndecl), fndecl) == NULL)
+- && copy_forbidden (DECL_STRUCT_FUNCTION (fndecl)) == NULL);
++ && (copy_forbidden (DECL_STRUCT_FUNCTION (fndecl)) == NULL)
+ && flag_clone_functions);
}
diff --git a/debian/patches/illumos-libgo-lfstack.diff b/debian/patches/illumos-libgo-lfstack.diff
deleted file mode 100644
index e0fc2d4..0000000
--- a/debian/patches/illumos-libgo-lfstack.diff
+++ /dev/null
@@ -1,20 +0,0 @@
-Index: gcc-5/src/libgo/runtime/lfstack.goc
-===================================================================
---- gcc-5.orig/src/libgo/runtime/lfstack.goc
-+++ gcc-5/src/libgo/runtime/lfstack.goc
-@@ -29,7 +29,6 @@ static inline LFNode* lfUnpack(uint64 va
- // So we use 17msb of pointers as ABA counter.
- # define PTR_BITS 47
- # endif
--# endif
- # define CNT_BITS (64 - PTR_BITS + 3)
- static inline uint64 lfPack(LFNode *node, uintptr cnt) {
- return ((uint64)(node)<<(64-PTR_BITS)) | (cnt&(((1<<CNT_BITS)-1)));
-@@ -37,6 +36,7 @@ static inline uint64 lfPack(LFNode *node
- static inline LFNode* lfUnpack(uint64 val) {
- return (LFNode*)((val >> CNT_BITS) << 3);
- }
-+# endif /* __sparc__ ... */
- #else
- static inline uint64 lfPack(LFNode *node, uintptr cnt) {
- return ((uint64)(uintptr)(node)<<32) | cnt;
diff --git a/debian/patches/illumos-strict-calling-conventions.diff b/debian/patches/illumos-strict-calling-conventions.diff
index 8ddaa94..90e8fc3 100644
--- a/debian/patches/illumos-strict-calling-conventions.diff
+++ b/debian/patches/illumos-strict-calling-conventions.diff
@@ -13,13 +13,13 @@ later which, given the odds, is likely to be necessary.
See http://wiki.illumos.org/display/illumos/GCC+Modifications
-Index: gcc-5/src/gcc/common.opt
+Index: gcc-6.git/src/gcc/common.opt
===================================================================
---- gcc-5.orig/src/gcc/common.opt
-+++ gcc-5/src/gcc/common.opt
-@@ -2136,6 +2136,10 @@ fstrict-aliasing
+--- gcc-6.git.orig/src/gcc/common.opt
++++ gcc-6.git/src/gcc/common.opt
+@@ -2236,6 +2236,10 @@ fstrict-aliasing
Common Report Var(flag_strict_aliasing) Optimization
- Assume strict aliasing rules apply
+ Assume strict aliasing rules apply.
+fstrict-calling-conventions
+Common Report Var(flag_strict_calling_conventions) Init(1)
@@ -27,12 +27,12 @@ Index: gcc-5/src/gcc/common.opt
+
fstrict-overflow
Common Report Var(flag_strict_overflow) Optimization
- Treat signed overflow as undefined
-Index: gcc-5/src/gcc/config/i386/i386.c
+ Treat signed overflow as undefined.
+Index: gcc-6.git/src/gcc/config/i386/i386.c
===================================================================
---- gcc-5.orig/src/gcc/config/i386/i386.c
-+++ gcc-5/src/gcc/config/i386/i386.c
-@@ -5829,6 +5829,7 @@ ix86_function_regparm (const_tree type,
+--- gcc-6.git.orig/src/gcc/config/i386/i386.c
++++ gcc-6.git/src/gcc/config/i386/i386.c
+@@ -7076,6 +7076,7 @@ ix86_function_regparm (const_tree type,
/* Use register calling convention for local functions when possible. */
if (decl
@@ -40,7 +40,7 @@ Index: gcc-5/src/gcc/config/i386/i386.c
&& TREE_CODE (decl) == FUNCTION_DECL)
{
cgraph_node *target = cgraph_node::get (decl);
-@@ -5932,6 +5933,7 @@ ix86_function_sseregparm (const_tree typ
+@@ -7179,6 +7180,7 @@ ix86_function_sseregparm (const_tree typ
/* TARGET_SSE_MATH */
&& (target_opts_for_fn (target->decl)->x_ix86_fpmath & FPMATH_SSE)
&& opt_for_fn (target->decl, optimize)
@@ -48,11 +48,11 @@ Index: gcc-5/src/gcc/config/i386/i386.c
&& !(profile_flag && !flag_fentry))
{
cgraph_local_info *i = &target->local;
-Index: gcc-5/src/gcc/doc/invoke.texi
+Index: gcc-6.git/src/gcc/doc/invoke.texi
===================================================================
---- gcc-5.orig/src/gcc/doc/invoke.texi
-+++ gcc-5/src/gcc/doc/invoke.texi
-@@ -9082,6 +9082,12 @@ int f() @{
+--- gcc-6.git.orig/src/gcc/doc/invoke.texi
++++ gcc-6.git/src/gcc/doc/invoke.texi
+@@ -7770,6 +7770,12 @@ int f() @{
The @option{-fstrict-aliasing} option is enabled at levels
@option{-O2}, @option{-O3}, @option{-Os}.
@@ -65,22 +65,22 @@ Index: gcc-5/src/gcc/doc/invoke.texi
@item -fstrict-overflow
@opindex fstrict-overflow
Allow the compiler to assume strict signed overflow rules, depending
-Index: gcc-5/src/gcc/testsuite/gcc.target/i386/local.c
+Index: gcc-6.git/src/gcc/testsuite/gcc.target/i386/local.c
===================================================================
---- gcc-5.orig/src/gcc/testsuite/gcc.target/i386/local.c
-+++ gcc-5/src/gcc/testsuite/gcc.target/i386/local.c
+--- gcc-6.git.orig/src/gcc/testsuite/gcc.target/i386/local.c
++++ gcc-6.git/src/gcc/testsuite/gcc.target/i386/local.c
@@ -1,5 +1,6 @@
/* { dg-do compile } */
-/* { dg-options "-O2 -funit-at-a-time" } */
+/* { dg-options "-O2 -funit-at-a-time -fno-strict-calling-conventions" { target ilp32 } } */
+/* { dg-options "-O2 -funit-at-a-time" { target lp64 } } */
/* { dg-final { scan-assembler "magic\[^\\n\]*eax" { target ia32 } } } */
- /* { dg-final { scan-assembler "magic\[^\\n\]*(edi|ecx)" { target { ! { ia32 } } } } } */
+ /* { dg-final { scan-assembler "magic\[^\\n\]*(edi|ecx)" { target { ! ia32 } } } } */
-Index: gcc-5/src/gcc/testsuite/gcc.target/i386/strict-cc.c
+Index: gcc-6.git/src/gcc/testsuite/gcc.target/i386/strict-cc.c
===================================================================
--- /dev/null
-+++ gcc-5/src/gcc/testsuite/gcc.target/i386/strict-cc.c
++++ gcc-6.git/src/gcc/testsuite/gcc.target/i386/strict-cc.c
@@ -0,0 +1,22 @@
+/* { dg-do compile { target { ilp32 } } } */
+/* { dg-options "-O2 -funit-at-a-time -fstrict-calling-conventions" } */
diff --git a/debian/rules.patch b/debian/rules.patch
index 652a94e..e0d648d 100644
--- a/debian/rules.patch
+++ b/debian/rules.patch
@@ -405,7 +405,6 @@ ifeq ($(DEB_TARGET_ARCH_OS), illumos)
debian_patches += illumos-boehm-gc
debian_patches += illumos-libgcc-regs
debian_patches += illumos-sysdep-unix.c
- debian_patches += illumos-libgo-lfstack
endif
# don't remove, this is regularly overwritten, see PR sanitizer/63958.