[OE-core] [PATCH][morty] gcc6: Upgrade to 6.4.0 (latest stable series release)

Martin Jansa martin.jansa at gmail.com
Sun Mar 4 16:22:16 UTC 2018


On Sun, Mar 04, 2018 at 03:15:38PM +0100, Martin Jansa wrote:
> On Sun, Mar 04, 2018 at 11:21:32AM +0000, Richard Purdie wrote:
> > From: Juro Bystricky <juro.bystricky at intel.com>
> > 
> > Changed BINV and PV from 6.2.0 to 6.4.0
> > Modified BASEURI to load xz tarball instead of bz2
> > 
> > Backported series of patches from https://github.com/hjl-tools/gcc.git
> > branch /hjl/indirect/gcc-6-branch/master which contains
> > an IA patch series for security related issues
> > 
> > ubsan-fix-check-empty-string.patch : removed, already applied
> 
> Very limited testing with this change in morty shows that raspberrypi3
> (cortexa7hf-neon-vfpv4) build of glibc-initial fails with:
> 
> configure:5344: checking for broken __attribute__((alias()))
> configure:5359: arm-oe-linux-gnueabi-gcc  -march=armv7ve -marm
> -mfpu=neon-vfpv4  -mfloat-abi=hard -mcpu=cortex-a7
> --sysroot=sysroots/raspberrypi3-tcbootstrap
> -Werror -S conftest.c -o conftest.s 1>&5
> conftest.c:1:0: error: switch -mcpu=cortex-a7 conflicts with
> -march=armv7ve switch [-Werror]
>          extern int foo (int x) __asm ("xyzzy");
> 
> cc1: all warnings being treated as errors
> configure:5362: $? = 1
> configure:5372: result: yes
> configure:5375: error: working alias attribute support required
> 
> Which is a bit strange as armv7ve was added to resolve this error with
> -mcpu=cortexa7 and -march=armv7a in:
> 
> commit 35392025f3236f5e5393f9cf0857732da9a2e503
> Author: Martin Jansa <Martin.Jansa at gmail.com>
> Date:   Tue Oct 6 17:08:59 2015 +0200
> 
>     arch-armv7ve: add tune include for armv7ve and use it from cortexa7
> and cortexa15
>     
>     * be aware that this -march value is available only in gcc-4.9 and
>       newer:
>       https://gcc.gnu.org/bugzilla/show_bug.cgi?id=57907
>     * -mcpu=cortex15 and -mcpu=cortexa7 conflict with -march=armv7a
>       We either have to stop putting -march in default CCARGS or at
>       least set it compatible one like this patch does.
> 
> Regards,

It seems to be known regression in 6.4, with fix available here:
https://patchwork.ozlabs.org/patch/835592/

There are some smaller differences between 6.4 in morty-next and
pyro-next:

docker-shr @ ~/openembedded-core $ diff -uNr meta/recipes-devtools/gcc-morty/gcc-6.4.inc meta/recipes-devtools/gcc-pyro/gcc-6.4.inc
--- meta/recipes-devtools/gcc-morty/gcc-6.4.inc 2018-03-04 16:13:05.823087989 +0000
+++ meta/recipes-devtools/gcc-pyro/gcc-6.4.inc  2018-03-04 16:12:48.771088858 +0000
@@ -71,16 +71,20 @@
            file://0038-Search-target-sysroot-gcc-version-specific-dirs-with.patch \
            file://0039-Fix-various-_FOR_BUILD-and-related-variables.patch \
            file://0040-nios2-Define-MUSL_DYNAMIC_LINKER.patch \
-           file://0041-ssp_nonshared.patch \
+           file://0041-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \
            file://0042-gcc-libcpp-support-ffile-prefix-map-old-new.patch \
            file://0043-Reuse-fdebug-prefix-map-to-replace-ffile-prefix-map.patch \
            file://0044-gcc-final.c-fdebug-prefix-map-support-to-remap-sourc.patch \
            file://0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \
            file://0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
            file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
+           file://0048-sync-gcc-stddef.h-with-musl.patch \
+           file://0054_all_nopie-all-flags.patch \
+           file://0055-unwind_h-glibc26.patch \
            ${BACKPORTS} \
 "
 BACKPORTS = "\
+           file://CVE-2016-6131.patch \
            file://0001-i386-Move-struct-ix86_frame-to-machine_function.patch \
            file://0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch \
            file://0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch \
@@ -94,6 +98,7 @@
            file://0011-i386-Update-mfunction-return-for-return-with-pop.patch \
            file://0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch \
 "
+
 SRC_URI[md5sum] = "11ba51a0cfb8471927f387c8895fe232"
 SRC_URI[sha256sum] = "850bf21eafdfe5cd5f6827148184c08c4a0852a37ccf36ce69855334d2c914d4"
 
Bigger difference between pyro-next and master 84d6be8ceb14b418b059212108c5a71a5950e6c3 (just before 6.4 was removed):

--- meta/recipes-devtools/gcc-morty/gcc-6.4.inc 2018-03-04 16:13:05.823087989 +0000
+++ meta/recipes-devtools/gcc-master-84d6be8ceb14b418b059212108c5a71a5950e6c3/gcc-6.4.inc       2018-03-04 16:14:45.771082894 +0000
@@ -32,12 +32,6 @@
 SRC_URI = "\
            ${BASEURI} \
            file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
-           file://0002-uclibc-conf.patch \
-           file://0003-gcc-uclibc-locale-ctype_touplow_t.patch \
-           file://0004-uclibc-locale.patch \
-           file://0005-uclibc-locale-no__x.patch \
-           file://0006-uclibc-locale-wchar_fix.patch \
-           file://0007-uclibc-locale-update.patch \
            file://0008-missing-execinfo_h.patch \
            file://0009-c99-snprintf.patch \
            file://0010-gcc-poison-system-directories.patch \
@@ -78,21 +72,15 @@
            file://0045-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \
            file://0046-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \
            file://0047-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \
+           file://0048-sync-gcc-stddef.h-with-musl.patch \
+           file://0054_all_nopie-all-flags.patch \
+           file://0055-unwind_h-glibc26.patch \
+           file://0056-LRA-PR70904-relax-the-restriction-on-subreg-reload-f.patch \
            ${BACKPORTS} \
 "
 BACKPORTS = "\
-           file://0001-i386-Move-struct-ix86_frame-to-machine_function.patch \
-           file://0002-i386-Use-reference-of-struct-ix86_frame-to-avoid-cop.patch \
-           file://0003-i386-Use-const-reference-of-struct-ix86_frame-to-avo.patch \
-           file://0004-x86-Add-mindirect-branch.patch \
-           file://0005-x86-Add-mfunction-return.patch \
-           file://0006-x86-Add-mindirect-branch-register.patch \
-           file://0007-x86-Add-V-register-operand-modifier.patch \
-           file://0008-x86-Disallow-mindirect-branch-mfunction-return-with-.patch \
-           file://0009-Use-INVALID_REGNUM-in-indirect-thunk-processing.patch \
-           file://0010-i386-Pass-INVALID_REGNUM-as-invalid-register-number.patch \
-           file://0011-i386-Update-mfunction-return-for-return-with-pop.patch \
-           file://0012-i386-Add-TARGET_INDIRECT_BRANCH_REGISTER.patch \
+           file://CVE-2016-6131.patch \
+           file://0057-ARM-PR-82445-suppress-32-bit-aligned-ldrd-strd-peeph.patch \
 "
 SRC_URI[md5sum] = "11ba51a0cfb8471927f387c8895fe232"
 SRC_URI[sha256sum] = "850bf21eafdfe5cd5f6827148184c08c4a0852a37ccf36ce69855334d2c914d4"
@@ -136,8 +124,6 @@
     gcc_cv_libc_provides_ssp=yes \
 "

-EXTRA_OECONF_append_libc-uclibc = " --disable-decimal-float "
-
 EXTRA_OECONF_PATHS = "\
     --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \
     --with-sysroot=/not/exist \   

-- 
Martin 'JaMa' Jansa     jabber: Martin.Jansa at gmail.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: Digital signature
URL: <http://lists.openembedded.org/pipermail/openembedded-core/attachments/20180304/6e403c30/attachment-0002.sig>


More information about the Openembedded-core mailing list