From a365d3e4eb2d8b8c6b52ef6c65c7b1c775db6416 Mon Sep 17 00:00:00 2001
From: Tom Callaway
Date: Sat, 12 Jul 2014 11:07:26 -0400
Subject: [PATCH 1/4] fix license handling
---
gcc.spec | 31 +++++++++++++++++++++++--------
1 file changed, 23 insertions(+), 8 deletions(-)
diff --git a/gcc.spec b/gcc.spec
index 8df6b2f..5d6d05c 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -3,7 +3,7 @@
%global gcc_version 4.9.0
# Note, gcc_release must be integer, if you want to add suffixes to
# %{release}, append them after %{gcc_release} on Release: line.
-%global gcc_release 14
+%global gcc_release 15
%global _unpackaged_files_terminate_build 0
%global _performance_build 1
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
@@ -2193,7 +2193,9 @@ fi
%endif
%dir %{_prefix}/libexec/getconf
%{_prefix}/libexec/getconf/default
-%doc gcc/README* rpm.doc/changelogs/gcc/ChangeLog* gcc/COPYING* COPYING.RUNTIME
+%doc gcc/README* rpm.doc/changelogs/gcc/ChangeLog*
+%{!?_licensedir:%global license %%doc}
+%license gcc/COPYING* COPYING.RUNTIME
%files -n cpp -f cpplib.lang
%defattr(-,root,root,-)
@@ -2210,7 +2212,8 @@ fi
%defattr(-,root,root,-)
/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
/%{_lib}/libgcc_s.so.1
-%doc gcc/COPYING* COPYING.RUNTIME
+%{!?_licensedir:%global license %%doc}
+%license gcc/COPYING* COPYING.RUNTIME
%files c++
%defattr(-,root,root,-)
@@ -2494,7 +2497,8 @@ fi
%defattr(-,root,root,-)
%{_prefix}/%{_lib}/libquadmath.so.0*
%{_infodir}/libquadmath.info*
-%doc rpm.doc/libquadmath/COPYING*
+%{!?_licensedir:%global license %%doc}
+%license rpm.doc/libquadmath/COPYING*
%files -n libquadmath-devel
%defattr(-,root,root,-)
@@ -2609,7 +2613,9 @@ fi
%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libasan.a
%endif
-%doc rpm.doc/changelogs/libsanitizer/ChangeLog* libsanitizer/LICENSE.TXT
+%doc rpm.doc/changelogs/libsanitizer/ChangeLog*
+%{!?_licensedir:%global license %%doc}
+%license libsanitizer/LICENSE.TXT
%endif
%if %{build_libubsan}
@@ -2633,7 +2639,9 @@ fi
%ifnarch sparcv9 sparc64 ppc ppc64 ppc64p7
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libubsan.a
%endif
-%doc rpm.doc/changelogs/libsanitizer/ChangeLog* libsanitizer/LICENSE.TXT
+%doc rpm.doc/changelogs/libsanitizer/ChangeLog*
+%{!?_licensedir:%global license %%doc}
+%license libsanitizer/LICENSE.TXT
%endif
%if %{build_libtsan}
@@ -2647,7 +2655,9 @@ fi
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libtsan.a
-%doc rpm.doc/changelogs/libsanitizer/ChangeLog* libsanitizer/LICENSE.TXT
+%doc rpm.doc/changelogs/libsanitizer/ChangeLog*
+%{!?_licensedir:%global license %%doc}
+%license libsanitizer/LICENSE.TXT
%endif
%if %{build_liblsan}
@@ -2661,7 +2671,9 @@ fi
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/liblsan.a
-%doc rpm.doc/changelogs/libsanitizer/ChangeLog* libsanitizer/LICENSE.TXT
+%doc rpm.doc/changelogs/libsanitizer/ChangeLog*
+%{!?_licensedir:%global license %%doc}
+%license libsanitizer/LICENSE.TXT
%endif
%if %{build_libcilkrts}
@@ -2784,6 +2796,9 @@ fi
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
%changelog
+* Sat Jul 12 2014 Tom Callaway 4.9.0-15
+- fix license handling
+
* Wed Jul 2 2014 Jakub Jelinek 4.9.0-14
- update from the 4.9 branch
- OpenMP 4.0 Fortran support
From b63748e3235e8c507a8422080b34e77232535852 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 16 Jul 2014 17:41:50 +0200
Subject: [PATCH 2/4] 4.9.1-1
---
.gitignore | 1 +
gcc.spec | 30 ++++++++++++++++++------
gcc49-aarch64-GNU_STACK.patch | 13 +++++++++++
gcc49-aarch64-async-unw-tables.patch | 35 ++++++++++++++++++++++++++++
sources | 2 +-
5 files changed, 73 insertions(+), 8 deletions(-)
create mode 100644 gcc49-aarch64-GNU_STACK.patch
create mode 100644 gcc49-aarch64-async-unw-tables.patch
diff --git a/.gitignore b/.gitignore
index 0726ecc..2ed88ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,4 @@
/gcc-4.9.0-20140619.tar.bz2
/gcc-4.9.0-20140625.tar.bz2
/gcc-4.9.0-20140702.tar.bz2
+/gcc-4.9.1-20140716.tar.bz2
diff --git a/gcc.spec b/gcc.spec
index 5d6d05c..59dc9b8 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,9 +1,9 @@
-%global DATE 20140702
-%global SVNREV 212237
-%global gcc_version 4.9.0
+%global DATE 20140716
+%global SVNREV 212670
+%global gcc_version 4.9.1
# Note, gcc_release must be integer, if you want to add suffixes to
# %{release}, append them after %{gcc_release} on Release: line.
-%global gcc_release 15
+%global gcc_release 1
%global _unpackaged_files_terminate_build 0
%global _performance_build 1
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
@@ -52,7 +52,7 @@
%else
%global build_libatomic 0
%endif
-%ifarch %{ix86} x86_64 %{arm} alpha ppc ppc64 ppc64le ppc64p7 s390 s390x
+%ifarch %{ix86} x86_64 %{arm} alpha ppc ppc64 ppc64le ppc64p7 s390 s390x aarch64
%global build_libitm 1
%else
%global build_libitm 0
@@ -86,7 +86,7 @@ License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2
Group: Development/Languages
# The source for this package was pulled from upstream's vcs. Use the
# following commands to generate the tarball:
-# svn export svn://gcc.gnu.org/svn/gcc/branches/redhat/gcc-4_7-branch@%{SVNREV} gcc-%{version}-%{DATE}
+# svn export svn://gcc.gnu.org/svn/gcc/branches/redhat/gcc-4_9-branch@%{SVNREV} gcc-%{version}-%{DATE}
# tar cf - gcc-%{version}-%{DATE} | bzip2 -9 > gcc-%{version}-%{DATE}.tar.bz2
Source0: gcc-%{version}-%{DATE}.tar.bz2
%global isl_version 0.12.2
@@ -197,6 +197,8 @@ Patch14: gcc49-pr56493.patch
Patch15: gcc49-color-auto.patch
Patch16: gcc49-libgo-p224.patch
Patch17: gcc49-pr61673.patch
+Patch18: gcc49-aarch64-async-unw-tables.patch
+Patch19: gcc49-aarch64-GNU_STACK.patch
Patch1100: cloog-%{cloog_version}-ppc64le-config.patch
@@ -724,6 +726,8 @@ package or when debugging this package.
%patch16 -p0 -b .libgo-p224~
rm -f libgo/go/crypto/elliptic/p224{,_test}.go
%patch17 -p0 -b .pr61673~
+%patch18 -p0 -b .aarch64-async-unw-tables~
+%patch19 -p0 -b .aarch64-GNU_STACK~
%if 0%{?_enable_debug_packages}
cat > split-debuginfo.sh <<\EOF
@@ -774,7 +778,7 @@ chmod 755 split-debuginfo.sh
%patch1100 -p0 -b .cloog-ppc64le-config~
-sed -i -e 's/4\.9\.1/4.9.0/' gcc/BASE-VER
+sed -i -e 's/4\.9\.2/4.9.1/' gcc/BASE-VER
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
@@ -2796,6 +2800,18 @@ fi
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
%changelog
+* Wed Jul 16 2014 Jakub Jelinek 4.9.1-1
+- update from the 4.9 branch
+ - GCC 4.9.1 release
+ - PRs c++/58155, c++/58636, c++/61661, fortran/41936, fortran/58883,
+ fortran/61459, libgfortran/61640, middle-end/53590,
+ middle-end/61654, target/59843, target/61062, target/61544,
+ tree-optimization/61680, tree-optimization/61681,
+ tree-optimization/61684, tree-optimization/61725
+- enable libitm on aarch64
+- emit .note.GNU-stack on aarch64 (#1119885)
+- small -fsanitize=bounds fix from the trunk
+
* Sat Jul 12 2014 Tom Callaway 4.9.0-15
- fix license handling
diff --git a/gcc49-aarch64-GNU_STACK.patch b/gcc49-aarch64-GNU_STACK.patch
new file mode 100644
index 0000000..9868dfb
--- /dev/null
+++ b/gcc49-aarch64-GNU_STACK.patch
@@ -0,0 +1,13 @@
+2014-05-15 Kyle McMartin
+
+ * config/aarch64/aarch64-linux.h (TARGET_ASM_FILE_END): Define.
+
+--- gcc/config/aarch64/aarch64-linux.h
++++ gcc/config/aarch64/aarch64-linux.h
+@@ -44,4 +44,6 @@
+ } \
+ while (0)
+
++#define TARGET_ASM_FILE_END file_end_indicate_exec_stack
++
+ #endif /* GCC_AARCH64_LINUX_H */
diff --git a/gcc49-aarch64-async-unw-tables.patch b/gcc49-aarch64-async-unw-tables.patch
new file mode 100644
index 0000000..feec149
--- /dev/null
+++ b/gcc49-aarch64-async-unw-tables.patch
@@ -0,0 +1,35 @@
+2014-04-07 Richard Henderson
+
+ * common/config/aarch64/aarch64-common.c (TARGET_OPTION_INIT_STRUCT):
+ Define.
+ (aarch64_option_init_struct): New function.
+
+--- gcc/common/config/aarch64/aarch64-common.c
++++ gcc/common/config/aarch64/aarch64-common.c
+@@ -39,6 +39,9 @@
+ #undef TARGET_OPTION_OPTIMIZATION_TABLE
+ #define TARGET_OPTION_OPTIMIZATION_TABLE aarch_option_optimization_table
+
++#undef TARGET_OPTION_INIT_STRUCT
++#define TARGET_OPTION_INIT_STRUCT aarch64_option_init_struct
++
+ /* Set default optimization options. */
+ static const struct default_options aarch_option_optimization_table[] =
+ {
+@@ -47,6 +50,16 @@ static const struct default_options aarch_option_optimization_table[] =
+ { OPT_LEVELS_NONE, 0, NULL, 0 }
+ };
+
++/* Implement TARGET_OPTION_INIT_STRUCT. */
++
++static void
++aarch64_option_init_struct (struct gcc_options *opts)
++{
++ /* By default, always emit DWARF-2 unwind info. This allows debugging
++ without maintaining a stack frame back-chain. */
++ opts->x_flag_asynchronous_unwind_tables = 1;
++}
++
+ /* Implement TARGET_HANDLE_OPTION.
+ This function handles the target specific options for CPU/target selection.
+
diff --git a/sources b/sources
index 4c1c618..2167048 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
e34fca0540d840e5d0f6427e98c92252 cloog-0.18.1.tar.gz
-bc3144479589cca83f7d5f958d52283e gcc-4.9.0-20140702.tar.bz2
+eaa66d3e916b82d819d6b62e6df7e4e5 gcc-4.9.1-20140716.tar.bz2
e039bfcfb6c2ab039b8ee69bf883e824 isl-0.12.2.tar.bz2
From c204df3143359ba634c7a971a175e2bbec260ffe Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Wed, 16 Jul 2014 18:02:45 +0200
Subject: [PATCH 3/4] 4.9.1-1
---
gcc.spec | 10 +++----
gcc49-pr61673.patch | 72 ---------------------------------------------
2 files changed, 4 insertions(+), 78 deletions(-)
delete mode 100644 gcc49-pr61673.patch
diff --git a/gcc.spec b/gcc.spec
index 59dc9b8..53716b3 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -196,9 +196,8 @@ Patch12: gcc49-no-add-needed.patch
Patch14: gcc49-pr56493.patch
Patch15: gcc49-color-auto.patch
Patch16: gcc49-libgo-p224.patch
-Patch17: gcc49-pr61673.patch
-Patch18: gcc49-aarch64-async-unw-tables.patch
-Patch19: gcc49-aarch64-GNU_STACK.patch
+Patch17: gcc49-aarch64-async-unw-tables.patch
+Patch18: gcc49-aarch64-GNU_STACK.patch
Patch1100: cloog-%{cloog_version}-ppc64le-config.patch
@@ -725,9 +724,8 @@ package or when debugging this package.
%endif
%patch16 -p0 -b .libgo-p224~
rm -f libgo/go/crypto/elliptic/p224{,_test}.go
-%patch17 -p0 -b .pr61673~
-%patch18 -p0 -b .aarch64-async-unw-tables~
-%patch19 -p0 -b .aarch64-GNU_STACK~
+%patch17 -p0 -b .aarch64-async-unw-tables~
+%patch18 -p0 -b .aarch64-GNU_STACK~
%if 0%{?_enable_debug_packages}
cat > split-debuginfo.sh <<\EOF
diff --git a/gcc49-pr61673.patch b/gcc49-pr61673.patch
deleted file mode 100644
index 0b0c6f8..0000000
--- a/gcc49-pr61673.patch
+++ /dev/null
@@ -1,72 +0,0 @@
-2014-07-02 Jakub Jelinek
-
- PR rtl-optimization/61673
- * combine.c (simplify_comparison): Test just mode's sign bit
- in tmode rather than the sign bit and any bits above it.
-
- * gcc.c-torture/execute/pr61673.c: New test.
-
---- gcc/combine.c.jj 2014-03-28 20:49:52.892077022 +0100
-+++ gcc/combine.c 2014-07-02 16:56:02.260456040 +0200
-@@ -11987,7 +11987,7 @@ simplify_comparison (enum rtx_code code,
- = (unsigned HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1);
- op0 = simplify_gen_binary (AND, tmode,
- gen_lowpart (tmode, op0),
-- gen_int_mode (sign, mode));
-+ gen_int_mode (sign, tmode));
- code = (code == LT) ? NE : EQ;
- break;
- }
---- gcc/testsuite/gcc.c-torture/execute/pr61673.c.jj 2014-07-02 17:17:01.398908630 +0200
-+++ gcc/testsuite/gcc.c-torture/execute/pr61673.c 2014-07-02 17:12:36.000000000 +0200
-@@ -0,0 +1,50 @@
-+/* PR rtl-optimization/61673 */
-+
-+char e;
-+
-+__attribute__((noinline, noclone)) void
-+bar (char x)
-+{
-+ if (x != 0x54 && x != (char) 0x87)
-+ __builtin_abort ();
-+}
-+
-+__attribute__((noinline, noclone)) void
-+foo (const char *x)
-+{
-+ char d = x[0];
-+ int c = d;
-+ if ((c >= 0 && c <= 0x7f) == 0)
-+ e = d;
-+ bar (d);
-+}
-+
-+__attribute__((noinline, noclone)) void
-+baz (const char *x)
-+{
-+ char d = x[0];
-+ int c = d;
-+ if ((c >= 0 && c <= 0x7f) == 0)
-+ e = d;
-+}
-+
-+int
-+main ()
-+{
-+ const char c[] = { 0x54, 0x87 };
-+ e = 0x21;
-+ foo (c);
-+ if (e != 0x21)
-+ __builtin_abort ();
-+ foo (c + 1);
-+ if (e != 0x87)
-+ __builtin_abort ();
-+ e = 0x21;
-+ baz (c);
-+ if (e != 0x21)
-+ __builtin_abort ();
-+ baz (c + 1);
-+ if (e != 0x87)
-+ __builtin_abort ();
-+ return 0;
-+}
From 4503e5ecde6b33ccdedd106ff83be138b9b55442 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek
Date: Thu, 17 Jul 2014 11:18:54 +0200
Subject: [PATCH 4/4] 4.9.1-2
---
.gitignore | 1 +
gcc.spec | 11 ++++++++---
gcc49-libstdc++-docs.patch | 4 ++--
sources | 2 +-
4 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/.gitignore b/.gitignore
index 2ed88ab..ddfe5c3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -16,3 +16,4 @@
/gcc-4.9.0-20140625.tar.bz2
/gcc-4.9.0-20140702.tar.bz2
/gcc-4.9.1-20140716.tar.bz2
+/gcc-4.9.1-20140717.tar.bz2
diff --git a/gcc.spec b/gcc.spec
index 53716b3..9ce314a 100644
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,9 +1,9 @@
-%global DATE 20140716
-%global SVNREV 212670
+%global DATE 20140717
+%global SVNREV 212747
%global gcc_version 4.9.1
# Note, gcc_release must be integer, if you want to add suffixes to
# %{release}, append them after %{gcc_release} on Release: line.
-%global gcc_release 1
+%global gcc_release 2
%global _unpackaged_files_terminate_build 0
%global _performance_build 1
%global multilib_64_archs sparc64 ppc64 ppc64p7 s390x x86_64
@@ -2798,6 +2798,11 @@ fi
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
%changelog
+* Thu Jul 17 2014 Jakub Jelinek 4.9.1-2
+- update from the 4.9 branch
+ - PRs c-family/61741, rtl-optimization/61801, target/61737,
+ tree-optimization/61779
+
* Wed Jul 16 2014 Jakub Jelinek 4.9.1-1
- update from the 4.9 branch
- GCC 4.9.1 release
diff --git a/gcc49-libstdc++-docs.patch b/gcc49-libstdc++-docs.patch
index dd328a2..2c8c2b8 100644
--- a/gcc49-libstdc++-docs.patch
+++ b/gcc49-libstdc++-docs.patch
@@ -4,7 +4,7 @@
FSF
-+ Release 4.9.0
++ Release 4.9.1
+
Permission is granted to copy, distribute and/or modify this
document under the terms of the GNU Free Documentation
@@ -18,7 +18,7 @@
- The API documentation, rendered into HTML, can be viewed online:
+ The API documentation, rendered into HTML, can be viewed here: