[cross-gcc] Move to gcc-4.9.2-2
David Howells
dhowells at fedoraproject.org
Fri Dec 12 15:33:13 UTC 2014
commit 16d1e7e40b37e12ada54e2414402fe5de0f490c4
Author: David Howells <dhowells at redhat.com>
Date: Wed Dec 10 21:34:04 2014 +0000
Move to gcc-4.9.2-2
.gitignore | 2 +-
cross-gcc-sh-libgcc.patch | 40 -----
cross-gcc.spec | 49 +++---
gcc49-aarch64-GNU_STACK.patch | 13 --
gcc49-aarch64-unwind-opt.patch | 338 ++++++++++++++++++++++++++++++++++++
gcc49-i386-libgomp.patch | 9 -
gcc49-libstdc++-docs.patch | 4 +-
gcc49-pr56493.patch | 76 --------
gcc49-pr64269.patch | 42 +++++
gcc49-rh1117799.patch | 39 ----
gcc49-sparc-config-detection.patch | 2 +-
sources | 2 +-
12 files changed, 407 insertions(+), 209 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 2a17eca..41c8cb0 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,3 @@
/cloog-0.18.1.tar.gz
/isl-0.12.2.tar.bz2
-/gcc-4.9.1-20140717.tar.bz2
+/gcc-4.9.2-20141212.tar.bz2
diff --git a/cross-gcc.spec b/cross-gcc.spec
index 7eebf11..98f8b58 100644
--- a/cross-gcc.spec
+++ b/cross-gcc.spec
@@ -64,16 +64,16 @@
# The gcc versioning information. In a sed command below, the specfile winds
# pre-release version numbers in BASE-VER back to the last actually-released
# number.
-%global DATE 20140717
-%global SVNREV 212747
-%global gcc_version 4.9.1
+%global DATE 20141212
+%global SVNREV 218667
+%global gcc_version 4.9.2
# Note, cross_gcc_release must be integer, if you want to add suffixes
# to %{release}, append them after %{cross_gcc_release} on Release:
# line. gcc_release is the Fedora gcc release that the patches were
# taken from.
%global gcc_release 2
-%global cross_gcc_release 3
+%global cross_gcc_release 1
%global cross_binutils_version 2.24-5
Summary: Cross C compiler
@@ -110,24 +110,19 @@ Patch9: gcc49-cloog-dl2.patch
Patch10: gcc49-pr38757.patch
Patch11: gcc49-libstdc++-docs.patch
Patch12: gcc49-no-add-needed.patch
-Patch14: gcc49-pr56493.patch
-Patch15: gcc49-color-auto.patch
-Patch16: gcc49-libgo-p224.patch
-Patch17: gcc49-aarch64-async-unw-tables.patch
-Patch18: gcc49-aarch64-GNU_STACK.patch
-
-# backport from trunk
-Patch100: gcc49-rh1117799.patch
+Patch13: gcc49-color-auto.patch
+Patch14: gcc49-libgo-p224.patch
+Patch15: gcc49-aarch64-async-unw-tables.patch
+Patch16: gcc49-aarch64-unwind-opt.patch
+Patch17: gcc49-pr64269.patch
Patch900: cross-intl-filename.patch
# ia64 - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44553
# m68k - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53557
# alpha - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55344
Patch901: cross-gcc-with-libgcc.patch
-Patch902: cross-gcc-sh-libgcc.patch
Patch903: cross-gcc-bfin.patch
Patch904: cross-gcc-c6x.patch
-Patch905: cross-gcc-sh64-libgcc.patch
Patch1100: cloog-0.18.1-ppc64le-config.patch
@@ -166,7 +161,7 @@ number of packages.
%if %2 \
%package -n %{rpmprefix}gcc-%1 \
Summary: Cross-build binary utilities for %1 \
-Group: Development/Tools \
+Group: Development/Languages \
Requires: %{cross}-gcc-common == %{version}-%{release} \
BuildRequires: %{rpmprefix}binutils-%1 >= %{cross_binutils_version} \
Requires: %{rpmprefix}binutils-%1 >= %{cross_binutils_version} \
@@ -179,7 +174,7 @@ the number of packages. \
\
%package -n %{rpmprefix}gcc-c++-%1 \
Summary: Cross-build binary utilities for %1 \
-Group: Development/Tools \
+Group: Development/Languages \
Requires: %{rpmprefix}gcc-%1 == %{version}-%{release} \
%description -n %{rpmprefix}gcc-c++-%1 \
Cross-build GNU C++ compiler. \
@@ -193,7 +188,7 @@ the number of packages. \
%if %2 \
%package -n gcc-%1 \
Summary: Cross-build binary utilities for %1 \
-Group: Development/Tools \
+Group: Development/Languages \
Requires: gcc-%3 == %{version}-%{release} \
%description -n gcc-%1 \
Cross-build GNU C++ compiler. \
@@ -204,7 +199,7 @@ the number of packages. \
\
%package -n gcc-c++-%1 \
Summary: Cross-build binary utilities for %1 \
-Group: Development/Tools \
+Group: Development/Languages \
Requires: gcc-%1 == %{version}-%{release} \
Requires: gcc-c++-%3 == %{version}-%{release} \
%description -n gcc-c++-%1 \
@@ -280,29 +275,26 @@ cd %{srcdir}
# % patch11 -p0 -b .libstdc++-docs~
# % endif
%patch12 -p0 -b .no-add-needed~
-%patch14 -p0 -b .pr56493~
%if 0%{?fedora} >= 20 || 0%{?rhel} >= 7
-%patch15 -p0 -b .color-auto~
+%patch13 -p0 -b .color-auto~
%endif
-%patch16 -p0 -b .libgo-p224~
+%patch14 -p0 -b .libgo-p224~
rm -f libgo/go/crypto/elliptic/p224{,_test}.go
-%patch17 -p0 -b .aarch64-async-unw-tables~
-%patch18 -p0 -b .aarch64-GNU_STACK~
-%patch100 -p1 -b .rh1117799~
+%patch15 -p0 -b .aarch64-async-unw-tables~
+%patch16 -p0 -b .aarch64-unwind-opt~
+%patch17 -p0 -b .pr64269~
%patch900 -p0 -b .cross-intl~
%patch901 -p1 -b .with-libgcc~
-%patch902 -p0 -b .sh-libgcc~
%patch903 -p0 -b .bfin~
%patch904 -p0 -b .c6x~
-%patch905 -p0 -b .sh64-libgcc~
cd ..
%patch1100 -p0 -b .cloog-ppc64le-config~
cd %{srcdir}
# Move the version number back
-sed -i -e 's/4\.9\.2/4.9.1/' gcc/BASE-VER
+sed -i -e 's/4\.9\.3/4.9.2/' gcc/BASE-VER
echo 'Red Hat Cross %{version}-%{cross_gcc_release}' > gcc/DEV-PHASE
%if 0%{?fedora} >= 16 || 0%{?rhel} >= 7
@@ -877,6 +869,9 @@ rm -rf %{buildroot}
%do_files xtensa-linux-gnu %{build_xtensa}
%changelog
+* Fri Dec 12 2014 David Howells <dhowells at redhat.com> - 4.9.2-1
+- Rebase on gcc-4.9.2-2.
+
* Fri Dec 12 2014 David Howells <dhowells at redhat.com> - 4.9.1-3
- Enable libgcc building on sh64 [gcc BZ 61844].
diff --git a/gcc49-aarch64-unwind-opt.patch b/gcc49-aarch64-unwind-opt.patch
new file mode 100644
index 0000000..3ad55ab
--- /dev/null
+++ b/gcc49-aarch64-unwind-opt.patch
@@ -0,0 +1,338 @@
+2014-08-08 Richard Henderson <rth at redhat.com>
+
+ * config/aarch64/aarch64.c (aarch64_save_or_restore_fprs): Add
+ cfi_ops argument, for restore put REG_CFA_RESTORE notes into
+ *cfi_ops rather than on individual insns. Cleanup.
+ (aarch64_save_or_restore_callee_save_registers): Likewise.
+ (aarch64_expand_prologue): Adjust caller.
+ (aarch64_expand_epilogue): Likewise. Cleanup. Emit queued cfi_ops
+ on the stack restore insn.
+
+--- gcc/config/aarch64/aarch64.c.jj 2014-07-08 17:38:17.398231989 +0200
++++ gcc/config/aarch64/aarch64.c 2014-08-13 10:02:45.599757706 +0200
+@@ -1810,8 +1810,7 @@ aarch64_register_saved_on_entry (int reg
+
+ static void
+ aarch64_save_or_restore_fprs (int start_offset, int increment,
+- bool restore, rtx base_rtx)
+-
++ bool restore, rtx base_rtx, rtx *cfi_ops)
+ {
+ unsigned regno;
+ unsigned regno2;
+@@ -1819,16 +1818,16 @@ aarch64_save_or_restore_fprs (int start_
+ rtx (*gen_mem_ref)(enum machine_mode, rtx)
+ = (frame_pointer_needed)? gen_frame_mem : gen_rtx_MEM;
+
+-
+ for (regno = V0_REGNUM; regno <= V31_REGNUM; regno++)
+ {
+ if (aarch64_register_saved_on_entry (regno))
+ {
+- rtx mem;
++ rtx mem, reg1;
+ mem = gen_mem_ref (DFmode,
+ plus_constant (Pmode,
+ base_rtx,
+ start_offset));
++ reg1 = gen_rtx_REG (DFmode, regno);
+
+ for (regno2 = regno + 1;
+ regno2 <= V31_REGNUM
+@@ -1840,56 +1839,51 @@ aarch64_save_or_restore_fprs (int start_
+ if (regno2 <= V31_REGNUM &&
+ aarch64_register_saved_on_entry (regno2))
+ {
+- rtx mem2;
++ rtx mem2, reg2;
+ /* Next highest register to be saved. */
+ mem2 = gen_mem_ref (DFmode,
+ plus_constant
+ (Pmode,
+ base_rtx,
+ start_offset + increment));
++ reg2 = gen_rtx_REG (DFmode, regno2);
++
+ if (restore == false)
+ {
+- insn = emit_insn
+- ( gen_store_pairdf (mem, gen_rtx_REG (DFmode, regno),
+- mem2, gen_rtx_REG (DFmode, regno2)));
+-
++ insn = emit_insn (gen_store_pairdf (mem, reg1, mem2, reg2));
++ /* The first part of a frame-related parallel insn
++ is always assumed to be relevant to the frame
++ calculations; subsequent parts, are only
++ frame-related if explicitly marked. */
++ RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1;
++ RTX_FRAME_RELATED_P (insn) = 1;
+ }
+ else
+ {
+- insn = emit_insn
+- ( gen_load_pairdf (gen_rtx_REG (DFmode, regno), mem,
+- gen_rtx_REG (DFmode, regno2), mem2));
+-
+- add_reg_note (insn, REG_CFA_RESTORE,
+- gen_rtx_REG (DFmode, regno));
+- add_reg_note (insn, REG_CFA_RESTORE,
+- gen_rtx_REG (DFmode, regno2));
++ emit_insn (gen_load_pairdf (reg1, mem, reg2, mem2));
++ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg1, *cfi_ops);
++ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg2, *cfi_ops);
+ }
+
+- /* The first part of a frame-related parallel insn
+- is always assumed to be relevant to the frame
+- calculations; subsequent parts, are only
+- frame-related if explicitly marked. */
+- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1;
+ regno = regno2;
+ start_offset += increment * 2;
+ }
+ else
+ {
+ if (restore == false)
+- insn = emit_move_insn (mem, gen_rtx_REG (DFmode, regno));
++ {
++ insn = emit_move_insn (mem, reg1);
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
+ else
+ {
+- insn = emit_move_insn (gen_rtx_REG (DFmode, regno), mem);
+- add_reg_note (insn, REG_CFA_RESTORE,
+- gen_rtx_REG (DImode, regno));
++ emit_move_insn (reg1, mem);
++ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg1, *cfi_ops);
+ }
+ start_offset += increment;
+ }
+- RTX_FRAME_RELATED_P (insn) = 1;
+ }
+ }
+-
+ }
+
+
+@@ -1897,13 +1891,14 @@ aarch64_save_or_restore_fprs (int start_
+ restore's have to happen. */
+ static void
+ aarch64_save_or_restore_callee_save_registers (HOST_WIDE_INT offset,
+- bool restore)
++ bool restore, rtx *cfi_ops)
+ {
+ rtx insn;
+ rtx base_rtx = stack_pointer_rtx;
+ HOST_WIDE_INT start_offset = offset;
+ HOST_WIDE_INT increment = UNITS_PER_WORD;
+- rtx (*gen_mem_ref)(enum machine_mode, rtx) = (frame_pointer_needed)? gen_frame_mem : gen_rtx_MEM;
++ rtx (*gen_mem_ref)(enum machine_mode, rtx)
++ = (frame_pointer_needed)? gen_frame_mem : gen_rtx_MEM;
+ unsigned limit = (frame_pointer_needed)? R28_REGNUM: R30_REGNUM;
+ unsigned regno;
+ unsigned regno2;
+@@ -1912,11 +1907,13 @@ aarch64_save_or_restore_callee_save_regi
+ {
+ if (aarch64_register_saved_on_entry (regno))
+ {
+- rtx mem;
++ rtx mem, reg1;
++
+ mem = gen_mem_ref (Pmode,
+ plus_constant (Pmode,
+ base_rtx,
+ start_offset));
++ reg1 = gen_rtx_REG (DImode, regno);
+
+ for (regno2 = regno + 1;
+ regno2 <= limit
+@@ -1928,56 +1925,54 @@ aarch64_save_or_restore_callee_save_regi
+ if (regno2 <= limit &&
+ aarch64_register_saved_on_entry (regno2))
+ {
+- rtx mem2;
++ rtx mem2, reg2;
+ /* Next highest register to be saved. */
+ mem2 = gen_mem_ref (Pmode,
+ plus_constant
+ (Pmode,
+ base_rtx,
+ start_offset + increment));
++ reg2 = gen_rtx_REG (DImode, regno2);
++
+ if (restore == false)
+ {
+- insn = emit_insn
+- ( gen_store_pairdi (mem, gen_rtx_REG (DImode, regno),
+- mem2, gen_rtx_REG (DImode, regno2)));
+-
++ insn = emit_insn (gen_store_pairdi (mem, reg1, mem2, reg2));
++ /* The first part of a frame-related parallel insn
++ is always assumed to be relevant to the frame
++ calculations; subsequent parts, are only
++ frame-related if explicitly marked. */
++ RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1;
++ RTX_FRAME_RELATED_P (insn) = 1;
+ }
+ else
+ {
+- insn = emit_insn
+- ( gen_load_pairdi (gen_rtx_REG (DImode, regno), mem,
+- gen_rtx_REG (DImode, regno2), mem2));
+-
+- add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (DImode, regno));
+- add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (DImode, regno2));
++ emit_insn (gen_load_pairdi (reg1, mem, reg2, mem2));
++ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg1, *cfi_ops);
++ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg2, *cfi_ops);
+ }
+
+- /* The first part of a frame-related parallel insn
+- is always assumed to be relevant to the frame
+- calculations; subsequent parts, are only
+- frame-related if explicitly marked. */
+- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0,
+- 1)) = 1;
+ regno = regno2;
+ start_offset += increment * 2;
+ }
+ else
+ {
+ if (restore == false)
+- insn = emit_move_insn (mem, gen_rtx_REG (DImode, regno));
++ {
++ insn = emit_move_insn (mem, reg1);
++ RTX_FRAME_RELATED_P (insn) = 1;
++ }
+ else
+ {
+- insn = emit_move_insn (gen_rtx_REG (DImode, regno), mem);
+- add_reg_note (insn, REG_CFA_RESTORE, gen_rtx_REG (DImode, regno));
++ emit_move_insn (reg1, mem);
++ *cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg1, *cfi_ops);
+ }
+ start_offset += increment;
+ }
+- RTX_FRAME_RELATED_P (insn) = 1;
+ }
+ }
+
+- aarch64_save_or_restore_fprs (start_offset, increment, restore, base_rtx);
+-
++ aarch64_save_or_restore_fprs (start_offset, increment, restore,
++ base_rtx, cfi_ops);
+ }
+
+ /* AArch64 stack frames generated by this compiler look like:
+@@ -2179,7 +2174,7 @@ aarch64_expand_prologue (void)
+ }
+
+ aarch64_save_or_restore_callee_save_registers
+- (fp_offset + cfun->machine->frame.hardfp_offset, 0);
++ (fp_offset + cfun->machine->frame.hardfp_offset, 0, NULL);
+ }
+
+ /* when offset >= 512,
+@@ -2248,15 +2243,18 @@ aarch64_expand_epilogue (bool for_sibcal
+ insn = emit_insn (gen_add3_insn (stack_pointer_rtx,
+ hard_frame_pointer_rtx,
+ GEN_INT (- fp_offset)));
++ /* CFA should be calculated from the value of SP from now on. */
++ add_reg_note (insn, REG_CFA_ADJUST_CFA,
++ gen_rtx_SET (VOIDmode, stack_pointer_rtx,
++ plus_constant (Pmode, hard_frame_pointer_rtx,
++ -fp_offset)));
+ RTX_FRAME_RELATED_P (insn) = 1;
+- /* As SP is set to (FP - fp_offset), according to the rules in
+- dwarf2cfi.c:dwarf2out_frame_debug_expr, CFA should be calculated
+- from the value of SP from now on. */
+ cfa_reg = stack_pointer_rtx;
+ }
+
++ rtx cfi_ops = NULL;
+ aarch64_save_or_restore_callee_save_registers
+- (fp_offset + cfun->machine->frame.hardfp_offset, 1);
++ (fp_offset + cfun->machine->frame.hardfp_offset, 1, &cfi_ops);
+
+ /* Restore the frame pointer and lr if the frame pointer is needed. */
+ if (offset > 0)
+@@ -2264,6 +2262,8 @@ aarch64_expand_epilogue (bool for_sibcal
+ if (frame_pointer_needed)
+ {
+ rtx mem_fp, mem_lr;
++ rtx reg_fp = hard_frame_pointer_rtx;
++ rtx reg_lr = gen_rtx_REG (DImode, LR_REGNUM);
+
+ if (fp_offset)
+ {
+@@ -2276,52 +2276,36 @@ aarch64_expand_epilogue (bool for_sibcal
+ stack_pointer_rtx,
+ fp_offset
+ + UNITS_PER_WORD));
+- insn = emit_insn (gen_load_pairdi (hard_frame_pointer_rtx,
+- mem_fp,
+- gen_rtx_REG (DImode,
+- LR_REGNUM),
+- mem_lr));
++ emit_insn (gen_load_pairdi (reg_fp, mem_fp, reg_lr, mem_lr));
++
++ insn = emit_insn (gen_add2_insn (stack_pointer_rtx,
++ GEN_INT (offset)));
+ }
+ else
+ {
+ insn = emit_insn (gen_loadwb_pairdi_di
+- (stack_pointer_rtx,
+- stack_pointer_rtx,
+- hard_frame_pointer_rtx,
+- gen_rtx_REG (DImode, LR_REGNUM),
+- GEN_INT (offset),
++ (stack_pointer_rtx, stack_pointer_rtx,
++ reg_fp, reg_lr, GEN_INT (offset),
+ GEN_INT (GET_MODE_SIZE (DImode) + offset)));
+- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 2)) = 1;
+- add_reg_note (insn, REG_CFA_ADJUST_CFA,
+- (gen_rtx_SET (Pmode, stack_pointer_rtx,
+- plus_constant (Pmode, cfa_reg,
+- offset))));
+- }
+-
+- /* The first part of a frame-related parallel insn
+- is always assumed to be relevant to the frame
+- calculations; subsequent parts, are only
+- frame-related if explicitly marked. */
+- RTX_FRAME_RELATED_P (XVECEXP (PATTERN (insn), 0, 1)) = 1;
+- RTX_FRAME_RELATED_P (insn) = 1;
+- add_reg_note (insn, REG_CFA_RESTORE, hard_frame_pointer_rtx);
+- add_reg_note (insn, REG_CFA_RESTORE,
+- gen_rtx_REG (DImode, LR_REGNUM));
+-
+- if (fp_offset)
+- {
+- insn = emit_insn (gen_add2_insn (stack_pointer_rtx,
+- GEN_INT (offset)));
+- RTX_FRAME_RELATED_P (insn) = 1;
+ }
++ cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg_fp, cfi_ops);
++ cfi_ops = alloc_reg_note (REG_CFA_RESTORE, reg_lr, cfi_ops);
+ }
+ else
+ {
+ insn = emit_insn (gen_add2_insn (stack_pointer_rtx,
+ GEN_INT (offset)));
+- RTX_FRAME_RELATED_P (insn) = 1;
+ }
++ cfi_ops = alloc_reg_note (REG_CFA_ADJUST_CFA,
++ gen_rtx_SET (VOIDmode, stack_pointer_rtx,
++ plus_constant (Pmode, cfa_reg,
++ offset)),
++ cfi_ops);
++ REG_NOTES (insn) = cfi_ops;
++ RTX_FRAME_RELATED_P (insn) = 1;
+ }
++ else
++ gcc_assert (cfi_ops == NULL);
+
+ /* Stack adjustment for exception handler. */
+ if (crtl->calls_eh_return)
diff --git a/gcc49-i386-libgomp.patch b/gcc49-i386-libgomp.patch
index 45883a6..520561e 100644
--- a/gcc49-i386-libgomp.patch
+++ b/gcc49-i386-libgomp.patch
@@ -9,12 +9,3 @@
fi
esac
;;
-@@ -79,7 +79,7 @@ if test $enable_linux_futex = yes; then
- config_path="linux/x86 linux posix"
- case " ${CC} ${CFLAGS} " in
- *" -m32 "*)
-- XCFLAGS="${XCFLAGS} -march=i486 -mtune=i686"
-+ XCFLAGS="${XCFLAGS} -march=i486 -mtune=generic"
- ;;
- esac
- ;;
diff --git a/gcc49-libstdc++-docs.patch b/gcc49-libstdc++-docs.patch
index dd328a2..ee8598a 100644
--- a/gcc49-libstdc++-docs.patch
+++ b/gcc49-libstdc++-docs.patch
@@ -4,7 +4,7 @@
<a class="link" href="http://www.fsf.org/" target="_top">FSF
</a>
</p><p>
-+ Release 4.9.0
++ Release 4.9.2
+ </p><p>
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:
</p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>
-+ <a class="link" href="api/index.html" target="_top">for the 4.9.0 release, local
++ <a class="link" href="api/index.html" target="_top">for the 4.9.2 release, local
+ </a>
+ </p></li><li class="listitem"><p>
<a class="link" href="http://gcc.gnu.org/onlinedocs/libstdc++/libstdc++-html-USERS-3.4/index.html" target="_top">for the 3.4 release
diff --git a/gcc49-pr64269.patch b/gcc49-pr64269.patch
new file mode 100644
index 0000000..baf7c59
--- /dev/null
+++ b/gcc49-pr64269.patch
@@ -0,0 +1,42 @@
+2014-12-12 Jakub Jelinek <jakub at redhat.com>
+
+ PR tree-optimization/64269
+ * tree-ssa-forwprop.c (simplify_builtin_call): Bail out if
+ len2 or diff are too large.
+
+ * gcc.c-torture/compile/pr64269.c: New test.
+
+--- gcc/tree-ssa-forwprop.c.jj 2014-12-01 14:57:30.000000000 +0100
++++ gcc/tree-ssa-forwprop.c 2014-12-12 09:46:05.790053928 +0100
+@@ -1288,7 +1288,8 @@ simplify_builtin_call (gimple_stmt_itera
+ use_operand_p use_p;
+
+ if (!tree_fits_shwi_p (val2)
+- || !tree_fits_uhwi_p (len2))
++ || !tree_fits_uhwi_p (len2)
++ || compare_tree_int (len2, 1024) == 1)
+ break;
+ if (is_gimple_call (stmt1))
+ {
+@@ -1354,7 +1355,8 @@ simplify_builtin_call (gimple_stmt_itera
+ is not constant, or is bigger than memcpy length, bail out. */
+ if (diff == NULL
+ || !tree_fits_uhwi_p (diff)
+- || tree_int_cst_lt (len1, diff))
++ || tree_int_cst_lt (len1, diff)
++ || compare_tree_int (diff, 1024) == 1)
+ break;
+
+ /* Use maximum of difference plus memset length and memcpy length
+--- gcc/testsuite/gcc.c-torture/compile/pr64269.c.jj 2014-12-12 09:47:04.795015479 +0100
++++ gcc/testsuite/gcc.c-torture/compile/pr64269.c 2014-12-12 09:46:51.000000000 +0100
+@@ -0,0 +1,9 @@
++/* PR tree-optimization/64269 */
++
++void
++foo (char *p)
++{
++ __SIZE_TYPE__ s = ~(__SIZE_TYPE__)0;
++ *p = 0;
++ __builtin_memset (p + 1, 0, s);
++}
diff --git a/gcc49-sparc-config-detection.patch b/gcc49-sparc-config-detection.patch
index cd683a0..a37018e 100644
--- a/gcc49-sparc-config-detection.patch
+++ b/gcc49-sparc-config-detection.patch
@@ -2,7 +2,7 @@
+++ gcc/config.gcc 2008-04-24 15:44:51.000000000 -0500
@@ -2656,7 +2656,7 @@ sparc-*-rtems*)
tm_file="${tm_file} dbxelf.h elfos.h sparc/sysv4.h sparc/sp-elf.h sparc/rtemself.h rtems.h newlib-stdint.h"
- tmake_file="${tmake_file} sparc/t-sparc sparc/t-elf sparc/t-rtems"
+ tmake_file="${tmake_file} sparc/t-sparc sparc/t-rtems"
;;
-sparc-*-linux*)
+sparc-*-linux* | sparcv9-*-linux*)
diff --git a/sources b/sources
index 3892f03..121f27f 100644
--- a/sources
+++ b/sources
@@ -1,3 +1,3 @@
e039bfcfb6c2ab039b8ee69bf883e824 isl-0.12.2.tar.bz2
e34fca0540d840e5d0f6427e98c92252 cloog-0.18.1.tar.gz
-0f7586f719b329cfc5e03005e902e9b6 gcc-4.9.1-20140717.tar.bz2
+ccd8cac944582f8d2ddf5274a15df176 gcc-4.9.2-20141212.tar.bz2
More information about the scm-commits
mailing list