summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-23 17:03:26 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-01-27 13:15:28 +0000
commitc391593402109944bacc6f75693a6d21adb0b071 (patch)
treea7a04369eeb6e90610041ff4559199cf4b01cc9f
parentfa2fcaee9785f7eeadad890c40fd075fb85aaa78 (diff)
downloadpoky-c391593402109944bacc6f75693a6d21adb0b071.tar.gz
gcc: Upgrade 7.2 -> 7.3
The static PIE patch was updated by Juro Bystricky <juro.bystricky@intel.com> to work with gcc 7.3. This update from the stable gcc 7 branch includes the retpoline functionality which is useful to assist with recent security issues. Two backported patches were dropped as they're included in 7.3. (From OE-Core rev: a4c1ede6876ad6b84ab2b3bece14bf0afdc9d6b7) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.2/0001-PR-rtl-optimization-81803.patch52
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.2/0048-gcc-Enable-static-PIE.patch37
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.2/0051-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch194
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3.inc (renamed from meta/recipes-devtools/gcc/gcc-7.2.inc)13
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0008-c99-snprintf.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0008-c99-snprintf.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0009-gcc-poison-system-directories.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0009-gcc-poison-system-directories.patch)6
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0010-gcc-poison-dir-extend.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0010-gcc-poison-dir-extend.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0012-64-bit-multilib-hack.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0012-64-bit-multilib-hack.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0013-optional-libstdc.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0013-optional-libstdc.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0015-COLLECT_GCC_OPTIONS.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0015-COLLECT_GCC_OPTIONS.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0017-fortran-cross-compile-hack.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0017-fortran-cross-compile-hack.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0018-cpp-honor-sysroot.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0018-cpp-honor-sysroot.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0019-MIPS64-Default-to-N64-ABI.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0019-MIPS64-Default-to-N64-ABI.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0021-gcc-Fix-argument-list-too-long-error.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0021-gcc-Fix-argument-list-too-long-error.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0022-Disable-sdt.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0022-Disable-sdt.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0023-libtool.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0023-libtool.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0027-export-CPP.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0027-export-CPP.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0030-Ensure-target-gcc-headers-can-be-included.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0030-Ensure-target-gcc-headers-can-be-included.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0034-aarch64-Add-support-for-musl-ldso.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0034-aarch64-Add-support-for-musl-ldso.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0036-handle-sysroot-support-for-nativesdk-gcc.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0036-handle-sysroot-support-for-nativesdk-gcc.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0038-Fix-various-_FOR_BUILD-and-related-variables.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0046-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0046-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0047-sync-gcc-stddef.h-with-musl.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0047-sync-gcc-stddef.h-with-musl.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch46
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-7.3/fix-segmentation-fault-precompiled-hdr.patch (renamed from meta/recipes-devtools/gcc/gcc-7.2/fix-segmentation-fault-precompiled-hdr.patch)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-common.inc1
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-canadian_7.3.bb (renamed from meta/recipes-devtools/gcc/gcc-cross-canadian_7.2.bb)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross-initial_7.3.bb (renamed from meta/recipes-devtools/gcc/gcc-cross-initial_7.2.bb)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-cross_7.3.bb (renamed from meta/recipes-devtools/gcc/gcc-cross_7.2.bb)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk-initial_7.3.bb (renamed from meta/recipes-devtools/gcc/gcc-crosssdk-initial_7.2.bb)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-crosssdk_7.3.bb (renamed from meta/recipes-devtools/gcc/gcc-crosssdk_7.2.bb)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime_7.3.bb (renamed from meta/recipes-devtools/gcc/gcc-runtime_7.2.bb)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-sanitizers_7.3.bb (renamed from meta/recipes-devtools/gcc/gcc-sanitizers_7.2.bb)0
-rw-r--r--meta/recipes-devtools/gcc/gcc-source_7.3.bb (renamed from meta/recipes-devtools/gcc/gcc-source_7.2.bb)0
-rw-r--r--meta/recipes-devtools/gcc/gcc_7.3.bb (renamed from meta/recipes-devtools/gcc/gcc_7.2.bb)0
-rw-r--r--meta/recipes-devtools/gcc/libgcc-initial_7.3.bb (renamed from meta/recipes-devtools/gcc/libgcc-initial_7.2.bb)0
-rw-r--r--meta/recipes-devtools/gcc/libgcc_7.3.bb (renamed from meta/recipes-devtools/gcc/libgcc_7.2.bb)0
-rw-r--r--meta/recipes-devtools/gcc/libgfortran_7.3.bb (renamed from meta/recipes-devtools/gcc/libgfortran_7.2.bb)0
61 files changed, 56 insertions, 293 deletions
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0001-PR-rtl-optimization-81803.patch b/meta/recipes-devtools/gcc/gcc-7.2/0001-PR-rtl-optimization-81803.patch
deleted file mode 100644
index 292e734a2f..0000000000
--- a/meta/recipes-devtools/gcc/gcc-7.2/0001-PR-rtl-optimization-81803.patch
+++ /dev/null
@@ -1,52 +0,0 @@
1From 5cbb8e6b1122092b3eaabd4270b2f316aa40407c Mon Sep 17 00:00:00 2001
2From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Tue, 31 Oct 2017 18:27:52 +0000
4Subject: [PATCH] PR rtl-optimization/81803 * lra-constraints.c
5 (curr_insn_transform): Also reload the whole register for a strict subreg
6 no wider than a word if this is for a WORD_REGISTER_OPERATIONS target.
7
8git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254275 138bc75d-0d04-0410-961f-82ee72b054a4
9
10Upstream-Status: Backport
11
12This patch removes changes to Changelog from the original patch upstream. This is
13because we are backporting a patch to a stable version, making changes to Changelog,
14especially up '* GCC 7.2.0 released.', feels a little weird.
15
16Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
17---
18 gcc/lra-constraints.c | 11 ++++++++---
19 2 files changed, 16 insertions(+), 3 deletions(-)
20
21diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
22index a423f069836..3758409bb9c 100644
23--- a/gcc/lra-constraints.c
24+++ b/gcc/lra-constraints.c
25@@ -4207,8 +4207,9 @@ curr_insn_transform (bool check_only_p)
26 reg = SUBREG_REG (*loc);
27 byte = SUBREG_BYTE (*loc);
28 if (REG_P (reg)
29- /* Strict_low_part requires reload the register not
30- the sub-register. */
31+ /* Strict_low_part requires reloading the register and not
32+ just the subreg. Likewise for a strict subreg no wider
33+ than a word for WORD_REGISTER_OPERATIONS targets. */
34 && (curr_static_id->operand[i].strict_low
35 || (!paradoxical_subreg_p (mode, GET_MODE (reg))
36 && (hard_regno
37@@ -4219,7 +4220,11 @@ curr_insn_transform (bool check_only_p)
38 && (goal_alt[i] == NO_REGS
39 || (simplify_subreg_regno
40 (ira_class_hard_regs[goal_alt[i]][0],
41- GET_MODE (reg), byte, mode) >= 0)))))
42+ GET_MODE (reg), byte, mode) >= 0)))
43+ || (GET_MODE_PRECISION (mode)
44+ < GET_MODE_PRECISION (GET_MODE (reg))
45+ && GET_MODE_SIZE (GET_MODE (reg)) <= UNITS_PER_WORD
46+ && WORD_REGISTER_OPERATIONS)))
47 {
48 /* An OP_INOUT is required when reloading a subreg of a
49 mode wider than a word to ensure that data beyond the
50--
512.13.0
52
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0048-gcc-Enable-static-PIE.patch b/meta/recipes-devtools/gcc/gcc-7.2/0048-gcc-Enable-static-PIE.patch
deleted file mode 100644
index 879e360cf3..0000000000
--- a/meta/recipes-devtools/gcc/gcc-7.2/0048-gcc-Enable-static-PIE.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From 44ef80688b56beea85c0070840dea1e2a4e34aed Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 13 Jun 2017 12:12:52 -0700
4Subject: [PATCH 49/49] gcc: Enable static PIE
5
6Static PIE support in GCC
7see
8https://gcc.gnu.org/ml/gcc/2015-06/msg00008.html
9
10Upstream-Status: Pending
11
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 gcc/config/gnu-user.h | 6 +++---
15 1 file changed, 3 insertions(+), 3 deletions(-)
16
17diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
18index 2787a3d16be..ee7b781319e 100644
19--- a/gcc/config/gnu-user.h
20+++ b/gcc/config/gnu-user.h
21@@ -51,10 +51,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
22 #if defined HAVE_LD_PIE
23 #define GNU_USER_TARGET_STARTFILE_SPEC \
24 "%{!shared: %{pg|p|profile:gcrt1.o%s;: \
25- %{" PIE_SPEC ":Scrt1.o%s} %{" NO_PIE_SPEC ":crt1.o%s}}} \
26- crti.o%s %{static:crtbeginT.o%s;: %{shared:crtbeginS.o%s} \
27+ %{" PIE_SPEC ":%{static:rcrt1.o%s;:Scrt1.o%s}} %{" NO_PIE_SPEC ":crt1.o%s}}} \
28+ crti.o%s %{shared:crtbeginS.o%s;: \
29 %{" PIE_SPEC ":crtbeginS.o%s} \
30- %{" NO_PIE_SPEC ":crtbegin.o%s}} \
31+ %{" NO_PIE_SPEC ":%{static:crtbeginT.o%s;:crtbegin.o%s}}} \
32 %{fvtable-verify=none:%s; \
33 fvtable-verify=preinit:vtv_start_preinit.o%s; \
34 fvtable-verify=std:vtv_start.o%s} \
35--
362.13.1
37
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0051-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch b/meta/recipes-devtools/gcc/gcc-7.2/0051-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch
deleted file mode 100644
index 021250700d..0000000000
--- a/meta/recipes-devtools/gcc/gcc-7.2/0051-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch
+++ /dev/null
@@ -1,194 +0,0 @@
1From 8c18b422211878ba02503462cb22a2cc25a0a325 Mon Sep 17 00:00:00 2001
2From: rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
3Date: Thu, 19 Oct 2017 13:14:55 +0000
4Subject: [PATCH] [ARM] PR 82445 - suppress 32-bit aligned ldrd/strd peepholing
5 with -mno-unaligned-access
6
7Peephole patterns exist in the arm backend to spot load/store
8operations to adjacent memory operations in order to convert them into
9ldrd/strd instructions. However, when we have strict alignment
10enforced, then we can only do this if the accesses are known to be
1164-bit aligned; this is unlikely to be the case for most loads. The
12patch adds some alignment checking to the code that validates the
13addresses for use in the peephole patterns. This should also fix
14incorrect generation of ldrd/strd with unaligned accesses that could
15previously have occurred on ARMv5e where all such operations must be
1664-bit aligned.
17
18I've added some new tests as well. In doing so I discovered that the
19ldrd/strd peephole tests could never fail since they would match the
20source file name in the scanned assembly as well as any instructions
21of the intended type. I've fixed those by tightening the scan results
22slightly.
23
24gcc:
25
26* config/arm/arm.c (align_ok_ldrd_strd): New function.
27(mem_ok_for_ldrd_strd): New parameter align. Extract the alignment of the
28mem into it.
29(gen_operands_ldrd_strd): Validate the alignment of the accesses.
30
31testsuite:
32
33* gcc.target/arm/peep-ldrd-1.c: Tighten test scan pattern.
34* gcc.target/arm/peep-strd-1.c: Likewise.
35* gcc.target/arm/peep-ldrd-2.c: New test.
36* gcc.target/arm/peep-strd-2.c: New test.
37
38
39
40git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@253891 138bc75d-0d04-0410-961f-82ee72b054a4
41---
42Upstream-Status: Backport
43Signed-off-by: Khem Raj <raj.khem@gmail.com>
44
45 gcc/ChangeLog | 8 +++++++
46 gcc/config/arm/arm.c | 27 ++++++++++++++++++----
47 gcc/testsuite/ChangeLog | 8 +++++++
48 gcc/testsuite/gcc.target/arm/peep-ldrd-1.c | 2 +-
49 .../arm/{peep-ldrd-1.c => peep-ldrd-2.c} | 4 ++--
50 gcc/testsuite/gcc.target/arm/peep-strd-1.c | 2 +-
51 .../arm/{peep-strd-1.c => peep-strd-2.c} | 4 ++--
52 7 files changed, 44 insertions(+), 11 deletions(-)
53 copy gcc/testsuite/gcc.target/arm/{peep-ldrd-1.c => peep-ldrd-2.c} (63%)
54 copy gcc/testsuite/gcc.target/arm/{peep-strd-1.c => peep-strd-2.c} (58%)
55
56diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
57index 1ded0d2a17d..989957f048e 100644
58--- a/gcc/config/arm/arm.c
59+++ b/gcc/config/arm/arm.c
60@@ -15199,12 +15199,23 @@ operands_ok_ldrd_strd (rtx rt, rtx rt2, rtx rn, HOST_WIDE_INT offset,
61 return true;
62 }
63
64+/* Return true if a 64-bit access with alignment ALIGN and with a
65+ constant offset OFFSET from the base pointer is permitted on this
66+ architecture. */
67+static bool
68+align_ok_ldrd_strd (HOST_WIDE_INT align, HOST_WIDE_INT offset)
69+{
70+ return (unaligned_access
71+ ? (align >= BITS_PER_WORD && (offset & 3) == 0)
72+ : (align >= 2 * BITS_PER_WORD && (offset & 7) == 0));
73+}
74+
75 /* Helper for gen_operands_ldrd_strd. Returns true iff the memory
76 operand MEM's address contains an immediate offset from the base
77- register and has no side effects, in which case it sets BASE and
78- OFFSET accordingly. */
79+ register and has no side effects, in which case it sets BASE,
80+ OFFSET and ALIGN accordingly. */
81 static bool
82-mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset)
83+mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset, HOST_WIDE_INT *align)
84 {
85 rtx addr;
86
87@@ -15223,6 +15234,7 @@ mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset)
88 gcc_assert (MEM_P (mem));
89
90 *offset = const0_rtx;
91+ *align = MEM_ALIGN (mem);
92
93 addr = XEXP (mem, 0);
94
95@@ -15263,7 +15275,7 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
96 bool const_store, bool commute)
97 {
98 int nops = 2;
99- HOST_WIDE_INT offsets[2], offset;
100+ HOST_WIDE_INT offsets[2], offset, align[2];
101 rtx base = NULL_RTX;
102 rtx cur_base, cur_offset, tmp;
103 int i, gap;
104@@ -15275,7 +15287,8 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
105 registers, and the corresponding memory offsets. */
106 for (i = 0; i < nops; i++)
107 {
108- if (!mem_ok_for_ldrd_strd (operands[nops+i], &cur_base, &cur_offset))
109+ if (!mem_ok_for_ldrd_strd (operands[nops+i], &cur_base, &cur_offset,
110+ &align[i]))
111 return false;
112
113 if (i == 0)
114@@ -15389,6 +15402,7 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
115 /* Swap the instructions such that lower memory is accessed first. */
116 std::swap (operands[0], operands[1]);
117 std::swap (operands[2], operands[3]);
118+ std::swap (align[0], align[1]);
119 if (const_store)
120 std::swap (operands[4], operands[5]);
121 }
122@@ -15402,6 +15416,9 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
123 if (gap != 4)
124 return false;
125
126+ if (!align_ok_ldrd_strd (align[0], offset))
127+ return false;
128+
129 /* Make sure we generate legal instructions. */
130 if (operands_ok_ldrd_strd (operands[0], operands[1], base, offset,
131 false, load))
132diff --git a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c b/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
133index eb2b86ee7b6..d49eff6b87e 100644
134--- a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
135+++ b/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
136@@ -8,4 +8,4 @@ int foo(int a, int b, int* p, int *q)
137 *p = a;
138 return a;
139 }
140-/* { dg-final { scan-assembler "ldrd" } } */
141+/* { dg-final { scan-assembler "ldrd\\t" } } */
142diff --git a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c b/gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
143similarity index 63%
144copy from gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
145copy to gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
146index eb2b86ee7b6..6822c2b1454 100644
147--- a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
148+++ b/gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
149@@ -1,6 +1,6 @@
150 /* { dg-do compile } */
151 /* { dg-require-effective-target arm_prefer_ldrd_strd } */
152-/* { dg-options "-O2" } */
153+/* { dg-options "-O2 -mno-unaligned-access" } */
154 int foo(int a, int b, int* p, int *q)
155 {
156 a = p[2] + p[3];
157@@ -8,4 +8,4 @@ int foo(int a, int b, int* p, int *q)
158 *p = a;
159 return a;
160 }
161-/* { dg-final { scan-assembler "ldrd" } } */
162+/* { dg-final { scan-assembler-not "ldrd\\t" } } */
163diff --git a/gcc/testsuite/gcc.target/arm/peep-strd-1.c b/gcc/testsuite/gcc.target/arm/peep-strd-1.c
164index bd330769599..fe1beac7229 100644
165--- a/gcc/testsuite/gcc.target/arm/peep-strd-1.c
166+++ b/gcc/testsuite/gcc.target/arm/peep-strd-1.c
167@@ -6,4 +6,4 @@ void foo(int a, int b, int* p)
168 p[2] = a;
169 p[3] = b;
170 }
171-/* { dg-final { scan-assembler "strd" } } */
172+/* { dg-final { scan-assembler "strd\\t" } } */
173diff --git a/gcc/testsuite/gcc.target/arm/peep-strd-1.c b/gcc/testsuite/gcc.target/arm/peep-strd-2.c
174similarity index 58%
175copy from gcc/testsuite/gcc.target/arm/peep-strd-1.c
176copy to gcc/testsuite/gcc.target/arm/peep-strd-2.c
177index bd330769599..bfc5ebe9eec 100644
178--- a/gcc/testsuite/gcc.target/arm/peep-strd-1.c
179+++ b/gcc/testsuite/gcc.target/arm/peep-strd-2.c
180@@ -1,9 +1,9 @@
181 /* { dg-do compile } */
182 /* { dg-require-effective-target arm_prefer_ldrd_strd } */
183-/* { dg-options "-O2" } */
184+/* { dg-options "-O2 -mno-unaligned-access" } */
185 void foo(int a, int b, int* p)
186 {
187 p[2] = a;
188 p[3] = b;
189 }
190-/* { dg-final { scan-assembler "strd" } } */
191+/* { dg-final { scan-assembler-not "strd\\t" } } */
192--
1932.15.0
194
diff --git a/meta/recipes-devtools/gcc/gcc-7.2.inc b/meta/recipes-devtools/gcc/gcc-7.3.inc
index f3d8a5ef0a..efa62eaf6a 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2.inc
+++ b/meta/recipes-devtools/gcc/gcc-7.3.inc
@@ -2,13 +2,13 @@ require gcc-common.inc
2 2
3# Third digit in PV should be incremented after a minor release 3# Third digit in PV should be incremented after a minor release
4 4
5PV = "7.2.0" 5PV = "7.3.0"
6 6
7# BINV should be incremented to a revision after a minor gcc release 7# BINV should be incremented to a revision after a minor gcc release
8 8
9BINV = "7.2.0" 9BINV = "7.3.0"
10 10
11FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-7.2:${FILE_DIRNAME}/gcc-7.2/backport:" 11FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-7.3:${FILE_DIRNAME}/gcc-7.3/backport:"
12 12
13DEPENDS =+ "mpfr gmp libmpc zlib flex-native" 13DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
14NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native" 14NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native"
@@ -78,11 +78,10 @@ SRC_URI = "\
78 ${BACKPORTS} \ 78 ${BACKPORTS} \
79" 79"
80BACKPORTS = "\ 80BACKPORTS = "\
81 file://0051-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch \
82 file://0001-PR-rtl-optimization-81803.patch \
83" 81"
84SRC_URI[md5sum] = "ff370482573133a7fcdd96cd2f552292" 82
85SRC_URI[sha256sum] = "1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a" 83SRC_URI[md5sum] = "be2da21680f27624f3a87055c4ba5af2"
84SRC_URI[sha256sum] = "832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c"
86 85
87S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" 86S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
88#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git" 87#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git"
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-7.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
index 1af1c74e61..1af1c74e61 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0008-c99-snprintf.patch b/meta/recipes-devtools/gcc/gcc-7.3/0008-c99-snprintf.patch
index ebd562b63f..ebd562b63f 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0008-c99-snprintf.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0008-c99-snprintf.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0009-gcc-poison-system-directories.patch b/meta/recipes-devtools/gcc/gcc-7.3/0009-gcc-poison-system-directories.patch
index 4d4e987ca5..fe13ed6e2d 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0009-gcc-poison-system-directories.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0009-gcc-poison-system-directories.patch
@@ -138,16 +138,16 @@ index 68a558e9992..060cd7169c6 100644
138 @opindex Wfloat-equal 138 @opindex Wfloat-equal
139 @opindex Wno-float-equal 139 @opindex Wno-float-equal
140diff --git a/gcc/gcc.c b/gcc/gcc.c 140diff --git a/gcc/gcc.c b/gcc/gcc.c
141index 120c5c0792a..6315aa0dd16 100644 141index c48178f..f63d53d 100644
142--- a/gcc/gcc.c 142--- a/gcc/gcc.c
143+++ b/gcc/gcc.c 143+++ b/gcc/gcc.c
144@@ -1035,6 +1035,8 @@ proper position among the other output files. */ 144@@ -1029,6 +1029,8 @@ proper position among the other output files. */
145 "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \ 145 "%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
146 "%X %{o*} %{e*} %{N} %{n} %{r}\ 146 "%X %{o*} %{e*} %{N} %{n} %{r}\
147 %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \ 147 %{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
148+ %{Wno-poison-system-directories:--no-poison-system-directories} \ 148+ %{Wno-poison-system-directories:--no-poison-system-directories} \
149+ %{Werror=poison-system-directories:--error-poison-system-directories} \ 149+ %{Werror=poison-system-directories:--error-poison-system-directories} \
150 %{static:} %{L*} %(mfwrap) %(link_libgcc) " \ 150 %{static|no-pie:} %{L*} %(mfwrap) %(link_libgcc) " \
151 VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \ 151 VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
152 %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\ 152 %{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
153diff --git a/gcc/incpath.c b/gcc/incpath.c 153diff --git a/gcc/incpath.c b/gcc/incpath.c
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0010-gcc-poison-dir-extend.patch b/meta/recipes-devtools/gcc/gcc-7.3/0010-gcc-poison-dir-extend.patch
index 4e06aa2f6a..4e06aa2f6a 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0010-gcc-poison-dir-extend.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0010-gcc-poison-dir-extend.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch b/meta/recipes-devtools/gcc/gcc-7.3/0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
index b39ff1ec22..b39ff1ec22 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0011-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0012-64-bit-multilib-hack.patch b/meta/recipes-devtools/gcc/gcc-7.3/0012-64-bit-multilib-hack.patch
index f3b39120b7..f3b39120b7 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0012-64-bit-multilib-hack.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0012-64-bit-multilib-hack.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0013-optional-libstdc.patch b/meta/recipes-devtools/gcc/gcc-7.3/0013-optional-libstdc.patch
index 3439bf67d0..3439bf67d0 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0013-optional-libstdc.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0013-optional-libstdc.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch b/meta/recipes-devtools/gcc/gcc-7.3/0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
index f92b5fbaaf..f92b5fbaaf 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0014-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0015-COLLECT_GCC_OPTIONS.patch b/meta/recipes-devtools/gcc/gcc-7.3/0015-COLLECT_GCC_OPTIONS.patch
index 6e62945e55..6e62945e55 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0015-COLLECT_GCC_OPTIONS.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0015-COLLECT_GCC_OPTIONS.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch b/meta/recipes-devtools/gcc/gcc-7.3/0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
index 1991251c27..1991251c27 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0016-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0017-fortran-cross-compile-hack.patch b/meta/recipes-devtools/gcc/gcc-7.3/0017-fortran-cross-compile-hack.patch
index e2830c59d0..e2830c59d0 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0017-fortran-cross-compile-hack.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0017-fortran-cross-compile-hack.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0018-cpp-honor-sysroot.patch b/meta/recipes-devtools/gcc/gcc-7.3/0018-cpp-honor-sysroot.patch
index 555907417a..555907417a 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0018-cpp-honor-sysroot.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0018-cpp-honor-sysroot.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0019-MIPS64-Default-to-N64-ABI.patch b/meta/recipes-devtools/gcc/gcc-7.3/0019-MIPS64-Default-to-N64-ABI.patch
index 742a4012a5..742a4012a5 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0019-MIPS64-Default-to-N64-ABI.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0019-MIPS64-Default-to-N64-ABI.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch b/meta/recipes-devtools/gcc/gcc-7.3/0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
index de7b4df572..de7b4df572 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0020-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0021-gcc-Fix-argument-list-too-long-error.patch b/meta/recipes-devtools/gcc/gcc-7.3/0021-gcc-Fix-argument-list-too-long-error.patch
index 4e562144e3..4e562144e3 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0021-gcc-Fix-argument-list-too-long-error.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0021-gcc-Fix-argument-list-too-long-error.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0022-Disable-sdt.patch b/meta/recipes-devtools/gcc/gcc-7.3/0022-Disable-sdt.patch
index 871f195c94..871f195c94 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0022-Disable-sdt.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0022-Disable-sdt.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0023-libtool.patch b/meta/recipes-devtools/gcc/gcc-7.3/0023-libtool.patch
index 27dfb1fdd1..27dfb1fdd1 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0023-libtool.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0023-libtool.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch b/meta/recipes-devtools/gcc/gcc-7.3/0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
index aa1e1bb8b1..aa1e1bb8b1 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0024-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch b/meta/recipes-devtools/gcc/gcc-7.3/0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch
index b234132317..b234132317 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0025-Use-the-multilib-config-files-from-B-instead-of-usin.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch b/meta/recipes-devtools/gcc/gcc-7.3/0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
index fe24713474..fe24713474 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0026-Avoid-using-libdir-from-.la-which-usually-points-to-.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0027-export-CPP.patch b/meta/recipes-devtools/gcc/gcc-7.3/0027-export-CPP.patch
index 4f9e1f0b2e..4f9e1f0b2e 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0027-export-CPP.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0027-export-CPP.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch b/meta/recipes-devtools/gcc/gcc-7.3/0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
index b903349d5d..b903349d5d 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0028-Enable-SPE-AltiVec-generation-on-powepc-linux-target.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch b/meta/recipes-devtools/gcc/gcc-7.3/0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
index 7306a282b5..7306a282b5 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0029-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0030-Ensure-target-gcc-headers-can-be-included.patch b/meta/recipes-devtools/gcc/gcc-7.3/0030-Ensure-target-gcc-headers-can-be-included.patch
index 568ba95ea6..568ba95ea6 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0030-Ensure-target-gcc-headers-can-be-included.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0030-Ensure-target-gcc-headers-can-be-included.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch b/meta/recipes-devtools/gcc/gcc-7.3/0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
index 0184010f04..0184010f04 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0031-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch b/meta/recipes-devtools/gcc/gcc-7.3/0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch
index e8905f5255..e8905f5255 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0032-Don-t-search-host-directory-during-relink-if-inst_pr.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch b/meta/recipes-devtools/gcc/gcc-7.3/0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
index c0b8df3e71..c0b8df3e71 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0033-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0034-aarch64-Add-support-for-musl-ldso.patch b/meta/recipes-devtools/gcc/gcc-7.3/0034-aarch64-Add-support-for-musl-ldso.patch
index 7d866d9064..7d866d9064 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0034-aarch64-Add-support-for-musl-ldso.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0034-aarch64-Add-support-for-musl-ldso.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch b/meta/recipes-devtools/gcc/gcc-7.3/0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch
index e2c1956d1d..e2c1956d1d 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0035-libcc1-fix-libcc1-s-install-path-and-rpath.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0036-handle-sysroot-support-for-nativesdk-gcc.patch b/meta/recipes-devtools/gcc/gcc-7.3/0036-handle-sysroot-support-for-nativesdk-gcc.patch
index aa0b108275..aa0b108275 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0036-handle-sysroot-support-for-nativesdk-gcc.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0036-handle-sysroot-support-for-nativesdk-gcc.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch b/meta/recipes-devtools/gcc/gcc-7.3/0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch
index 6c85a03f44..6c85a03f44 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0037-Search-target-sysroot-gcc-version-specific-dirs-with.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0038-Fix-various-_FOR_BUILD-and-related-variables.patch b/meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch
index a226d10d06..a226d10d06 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0038-Fix-various-_FOR_BUILD-and-related-variables.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0038-Fix-various-_FOR_BUILD-and-related-variables.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch b/meta/recipes-devtools/gcc/gcc-7.3/0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch
index a7aeccdf03..a7aeccdf03 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0039-nios2-Define-MUSL_DYNAMIC_LINKER.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch b/meta/recipes-devtools/gcc/gcc-7.3/0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
index 29b7ce72d2..29b7ce72d2 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0040-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch b/meta/recipes-devtools/gcc/gcc-7.3/0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch
index 5260e363d2..5260e363d2 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0041-gcc-libcpp-support-ffile-prefix-map-old-new.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch b/meta/recipes-devtools/gcc/gcc-7.3/0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
index 524716790f..524716790f 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0042-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch b/meta/recipes-devtools/gcc/gcc-7.3/0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
index 74a5c86446..74a5c86446 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0043-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch b/meta/recipes-devtools/gcc/gcc-7.3/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
index e39af9b1aa..e39af9b1aa 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0044-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch b/meta/recipes-devtools/gcc/gcc-7.3/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
index 3aa038c913..3aa038c913 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0045-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0046-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch b/meta/recipes-devtools/gcc/gcc-7.3/0046-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
index f6b2829364..f6b2829364 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0046-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0046-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0047-sync-gcc-stddef.h-with-musl.patch b/meta/recipes-devtools/gcc/gcc-7.3/0047-sync-gcc-stddef.h-with-musl.patch
index 65d22f169c..65d22f169c 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0047-sync-gcc-stddef.h-with-musl.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0047-sync-gcc-stddef.h-with-musl.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch b/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch
new file mode 100644
index 0000000000..a96e91339b
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0048-gcc-Enable-static-PIE.patch
@@ -0,0 +1,46 @@
1From 44ef80688b56beea85c0070840dea1e2a4e34aed Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 13 Jun 2017 12:12:52 -0700
4Subject: [PATCH 49/49] gcc: Enable static PIE
5
6Static PIE support in GCC
7see
8https://gcc.gnu.org/ml/gcc/2015-06/msg00008.html
9
10startfiles before patch:
11 -static -> crt1.o crti.o crtbeginT.o
12 -static -PIE -> crt1.o crti.o crtbeginT.o
13
14after patch:
15 -static -> crt1.o crti.o crtbeginT.o
16 -static -PIE -> rcrt1.o crti.o crtbeginS.o
17
18Upstream-Status: Pending
19
20Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
21
22---
23 gcc/config/gnu-user.h | 6 +++---
24 1 file changed, 3 insertions(+), 3 deletions(-)
25
26diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
27index de605b0..b035bbe 100644
28--- a/gcc/config/gnu-user.h
29+++ b/gcc/config/gnu-user.h
30@@ -52,11 +52,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
31 #define GNU_USER_TARGET_STARTFILE_SPEC \
32 "%{shared:; \
33 pg|p|profile:gcrt1.o%s; \
34- static:crt1.o%s; \
35+ static: %{" PIE_SPEC ": rcrt1.o%s; :crt1.o%s}; \
36 " PIE_SPEC ":Scrt1.o%s; \
37 :crt1.o%s} \
38 crti.o%s \
39- %{static:crtbeginT.o%s; \
40+ %{static: %{" PIE_SPEC ": crtbeginS.o%s; :crtbeginT.o%s}; \
41 shared|" PIE_SPEC ":crtbeginS.o%s; \
42 :crtbegin.o%s} \
43 %{fvtable-verify=none:%s; \
44
452.13.1
46
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch b/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch
index 5a14d04b6f..5a14d04b6f 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/0050-RISC-V-Handle-non-legitimate-address-in-riscv_legiti.patch
diff --git a/meta/recipes-devtools/gcc/gcc-7.2/fix-segmentation-fault-precompiled-hdr.patch b/meta/recipes-devtools/gcc/gcc-7.3/fix-segmentation-fault-precompiled-hdr.patch
index c0adef6f2f..c0adef6f2f 100644
--- a/meta/recipes-devtools/gcc/gcc-7.2/fix-segmentation-fault-precompiled-hdr.patch
+++ b/meta/recipes-devtools/gcc/gcc-7.3/fix-segmentation-fault-precompiled-hdr.patch
diff --git a/meta/recipes-devtools/gcc/gcc-common.inc b/meta/recipes-devtools/gcc/gcc-common.inc
index b5975b5a3b..aa3b53e64c 100644
--- a/meta/recipes-devtools/gcc/gcc-common.inc
+++ b/meta/recipes-devtools/gcc/gcc-common.inc
@@ -105,6 +105,7 @@ gcclibdir = "${libdir}/gcc"
105BINV = "${PV}" 105BINV = "${PV}"
106#S = "${WORKDIR}/gcc-${PV}" 106#S = "${WORKDIR}/gcc-${PV}"
107S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" 107S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
108
108B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" 109B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
109 110
110target_includedir ?= "${includedir}" 111target_includedir ?= "${includedir}"
diff --git a/meta/recipes-devtools/gcc/gcc-cross-canadian_7.2.bb b/meta/recipes-devtools/gcc/gcc-cross-canadian_7.3.bb
index bf53c5cd78..bf53c5cd78 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-canadian_7.2.bb
+++ b/meta/recipes-devtools/gcc/gcc-cross-canadian_7.3.bb
diff --git a/meta/recipes-devtools/gcc/gcc-cross-initial_7.2.bb b/meta/recipes-devtools/gcc/gcc-cross-initial_7.3.bb
index 4c73e5ce61..4c73e5ce61 100644
--- a/meta/recipes-devtools/gcc/gcc-cross-initial_7.2.bb
+++ b/meta/recipes-devtools/gcc/gcc-cross-initial_7.3.bb
diff --git a/meta/recipes-devtools/gcc/gcc-cross_7.2.bb b/meta/recipes-devtools/gcc/gcc-cross_7.3.bb
index b43cca0c52..b43cca0c52 100644
--- a/meta/recipes-devtools/gcc/gcc-cross_7.2.bb
+++ b/meta/recipes-devtools/gcc/gcc-cross_7.3.bb
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_7.2.bb b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_7.3.bb
index fd90e1140f..fd90e1140f 100644
--- a/meta/recipes-devtools/gcc/gcc-crosssdk-initial_7.2.bb
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk-initial_7.3.bb
diff --git a/meta/recipes-devtools/gcc/gcc-crosssdk_7.2.bb b/meta/recipes-devtools/gcc/gcc-crosssdk_7.3.bb
index 40a6c4feff..40a6c4feff 100644
--- a/meta/recipes-devtools/gcc/gcc-crosssdk_7.2.bb
+++ b/meta/recipes-devtools/gcc/gcc-crosssdk_7.3.bb
diff --git a/meta/recipes-devtools/gcc/gcc-runtime_7.2.bb b/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb
index 8f31e7792e..8f31e7792e 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime_7.2.bb
+++ b/meta/recipes-devtools/gcc/gcc-runtime_7.3.bb
diff --git a/meta/recipes-devtools/gcc/gcc-sanitizers_7.2.bb b/meta/recipes-devtools/gcc/gcc-sanitizers_7.3.bb
index 601f666023..601f666023 100644
--- a/meta/recipes-devtools/gcc/gcc-sanitizers_7.2.bb
+++ b/meta/recipes-devtools/gcc/gcc-sanitizers_7.3.bb
diff --git a/meta/recipes-devtools/gcc/gcc-source_7.2.bb b/meta/recipes-devtools/gcc/gcc-source_7.3.bb
index b890fa33ea..b890fa33ea 100644
--- a/meta/recipes-devtools/gcc/gcc-source_7.2.bb
+++ b/meta/recipes-devtools/gcc/gcc-source_7.3.bb
diff --git a/meta/recipes-devtools/gcc/gcc_7.2.bb b/meta/recipes-devtools/gcc/gcc_7.3.bb
index ab208e7026..ab208e7026 100644
--- a/meta/recipes-devtools/gcc/gcc_7.2.bb
+++ b/meta/recipes-devtools/gcc/gcc_7.3.bb
diff --git a/meta/recipes-devtools/gcc/libgcc-initial_7.2.bb b/meta/recipes-devtools/gcc/libgcc-initial_7.3.bb
index 19f253fce8..19f253fce8 100644
--- a/meta/recipes-devtools/gcc/libgcc-initial_7.2.bb
+++ b/meta/recipes-devtools/gcc/libgcc-initial_7.3.bb
diff --git a/meta/recipes-devtools/gcc/libgcc_7.2.bb b/meta/recipes-devtools/gcc/libgcc_7.3.bb
index a5152f28e9..a5152f28e9 100644
--- a/meta/recipes-devtools/gcc/libgcc_7.2.bb
+++ b/meta/recipes-devtools/gcc/libgcc_7.3.bb
diff --git a/meta/recipes-devtools/gcc/libgfortran_7.2.bb b/meta/recipes-devtools/gcc/libgfortran_7.3.bb
index 71dd8b4bdc..71dd8b4bdc 100644
--- a/meta/recipes-devtools/gcc/libgfortran_7.2.bb
+++ b/meta/recipes-devtools/gcc/libgfortran_7.3.bb