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-26 23:24:45 +0000
commita4c1ede6876ad6b84ab2b3bece14bf0afdc9d6b7 (patch)
tree6dc7862e6065db64b254f5daceb673f96db0037c
parent222537d8dcf103d8dcce2df7e915594c480ef110 (diff)
downloadopenembedded-core-a4c1ede6876ad6b84ab2b3bece14bf0afdc9d6b7.tar.gz
openembedded-core-a4c1ede6876ad6b84ab2b3bece14bf0afdc9d6b7.tar.bz2
openembedded-core-a4c1ede6876ad6b84ab2b3bece14bf0afdc9d6b7.zip
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. 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 @@
-From 5cbb8e6b1122092b3eaabd4270b2f316aa40407c Mon Sep 17 00:00:00 2001
-From: ebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Tue, 31 Oct 2017 18:27:52 +0000
-Subject: [PATCH] PR rtl-optimization/81803 * lra-constraints.c
- (curr_insn_transform): Also reload the whole register for a strict subreg
- no wider than a word if this is for a WORD_REGISTER_OPERATIONS target.
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@254275 138bc75d-0d04-0410-961f-82ee72b054a4
-
-Upstream-Status: Backport
-
-This patch removes changes to Changelog from the original patch upstream. This is
-because we are backporting a patch to a stable version, making changes to Changelog,
-especially up '* GCC 7.2.0 released.', feels a little weird.
-
-Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
----
- gcc/lra-constraints.c | 11 ++++++++---
- 2 files changed, 16 insertions(+), 3 deletions(-)
-
-diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
-index a423f069836..3758409bb9c 100644
---- a/gcc/lra-constraints.c
-+++ b/gcc/lra-constraints.c
-@@ -4207,8 +4207,9 @@ curr_insn_transform (bool check_only_p)
- reg = SUBREG_REG (*loc);
- byte = SUBREG_BYTE (*loc);
- if (REG_P (reg)
-- /* Strict_low_part requires reload the register not
-- the sub-register. */
-+ /* Strict_low_part requires reloading the register and not
-+ just the subreg. Likewise for a strict subreg no wider
-+ than a word for WORD_REGISTER_OPERATIONS targets. */
- && (curr_static_id->operand[i].strict_low
- || (!paradoxical_subreg_p (mode, GET_MODE (reg))
- && (hard_regno
-@@ -4219,7 +4220,11 @@ curr_insn_transform (bool check_only_p)
- && (goal_alt[i] == NO_REGS
- || (simplify_subreg_regno
- (ira_class_hard_regs[goal_alt[i]][0],
-- GET_MODE (reg), byte, mode) >= 0)))))
-+ GET_MODE (reg), byte, mode) >= 0)))
-+ || (GET_MODE_PRECISION (mode)
-+ < GET_MODE_PRECISION (GET_MODE (reg))
-+ && GET_MODE_SIZE (GET_MODE (reg)) <= UNITS_PER_WORD
-+ && WORD_REGISTER_OPERATIONS)))
- {
- /* An OP_INOUT is required when reloading a subreg of a
- mode wider than a word to ensure that data beyond the
---
-2.13.0
-
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 @@
-From 44ef80688b56beea85c0070840dea1e2a4e34aed Mon Sep 17 00:00:00 2001
-From: Khem Raj <raj.khem@gmail.com>
-Date: Tue, 13 Jun 2017 12:12:52 -0700
-Subject: [PATCH 49/49] gcc: Enable static PIE
-
-Static PIE support in GCC
-see
-https://gcc.gnu.org/ml/gcc/2015-06/msg00008.html
-
-Upstream-Status: Pending
-
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
----
- gcc/config/gnu-user.h | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
-diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
-index 2787a3d16be..ee7b781319e 100644
---- a/gcc/config/gnu-user.h
-+++ b/gcc/config/gnu-user.h
-@@ -51,10 +51,10 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
- #if defined HAVE_LD_PIE
- #define GNU_USER_TARGET_STARTFILE_SPEC \
- "%{!shared: %{pg|p|profile:gcrt1.o%s;: \
-- %{" PIE_SPEC ":Scrt1.o%s} %{" NO_PIE_SPEC ":crt1.o%s}}} \
-- crti.o%s %{static:crtbeginT.o%s;: %{shared:crtbeginS.o%s} \
-+ %{" PIE_SPEC ":%{static:rcrt1.o%s;:Scrt1.o%s}} %{" NO_PIE_SPEC ":crt1.o%s}}} \
-+ crti.o%s %{shared:crtbeginS.o%s;: \
- %{" PIE_SPEC ":crtbeginS.o%s} \
-- %{" NO_PIE_SPEC ":crtbegin.o%s}} \
-+ %{" NO_PIE_SPEC ":%{static:crtbeginT.o%s;:crtbegin.o%s}}} \
- %{fvtable-verify=none:%s; \
- fvtable-verify=preinit:vtv_start_preinit.o%s; \
- fvtable-verify=std:vtv_start.o%s} \
---
-2.13.1
-
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 @@
-From 8c18b422211878ba02503462cb22a2cc25a0a325 Mon Sep 17 00:00:00 2001
-From: rearnsha <rearnsha@138bc75d-0d04-0410-961f-82ee72b054a4>
-Date: Thu, 19 Oct 2017 13:14:55 +0000
-Subject: [PATCH] [ARM] PR 82445 - suppress 32-bit aligned ldrd/strd peepholing
- with -mno-unaligned-access
-
-Peephole patterns exist in the arm backend to spot load/store
-operations to adjacent memory operations in order to convert them into
-ldrd/strd instructions. However, when we have strict alignment
-enforced, then we can only do this if the accesses are known to be
-64-bit aligned; this is unlikely to be the case for most loads. The
-patch adds some alignment checking to the code that validates the
-addresses for use in the peephole patterns. This should also fix
-incorrect generation of ldrd/strd with unaligned accesses that could
-previously have occurred on ARMv5e where all such operations must be
-64-bit aligned.
-
-I've added some new tests as well. In doing so I discovered that the
-ldrd/strd peephole tests could never fail since they would match the
-source file name in the scanned assembly as well as any instructions
-of the intended type. I've fixed those by tightening the scan results
-slightly.
-
-gcc:
-
-* config/arm/arm.c (align_ok_ldrd_strd): New function.
-(mem_ok_for_ldrd_strd): New parameter align. Extract the alignment of the
-mem into it.
-(gen_operands_ldrd_strd): Validate the alignment of the accesses.
-
-testsuite:
-
-* gcc.target/arm/peep-ldrd-1.c: Tighten test scan pattern.
-* gcc.target/arm/peep-strd-1.c: Likewise.
-* gcc.target/arm/peep-ldrd-2.c: New test.
-* gcc.target/arm/peep-strd-2.c: New test.
-
-
-
-git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-7-branch@253891 138bc75d-0d04-0410-961f-82ee72b054a4
----
-Upstream-Status: Backport
-Signed-off-by: Khem Raj <raj.khem@gmail.com>
-
- gcc/ChangeLog | 8 +++++++
- gcc/config/arm/arm.c | 27 ++++++++++++++++++----
- gcc/testsuite/ChangeLog | 8 +++++++
- gcc/testsuite/gcc.target/arm/peep-ldrd-1.c | 2 +-
- .../arm/{peep-ldrd-1.c => peep-ldrd-2.c} | 4 ++--
- gcc/testsuite/gcc.target/arm/peep-strd-1.c | 2 +-
- .../arm/{peep-strd-1.c => peep-strd-2.c} | 4 ++--
- 7 files changed, 44 insertions(+), 11 deletions(-)
- copy gcc/testsuite/gcc.target/arm/{peep-ldrd-1.c => peep-ldrd-2.c} (63%)
- copy gcc/testsuite/gcc.target/arm/{peep-strd-1.c => peep-strd-2.c} (58%)
-
-diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
-index 1ded0d2a17d..989957f048e 100644
---- a/gcc/config/arm/arm.c
-+++ b/gcc/config/arm/arm.c
-@@ -15199,12 +15199,23 @@ operands_ok_ldrd_strd (rtx rt, rtx rt2, rtx rn, HOST_WIDE_INT offset,
- return true;
- }
-
-+/* Return true if a 64-bit access with alignment ALIGN and with a
-+ constant offset OFFSET from the base pointer is permitted on this
-+ architecture. */
-+static bool
-+align_ok_ldrd_strd (HOST_WIDE_INT align, HOST_WIDE_INT offset)
-+{
-+ return (unaligned_access
-+ ? (align >= BITS_PER_WORD && (offset & 3) == 0)
-+ : (align >= 2 * BITS_PER_WORD && (offset & 7) == 0));
-+}
-+
- /* Helper for gen_operands_ldrd_strd. Returns true iff the memory
- operand MEM's address contains an immediate offset from the base
-- register and has no side effects, in which case it sets BASE and
-- OFFSET accordingly. */
-+ register and has no side effects, in which case it sets BASE,
-+ OFFSET and ALIGN accordingly. */
- static bool
--mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset)
-+mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset, HOST_WIDE_INT *align)
- {
- rtx addr;
-
-@@ -15223,6 +15234,7 @@ mem_ok_for_ldrd_strd (rtx mem, rtx *base, rtx *offset)
- gcc_assert (MEM_P (mem));
-
- *offset = const0_rtx;
-+ *align = MEM_ALIGN (mem);
-
- addr = XEXP (mem, 0);
-
-@@ -15263,7 +15275,7 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
- bool const_store, bool commute)
- {
- int nops = 2;
-- HOST_WIDE_INT offsets[2], offset;
-+ HOST_WIDE_INT offsets[2], offset, align[2];
- rtx base = NULL_RTX;
- rtx cur_base, cur_offset, tmp;
- int i, gap;
-@@ -15275,7 +15287,8 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
- registers, and the corresponding memory offsets. */
- for (i = 0; i < nops; i++)
- {
-- if (!mem_ok_for_ldrd_strd (operands[nops+i], &cur_base, &cur_offset))
-+ if (!mem_ok_for_ldrd_strd (operands[nops+i], &cur_base, &cur_offset,
-+ &align[i]))
- return false;
-
- if (i == 0)
-@@ -15389,6 +15402,7 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
- /* Swap the instructions such that lower memory is accessed first. */
- std::swap (operands[0], operands[1]);
- std::swap (operands[2], operands[3]);
-+ std::swap (align[0], align[1]);
- if (const_store)
- std::swap (operands[4], operands[5]);
- }
-@@ -15402,6 +15416,9 @@ gen_operands_ldrd_strd (rtx *operands, bool load,
- if (gap != 4)
- return false;
-
-+ if (!align_ok_ldrd_strd (align[0], offset))
-+ return false;
-+
- /* Make sure we generate legal instructions. */
- if (operands_ok_ldrd_strd (operands[0], operands[1], base, offset,
- false, load))
-diff --git a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c b/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-index eb2b86ee7b6..d49eff6b87e 100644
---- a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-@@ -8,4 +8,4 @@ int foo(int a, int b, int* p, int *q)
- *p = a;
- return a;
- }
--/* { dg-final { scan-assembler "ldrd" } } */
-+/* { dg-final { scan-assembler "ldrd\\t" } } */
-diff --git a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c b/gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
-similarity index 63%
-copy from gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-copy to gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
-index eb2b86ee7b6..6822c2b1454 100644
---- a/gcc/testsuite/gcc.target/arm/peep-ldrd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-ldrd-2.c
-@@ -1,6 +1,6 @@
- /* { dg-do compile } */
- /* { dg-require-effective-target arm_prefer_ldrd_strd } */
--/* { dg-options "-O2" } */
-+/* { dg-options "-O2 -mno-unaligned-access" } */
- int foo(int a, int b, int* p, int *q)
- {
- a = p[2] + p[3];
-@@ -8,4 +8,4 @@ int foo(int a, int b, int* p, int *q)
- *p = a;
- return a;
- }
--/* { dg-final { scan-assembler "ldrd" } } */
-+/* { dg-final { scan-assembler-not "ldrd\\t" } } */
-diff --git a/gcc/testsuite/gcc.target/arm/peep-strd-1.c b/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-index bd330769599..fe1beac7229 100644
---- a/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-@@ -6,4 +6,4 @@ void foo(int a, int b, int* p)
- p[2] = a;
- p[3] = b;
- }
--/* { dg-final { scan-assembler "strd" } } */
-+/* { dg-final { scan-assembler "strd\\t" } } */
-diff --git a/gcc/testsuite/gcc.target/arm/peep-strd-1.c b/gcc/testsuite/gcc.target/arm/peep-strd-2.c
-similarity index 58%
-copy from gcc/testsuite/gcc.target/arm/peep-strd-1.c
-copy to gcc/testsuite/gcc.target/arm/peep-strd-2.c
-index bd330769599..bfc5ebe9eec 100644
---- a/gcc/testsuite/gcc.target/arm/peep-strd-1.c
-+++ b/gcc/testsuite/gcc.target/arm/peep-strd-2.c
-@@ -1,9 +1,9 @@
- /* { dg-do compile } */
- /* { dg-require-effective-target arm_prefer_ldrd_strd } */
--/* { dg-options "-O2" } */
-+/* { dg-options "-O2 -mno-unaligned-access" } */
- void foo(int a, int b, int* p)
- {
- p[2] = a;
- p[3] = b;
- }
--/* { dg-final { scan-assembler "strd" } } */
-+/* { dg-final { scan-assembler-not "strd\\t" } } */
---
-2.15.0
-
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
# Third digit in PV should be incremented after a minor release
-PV = "7.2.0"
+PV = "7.3.0"
# BINV should be incremented to a revision after a minor gcc release
-BINV = "7.2.0"
+BINV = "7.3.0"
-FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-7.2:${FILE_DIRNAME}/gcc-7.2/backport:"
+FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-7.3:${FILE_DIRNAME}/gcc-7.3/backport:"
DEPENDS =+ "mpfr gmp libmpc zlib flex-native"
NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native"
@@ -78,11 +78,10 @@ SRC_URI = "\
${BACKPORTS} \
"
BACKPORTS = "\
- file://0051-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch \
- file://0001-PR-rtl-optimization-81803.patch \
"
-SRC_URI[md5sum] = "ff370482573133a7fcdd96cd2f552292"
-SRC_URI[sha256sum] = "1cf7adf8ff4b5aa49041c8734bbcf1ad18cc4c94d0029aae0f4e48841088479a"
+
+SRC_URI[md5sum] = "be2da21680f27624f3a87055c4ba5af2"
+SRC_URI[sha256sum] = "832ca6ae04636adbb430e865a1451adf6979ab44ca1c8374f61fba65645ce15c"
S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
#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
@opindex Wfloat-equal
@opindex Wno-float-equal
diff --git a/gcc/gcc.c b/gcc/gcc.c
-index 120c5c0792a..6315aa0dd16 100644
+index c48178f..f63d53d 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
-@@ -1035,6 +1035,8 @@ proper position among the other output files. */
+@@ -1029,6 +1029,8 @@ proper position among the other output files. */
"%{fuse-ld=*:-fuse-ld=%*} " LINK_COMPRESS_DEBUG_SPEC \
"%X %{o*} %{e*} %{N} %{n} %{r}\
%{s} %{t} %{u*} %{z} %{Z} %{!nostdlib:%{!nostartfiles:%S}} \
+ %{Wno-poison-system-directories:--no-poison-system-directories} \
+ %{Werror=poison-system-directories:--error-poison-system-directories} \
- %{static:} %{L*} %(mfwrap) %(link_libgcc) " \
+ %{static|no-pie:} %{L*} %(mfwrap) %(link_libgcc) " \
VTABLE_VERIFICATION_SPEC " " SANITIZER_EARLY_SPEC " %o " CHKP_SPEC " \
%{fopenacc|fopenmp|%:gt(%{ftree-parallelize-loops=*:%*} 1):\
diff --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 @@
+From 44ef80688b56beea85c0070840dea1e2a4e34aed Mon Sep 17 00:00:00 2001
+From: Khem Raj <raj.khem@gmail.com>
+Date: Tue, 13 Jun 2017 12:12:52 -0700
+Subject: [PATCH 49/49] gcc: Enable static PIE
+
+Static PIE support in GCC
+see
+https://gcc.gnu.org/ml/gcc/2015-06/msg00008.html
+
+startfiles before patch:
+ -static -> crt1.o crti.o crtbeginT.o
+ -static -PIE -> crt1.o crti.o crtbeginT.o
+
+after patch:
+ -static -> crt1.o crti.o crtbeginT.o
+ -static -PIE -> rcrt1.o crti.o crtbeginS.o
+
+Upstream-Status: Pending
+
+Signed-off-by: Juro Bystricky <juro.bystricky@intel.com>
+
+---
+ gcc/config/gnu-user.h | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/gcc/config/gnu-user.h b/gcc/config/gnu-user.h
+index de605b0..b035bbe 100644
+--- a/gcc/config/gnu-user.h
++++ b/gcc/config/gnu-user.h
+@@ -52,11 +52,11 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
+ #define GNU_USER_TARGET_STARTFILE_SPEC \
+ "%{shared:; \
+ pg|p|profile:gcrt1.o%s; \
+- static:crt1.o%s; \
++ static: %{" PIE_SPEC ": rcrt1.o%s; :crt1.o%s}; \
+ " PIE_SPEC ":Scrt1.o%s; \
+ :crt1.o%s} \
+ crti.o%s \
+- %{static:crtbeginT.o%s; \
++ %{static: %{" PIE_SPEC ": crtbeginS.o%s; :crtbeginT.o%s}; \
+ shared|" PIE_SPEC ":crtbeginS.o%s; \
+ :crtbegin.o%s} \
+ %{fvtable-verify=none:%s; \
+
+2.13.1
+
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"
BINV = "${PV}"
#S = "${WORKDIR}/gcc-${PV}"
S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}"
+
B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}"
target_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