Add GCC 8 recipes
v2 cover Add GCC 8 recipes
This changeset is including the review feedback from last patchset
- Fixes ppc such that we dont have to change machine options so it remains backward compatible and folks can still use gcc7
- Tweaks arm tunes to set -mtune instead of -mcpu, this avoids conflicts between -march/-mcpu
- Removes workarounds to avoid these conflicts in valgrind
- Add mips 74kc tune files
- Linux yocto changes are also part of Bruce's kernel updates but this makes it complete until those changes are pulled in
The following changes since commit cd195bdf5dd2c8ff03c58a63dcabe88b142d2a9c:
oe-pkgdata-util: package-info: Re-add support for the --extra option (2018-06-04 15:14:43 +0100)
are available in the Git repository at:
git://git.openembedded.org/openembedded-core-contrib kraj/gcc-8
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=kraj/gcc-8
Khem Raj (12):
tune/arm: Set -mtune instead of -mcpu
valgrind: Remove code to remove -mcpu option on arm tune-mips-74k.inc: add tune file for 74kc mips
gcc-8: Add recipes for 8.1 release
gcc-8: Disable libssp for non mingw targets
gcc-8: Disable float128 for ppc/musl
gcc-8: Enabled mspe options for rs6000 ppc backend
tcmode-default: Switch to gcc 8.0
linux-yocto: Fix build with gcc8 for ppc
linux-yocto: Fix mips build with gcc8
linux-yocto: Fix mips64 build with gcc8
linux-yocto: Fix GCC 8 -Wrestrict error
meta/conf/distro/include/tcmode-default.inc | 2 +- .../machine/include/mips/tune-mips-74k.inc | 37 +++ .../conf/machine/include/tune-arm1136jf-s.inc | 2 +- meta/conf/machine/include/tune-arm920t.inc | 2 +- meta/conf/machine/include/tune-arm926ejs.inc | 2 +- meta/conf/machine/include/tune-arm9tdmi.inc | 2 +- meta/conf/machine/include/tune-cortexa15.inc | 2 +- meta/conf/machine/include/tune-cortexa17.inc | 2 +- meta/conf/machine/include/tune-cortexa5.inc | 2 +- meta/conf/machine/include/tune-cortexa7.inc | 2 +- meta/conf/machine/include/tune-cortexa8.inc | 2 +- meta/conf/machine/include/tune-cortexa9.inc | 2 +- meta/conf/machine/include/tune-ep9312.inc | 2 +- meta/conf/machine/include/tune-iwmmxt.inc | 2 +- .../machine/include/tune-strongarm1100.inc | 2 +- meta/conf/machine/include/tune-thunderx.inc | 2 +- meta/conf/machine/include/tune-xscale.inc | 2 +- meta/recipes-devtools/gcc/gcc-8.1.inc | 127 +++++++++ ...0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 42 +++ .../gcc/gcc-8.1/0002-c99-snprintf.patch | 28 ++ .../0003-gcc-poison-system-directories.patch | 192 +++++++++++++ .../gcc-8.1/0004-gcc-poison-dir-extend.patch | 39 +++ ...-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | 73 +++++ .../gcc-8.1/0006-64-bit-multilib-hack.patch | 85 ++++++ .../gcc/gcc-8.1/0007-optional-libstdc.patch | 125 +++++++++ ...gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch | 59 ++++ .../gcc-8.1/0009-COLLECT_GCC_OPTIONS.patch | 38 +++ ...ts.h-in-B-instead-of-S-and-t-oe-in-B.patch | 96 +++++++ .../0011-fortran-cross-compile-hack.patch | 46 ++++ .../gcc/gcc-8.1/0012-cpp-honor-sysroot.patch | 54 ++++ .../0013-MIPS64-Default-to-N64-ABI.patch | 57 ++++ ...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 234 ++++++++++++++++ ...gcc-Fix-argument-list-too-long-error.patch | 40 +++ .../gcc/gcc-8.1/0016-Disable-sdt.patch | 113 ++++++++ .../gcc/gcc-8.1/0017-libtool.patch | 42 +++ ...s-fix-v4bx-to-linker-to-support-EABI.patch | 43 +++ ...-config-files-from-B-instead-of-usin.patch | 102 +++++++ ...ir-from-.la-which-usually-points-to-.patch | 31 +++ .../gcc/gcc-8.1/0021-export-CPP.patch | 53 ++++ ...ILIB_OSDIRNAMES-and-other-multilib-o.patch | 42 +++ ...e-target-gcc-headers-can-be-included.patch | 98 +++++++ ...ild-with-disable-dependency-tracking.patch | 54 ++++ ...t-directory-during-relink-if-inst_pr.patch | 38 +++ ...IR-replacement-instead-of-hardcoding.patch | 29 ++ ...27-aarch64-Add-support-for-musl-ldso.patch | 28 ++ ...-fix-libcc1-s-install-path-and-rpath.patch | 54 ++++ ...le-sysroot-support-for-nativesdk-gcc.patch | 213 +++++++++++++++ ...sroot-gcc-version-specific-dirs-with.patch | 102 +++++++ ...ous-_FOR_BUILD-and-related-variables.patch | 137 ++++++++++ ...032-nios2-Define-MUSL_DYNAMIC_LINKER.patch | 28 ++ ...d-to-link-commandline-for-musl-targe.patch | 87 ++++++ ...bgcc-Add-knob-to-use-ldbl-128-on-ppc.patch | 125 +++++++++ ...using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch | 29 ++ ...as-for-__cpu_indicator_init-instead-.patch | 86 ++++++ .../0037-sync-gcc-stddef.h-with-musl.patch | 91 ++++++ ...-fault-in-precompiled-header-generat.patch | 60 ++++ .../0039-Fix-for-testsuite-failure.patch | 258 ++++++++++++++++++ ...Re-introduce-spe-commandline-options.patch | 41 +++ meta/recipes-devtools/gcc/gcc-common.inc | 2 +- .../gcc/gcc-cross-canadian_8.1.bb | 5 + .../gcc/gcc-cross-initial_8.1.bb | 2 + meta/recipes-devtools/gcc/gcc-cross_8.1.bb | 3 + .../gcc/gcc-crosssdk-initial_8.1.bb | 3 + meta/recipes-devtools/gcc/gcc-crosssdk_8.1.bb | 2 + meta/recipes-devtools/gcc/gcc-runtime_8.1.bb | 7 + .../gcc/gcc-sanitizers_8.1.bb | 2 + meta/recipes-devtools/gcc/gcc-source_8.1.bb | 4 + meta/recipes-devtools/gcc/gcc_8.1.bb | 10 + .../gcc/libgcc-initial_8.1.bb | 2 + meta/recipes-devtools/gcc/libgcc_8.1.bb | 2 + meta/recipes-devtools/gcc/libgfortran_8.1.bb | 3 + .../valgrind/valgrind_3.13.0.bb | 11 - ...ips-Disable-attribute-alias-warnings.patch | 43 +++ ...ps64-Disable-attribute-alias-warning.patch | 26 ++ ...jtool-perf-Fix-GCC-8-Wrestrict-error.patch | 51 ++++ ...e-attribute-alias-warnings-from-gcc8.patch | 31 +++ ...d-pager.c-do-not-alias-select-params.patch | 43 +++ ...isable-array-bounds-warning-with-gcc.patch | 28 ++ meta/recipes-kernel/linux/linux-yocto_4.15.bb | 8 + 79 files changed, 3648 insertions(+), 28 deletions(-) create mode 100644 meta/conf/machine/include/mips/tune-mips-74k.inc create mode 100644 meta/recipes-devtools/gcc/gcc-8.1.inc create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0002-c99-snprintf.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0003-gcc-poison-system-directories.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0004-gcc-poison-dir-extend.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0006-64-bit-multilib-hack.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0007-optional-libstdc.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0008-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0009-COLLECT_GCC_OPTIONS.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0010-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0011-fortran-cross-compile-hack.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0012-cpp-honor-sysroot.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0013-MIPS64-Default-to-N64-ABI.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0015-gcc-Fix-argument-list-too-long-error.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0016-Disable-sdt.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0017-libtool.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0018-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0019-Use-the-multilib-config-files-from-B-instead-of-usin.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0020-Avoid-using-libdir-from-.la-which-usually-points-to-.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0021-export-CPP.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0022-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0023-Ensure-target-gcc-headers-can-be-included.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0024-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0025-Don-t-search-host-directory-during-relink-if-inst_pr.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0026-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0027-aarch64-Add-support-for-musl-ldso.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0028-libcc1-fix-libcc1-s-install-path-and-rpath.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0029-handle-sysroot-support-for-nativesdk-gcc.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0030-Search-target-sysroot-gcc-version-specific-dirs-with.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0031-Fix-various-_FOR_BUILD-and-related-variables.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0032-nios2-Define-MUSL_DYNAMIC_LINKER.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0033-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0034-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0035-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0036-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0037-sync-gcc-stddef.h-with-musl.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0038-fix-segmentation-fault-in-precompiled-header-generat.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0039-Fix-for-testsuite-failure.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0040-Re-introduce-spe-commandline-options.patch create mode 100644 meta/recipes-devtools/gcc/gcc-cross-canadian_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-cross-initial_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-cross_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-initial_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-runtime_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-sanitizers_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-source_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc_8.1.bb create mode 100644 meta/recipes-devtools/gcc/libgcc-initial_8.1.bb create mode 100644 meta/recipes-devtools/gcc/libgcc_8.1.bb create mode 100644 meta/recipes-devtools/gcc/libgfortran_8.1.bb create mode 100644 meta/recipes-kernel/linux/files/0001-mips-Disable-attribute-alias-warnings.patch create mode 100644 meta/recipes-kernel/linux/files/0001-mips64-Disable-attribute-alias-warning.patch create mode 100644 meta/recipes-kernel/linux/files/0001-objtool-perf-Fix-GCC-8-Wrestrict-error.patch create mode 100644 meta/recipes-kernel/linux/files/0001-powerpc-Disable-attribute-alias-warnings-from-gcc8.patch create mode 100644 meta/recipes-kernel/linux/files/0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch create mode 100644 meta/recipes-kernel/linux/files/0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch
Signature · 1 line
2.17.1
PATCH v2 1/12 tune/arm: Set -mtune instead of -mcpu
-march option is already used to select the base architecture therefore using -mcpu which infact will reset march+mtune can cause conflicts, therefore setting just mtune here will ensure that the code is optimized for the given tune as is the intention of mcpu, however with one advantage, it will be targetting broader march value so can be useful for pre-compiled objects where they can be run on wider subset
This also fixed occasional conflicts like
cc1: error: switch -mcpu=cortex-a7 conflicts with -march=armv7-a switch [-Werror]
which is possible combination in some case for packages in OE
--- meta/conf/machine/include/tune-arm1136jf-s.inc | 2 +- meta/conf/machine/include/tune-arm920t.inc | 2 +- meta/conf/machine/include/tune-arm926ejs.inc | 2 +- meta/conf/machine/include/tune-arm9tdmi.inc | 2 +- meta/conf/machine/include/tune-cortexa15.inc | 2 +- meta/conf/machine/include/tune-cortexa17.inc | 2 +- meta/conf/machine/include/tune-cortexa5.inc | 2 +- meta/conf/machine/include/tune-cortexa7.inc | 2 +- meta/conf/machine/include/tune-cortexa8.inc | 2 +- meta/conf/machine/include/tune-cortexa9.inc | 2 +- meta/conf/machine/include/tune-ep9312.inc | 2 +- meta/conf/machine/include/tune-iwmmxt.inc | 2 +- meta/conf/machine/include/tune-strongarm1100.inc | 2 +- meta/conf/machine/include/tune-thunderx.inc | 2 +- meta/conf/machine/include/tune-xscale.inc | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-)
meta/conf/machine/include/tune-arm1136jf-s.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv6hf" require conf/machine/include/arm/arch-armv6.inc TUNEVALID[arm1136jfs] = "Enable arm1136jfs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mcpu=arm1136jf-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mtune=arm1136jf-s', '', d)}" AVAILTUNES += "arm1136jfs" ARMPKGARCH_tune-arm1136jfs = "arm1136jfs"
meta/conf/machine/include/tune-arm920t.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm920t] = "Enable arm920t specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mcpu=arm920t', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mtune=arm920t', '', d)}" AVAILTUNES += "arm920t" ARMPKGARCH_tune-arm920t = "arm920t"
meta/conf/machine/include/tune-arm926ejs.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[arm926ejs] = "Enable arm926ejs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mcpu=arm926ej-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mtune=arm926ej-s', '', d)}" AVAILTUNES += "arm926ejs" ARMPKGARCH_tune-arm926ejs = "arm926ejs"
meta/conf/machine/include/tune-arm9tdmi.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm9tdmi] = "Enable arm9tdmi specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mcpu=arm9tdmi', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mtune=arm9tdmi', '', d)}" AVAILTUNES += "arm9tdmi" ARMPKGARCH_tune-arm9tdmi = "arm9tdmi"
meta/conf/machine/include/tune-cortexa15.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa15] = "Enable Cortex-A15 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mcpu=cortex-a15', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mtune=cortex-a15', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa15 cortexa15t cortexa15-neon cortexa15t-neon cortexa15-neon-vfpv4 cortexa15t-neon-vfpv4"
meta/conf/machine/include/tune-cortexa17.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa17] = "Enable Cortex-A17 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mcpu=cortex-a17', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mtune=cortex-a17', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa17 cortexa17t cortexa17-neon cortexa17t-neon cortexa17-neon-vfpv4 cortexa17t-neon-vfpv4"
meta/conf/machine/include/tune-cortexa5.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa5] = "Enable Cortex-A5 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mcpu=cortex-a5', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mtune=cortex-a5', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon"
meta/conf/machine/include/tune-cortexa7.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa7] = "Enable Cortex-A7 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mcpu=cortex-a7', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mtune=cortex-a7', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa7 cortexa7t cortexa7-neon cortexa7t-neon cortexa7-neon-vfpv4 cortexa7t-neon-vfpv4"
meta/conf/machine/include/tune-cortexa8.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa8] = "Enable Cortex-A8 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mcpu=cortex-a8', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mtune=cortex-a8', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa8 cortexa8t cortexa8-neon cortexa8t-neon"
meta/conf/machine/include/tune-cortexa9.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa9] = "Enable Cortex-A9 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mcpu=cortex-a9', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mtune=cortex-a9', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa9 cortexa9t cortexa9-neon cortexa9t-neon"
meta/conf/machine/include/tune-ep9312.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "ep9312" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[ep9312] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mcpu=ep9312', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mtune=ep9312', '', d)}" AVAILTUNES += "ep9312" ARMPKGARCH_tune-ep9312 = "ep9312"
meta/conf/machine/include/tune-iwmmxt.inc +1 -1
@@ -6,7 +6,7 @@ DEFAULTTUNE ?= "iwmmxt" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[iwmmxt] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mcpu=iwmmxt', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mtune=iwmmxt', '', d)}" AVAILTUNES += "iwmmxt" ARMPKGARCH_tune-iwmmxt = "iwmmxt"
meta/conf/machine/include/tune-strongarm1100.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[strongarm] = "Enable Strongarm 1100 series processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mcpu=strongarm1100', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mtune=strongarm1100', '', d)}" AVAILTUNES += "strongarm" ARMPKGARCH_tune-strongarm = "strongarm"
meta/conf/machine/include/tune-thunderx.inc +1 -1
@@ -5,7 +5,7 @@ AVAILTUNES += "thunderx thunderx_be" TUNEVALID[thunderx] = "Enable instructions for Cavium ThunderX" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mcpu=thunderx ', '',d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mtune=thunderx ', '',d)}" ARMPKGARCH_tune-thunderx ?= "thunderx" ARMPKGARCH_tune-thunderx_be ?= "thunderx_be"
meta/conf/machine/include/tune-xscale.inc +1 -1
@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[xscale] = "Enable PXA255/PXA26x Xscale specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mcpu=xscale', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mtune=xscale', '', d)}" AVAILTUNES += "xscale" ARMPKGARCH_tune-xscale = "xscale"
Signature · 1 line
2.17.1
Re: [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu
Quoted 3 lines · Khem Raj
-march option is already used to select the base architecture therefore using -mcpu which infact will reset march+mtune can cause conflicts,
I think we need to at least understand how and why these conflicts have started to occur with gcc 8. The tuning files themselves don't contain any conflicts so the conflict must be coming from somewhere else. Do we know where?
This patch is potentially going to hide bugs in cases where components try to provide their own CPU specific flags rather than fully respecting the flags set by OE. Generally we want to make those cases fail so that we can debug and fix them.
Quoted 234 lines
therefore setting just mtune here will ensure
that the code is optimized for the given tune as is the intention of mcpu, however with one advantage, it will be targetting broader march value so can be useful for pre-compiled objects where they can be run on wider subsetThis also fixed occasional conflicts like
cc1: error: switch -mcpu=cortex-a7 conflicts with -march=armv7-a switch [-Werror]
which is possible combination in some case for packages in OE
Signed-off-by Khem Raj <[email protected]>--- meta/conf/machine/include/tune-arm1136jf-s.inc | 2 +- meta/conf/machine/include/tune-arm920t.inc | 2 +- meta/conf/machine/include/tune-arm926ejs.inc | 2 +- meta/conf/machine/include/tune-arm9tdmi.inc | 2 +- meta/conf/machine/include/tune-cortexa15.inc | 2 +- meta/conf/machine/include/tune-cortexa17.inc | 2 +- meta/conf/machine/include/tune-cortexa5.inc | 2 +- meta/conf/machine/include/tune-cortexa7.inc | 2 +- meta/conf/machine/include/tune-cortexa8.inc | 2 +- meta/conf/machine/include/tune-cortexa9.inc | 2 +- meta/conf/machine/include/tune-ep9312.inc | 2 +- meta/conf/machine/include/tune-iwmmxt.inc | 2 +- meta/conf/machine/include/tune-strongarm1100.inc | 2 +- meta/conf/machine/include/tune-thunderx.inc | 2 +- meta/conf/machine/include/tune-xscale.inc | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-)meta/conf/machine/include/tune-arm1136jf-s.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv6hf" require conf/machine/include/arm/arch-armv6.inc TUNEVALID[arm1136jfs] = "Enable arm1136jfs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mcpu=arm1136jf-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mtune=arm1136jf-s', '', d)}" AVAILTUNES += "arm1136jfs" ARMPKGARCH_tune-arm1136jfs = "arm1136jfs"meta/conf/machine/include/tune-arm920t.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm920t] = "Enable arm920t specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mcpu=arm920t', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mtune=arm920t', '', d)}" AVAILTUNES += "arm920t" ARMPKGARCH_tune-arm920t = "arm920t"meta/conf/machine/include/tune-arm926ejs.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[arm926ejs] = "Enable arm926ejs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mcpu=arm926ej-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mtune=arm926ej-s', '', d)}" AVAILTUNES += "arm926ejs" ARMPKGARCH_tune-arm926ejs = "arm926ejs"meta/conf/machine/include/tune-arm9tdmi.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm9tdmi] = "Enable arm9tdmi specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mcpu=arm9tdmi', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mtune=arm9tdmi', '', d)}" AVAILTUNES += "arm9tdmi" ARMPKGARCH_tune-arm9tdmi = "arm9tdmi"meta/conf/machine/include/tune-cortexa15.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa15] = "Enable Cortex-A15 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mcpu=cortex-a15', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mtune=cortex-a15', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa15 cortexa15t cortexa15-neon cortexa15t-neon cortexa15-neon-vfpv4 cortexa15t-neon-vfpv4"meta/conf/machine/include/tune-cortexa17.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa17] = "Enable Cortex-A17 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mcpu=cortex-a17', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mtune=cortex-a17', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa17 cortexa17t cortexa17-neon cortexa17t-neon cortexa17-neon-vfpv4 cortexa17t-neon-vfpv4"meta/conf/machine/include/tune-cortexa5.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa5] = "Enable Cortex-A5 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mcpu=cortex-a5', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mtune=cortex-a5', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon"meta/conf/machine/include/tune-cortexa7.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa7] = "Enable Cortex-A7 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mcpu=cortex-a7', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mtune=cortex-a7', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa7 cortexa7t cortexa7-neon cortexa7t-neon cortexa7-neon-vfpv4 cortexa7t-neon-vfpv4"meta/conf/machine/include/tune-cortexa8.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa8] = "Enable Cortex-A8 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mcpu=cortex-a8', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mtune=cortex-a8', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa8 cortexa8t cortexa8-neon cortexa8t-neon"meta/conf/machine/include/tune-cortexa9.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa9] = "Enable Cortex-A9 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mcpu=cortex-a9', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mtune=cortex-a9', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa9 cortexa9t cortexa9-neon cortexa9t-neon"meta/conf/machine/include/tune-ep9312.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "ep9312" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[ep9312] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mcpu=ep9312', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mtune=ep9312', '', d)}" AVAILTUNES += "ep9312" ARMPKGARCH_tune-ep9312 = "ep9312"meta/conf/machine/include/tune-iwmmxt.inc +1
-1@@ -6,7 +6,7 @@ DEFAULTTUNE ?= "iwmmxt" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[iwmmxt] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mcpu=iwmmxt', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mtune=iwmmxt', '', d)}" AVAILTUNES += "iwmmxt" ARMPKGARCH_tune-iwmmxt = "iwmmxt"meta/conf/machine/include/tune-strongarm1100.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[strongarm] = "Enable Strongarm 1100 series processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mcpu=strongarm1100', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mtune=strongarm1100', '', d)}" AVAILTUNES += "strongarm" ARMPKGARCH_tune-strongarm = "strongarm"meta/conf/machine/include/tune-thunderx.inc +1
-1@@ -5,7 +5,7 @@ AVAILTUNES += "thunderx thunderx_be" TUNEVALID[thunderx] = "Enable instructions for Cavium ThunderX" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mcpu=thunderx ', '',d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mtune=thunderx ', '',d)}" ARMPKGARCH_tune-thunderx ?= "thunderx" ARMPKGARCH_tune-thunderx_be ?= "thunderx_be"meta/conf/machine/include/tune-xscale.inc +1
-2@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[xscale] = "Enable PXA255/PXA26x Xscale specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mcpu=xscale', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mtune=xscale', '', d)}" AVAILTUNES += "xscale" ARMPKGARCH_tune-xscale = "xscale" --2.17.1
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu
Quoted 9 lines · Andre McCurdy
Quoted 3 lines · Khem Raj
-march option is already used to select the base architecture therefore using -mcpu which infact will reset march+mtune can cause conflicts,
I think we need to at least understand how and why these conflicts have started to occur with gcc 8. The tuning files themselves don't contain any conflicts so the conflict must be coming from somewhere else. Do we know where?
I explained it in previous emails as well, mcpu is a combination of march+mtune how it reduces to these values depends on mcpu value. e.g. setting mcpu=cortex-a7
would mean setting march=armv7ve and mtune to cortex-a7 internally along with using code generator to use instructions available for that cpu, thats why it errors out since it does not know which march to use.
when we override one of these values on cmdline which we do then this can cause the errors, these errors were happening before too see valgrind patch its that gcc8 is catching more cases.
example is gcc-runtime/libstdc++ which deducts arch flags based on configure options
and we do not pass narrow mcpu option to it since we build SDKs which do not target
just one particular sub-family of cpu but rather a sub arch and if we do not pass --with-cpu then it enforces some lowest common denominator. When we say -mcpu then we
are actually asking the code to be generated for that particular CPU.
Quoted 6 lines
This patch is potentially going to hide bugs in cases where components try to provide their own CPU specific flags rather than fully respecting the flags set by OE. Generally we want to make those cases fail so that we can debug and fix them.
No it wont. they can still do that. Last option wins so nothing changes there. and in many cases it should be able to override specific flags for specific packages
OE is a fall back for general default case.
A good change this does is that code is targeted for bigger base arch e.g. armv7-a
and not for cortex-a8 but its tuned to run better on cortex-a8 when we use -mtune
it will still run on other armv7-a based CPUs, so right now when we say our package
arch is arm7ve but then use -mcpu=cortex-a7 we are actually doing wrong thing this should have meant package arch to be cortex-a7 as well. Now this will be more
inline as well.
Quoted 234 lines
Quoted 234 lines
therefore setting just mtune here will ensure
that the code is optimized for the given tune as is the intention of mcpu, however with one advantage, it will be targetting broader march value so can be useful for pre-compiled objects where they can be run on wider subsetThis also fixed occasional conflicts like
cc1: error: switch -mcpu=cortex-a7 conflicts with -march=armv7-a switch [-Werror]
which is possible combination in some case for packages in OE
Signed-off-by Khem Raj <[email protected]>--- meta/conf/machine/include/tune-arm1136jf-s.inc | 2 +- meta/conf/machine/include/tune-arm920t.inc | 2 +- meta/conf/machine/include/tune-arm926ejs.inc | 2 +- meta/conf/machine/include/tune-arm9tdmi.inc | 2 +- meta/conf/machine/include/tune-cortexa15.inc | 2 +- meta/conf/machine/include/tune-cortexa17.inc | 2 +- meta/conf/machine/include/tune-cortexa5.inc | 2 +- meta/conf/machine/include/tune-cortexa7.inc | 2 +- meta/conf/machine/include/tune-cortexa8.inc | 2 +- meta/conf/machine/include/tune-cortexa9.inc | 2 +- meta/conf/machine/include/tune-ep9312.inc | 2 +- meta/conf/machine/include/tune-iwmmxt.inc | 2 +- meta/conf/machine/include/tune-strongarm1100.inc | 2 +- meta/conf/machine/include/tune-thunderx.inc | 2 +- meta/conf/machine/include/tune-xscale.inc | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-)meta/conf/machine/include/tune-arm1136jf-s.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv6hf" require conf/machine/include/arm/arch-armv6.inc TUNEVALID[arm1136jfs] = "Enable arm1136jfs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mcpu=arm1136jf-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mtune=arm1136jf-s', '', d)}" AVAILTUNES += "arm1136jfs" ARMPKGARCH_tune-arm1136jfs = "arm1136jfs"meta/conf/machine/include/tune-arm920t.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm920t] = "Enable arm920t specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mcpu=arm920t', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mtune=arm920t', '', d)}" AVAILTUNES += "arm920t" ARMPKGARCH_tune-arm920t = "arm920t"meta/conf/machine/include/tune-arm926ejs.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[arm926ejs] = "Enable arm926ejs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mcpu=arm926ej-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mtune=arm926ej-s', '', d)}" AVAILTUNES += "arm926ejs" ARMPKGARCH_tune-arm926ejs = "arm926ejs"meta/conf/machine/include/tune-arm9tdmi.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm9tdmi] = "Enable arm9tdmi specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mcpu=arm9tdmi', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mtune=arm9tdmi', '', d)}" AVAILTUNES += "arm9tdmi" ARMPKGARCH_tune-arm9tdmi = "arm9tdmi"meta/conf/machine/include/tune-cortexa15.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa15] = "Enable Cortex-A15 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mcpu=cortex-a15', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mtune=cortex-a15', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa15 cortexa15t cortexa15-neon cortexa15t-neon cortexa15-neon-vfpv4 cortexa15t-neon-vfpv4"meta/conf/machine/include/tune-cortexa17.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa17] = "Enable Cortex-A17 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mcpu=cortex-a17', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mtune=cortex-a17', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa17 cortexa17t cortexa17-neon cortexa17t-neon cortexa17-neon-vfpv4 cortexa17t-neon-vfpv4"meta/conf/machine/include/tune-cortexa5.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa5] = "Enable Cortex-A5 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mcpu=cortex-a5', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mtune=cortex-a5', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon"meta/conf/machine/include/tune-cortexa7.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa7] = "Enable Cortex-A7 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mcpu=cortex-a7', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mtune=cortex-a7', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa7 cortexa7t cortexa7-neon cortexa7t-neon cortexa7-neon-vfpv4 cortexa7t-neon-vfpv4"meta/conf/machine/include/tune-cortexa8.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa8] = "Enable Cortex-A8 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mcpu=cortex-a8', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mtune=cortex-a8', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa8 cortexa8t cortexa8-neon cortexa8t-neon"meta/conf/machine/include/tune-cortexa9.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa9] = "Enable Cortex-A9 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mcpu=cortex-a9', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mtune=cortex-a9', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa9 cortexa9t cortexa9-neon cortexa9t-neon"meta/conf/machine/include/tune-ep9312.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "ep9312" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[ep9312] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mcpu=ep9312', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mtune=ep9312', '', d)}" AVAILTUNES += "ep9312" ARMPKGARCH_tune-ep9312 = "ep9312"meta/conf/machine/include/tune-iwmmxt.inc +1
-1@@ -6,7 +6,7 @@ DEFAULTTUNE ?= "iwmmxt" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[iwmmxt] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mcpu=iwmmxt', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mtune=iwmmxt', '', d)}" AVAILTUNES += "iwmmxt" ARMPKGARCH_tune-iwmmxt = "iwmmxt"meta/conf/machine/include/tune-strongarm1100.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[strongarm] = "Enable Strongarm 1100 series processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mcpu=strongarm1100', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mtune=strongarm1100', '', d)}" AVAILTUNES += "strongarm" ARMPKGARCH_tune-strongarm = "strongarm"meta/conf/machine/include/tune-thunderx.inc +1
-1@@ -5,7 +5,7 @@ AVAILTUNES += "thunderx thunderx_be" TUNEVALID[thunderx] = "Enable instructions for Cavium ThunderX" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mcpu=thunderx ', '',d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mtune=thunderx ', '',d)}" ARMPKGARCH_tune-thunderx ?= "thunderx" ARMPKGARCH_tune-thunderx_be ?= "thunderx_be"meta/conf/machine/include/tune-xscale.inc +1
-2@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[xscale] = "Enable PXA255/PXA26x Xscale specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mcpu=xscale', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mtune=xscale', '', d)}" AVAILTUNES += "xscale" ARMPKGARCH_tune-xscale = "xscale" --2.17.1
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu
Quoted 11 lines · Khem Raj
Quoted 9 lines · Andre McCurdy
Quoted 3 lines · Khem Raj
-march option is already used to select the base architecture therefore using -mcpu which infact will reset march+mtune can cause conflicts,
I think we need to at least understand how and why these conflicts have started to occur with gcc 8. The tuning files themselves don't contain any conflicts so the conflict must be coming from somewhere else. Do we know where?
Quoted 10 lines
I explained it in previous emails as well, mcpu is a combination of march+mtune how it reduces to these values depends on mcpu value. e.g. setting mcpu=cortex-a7
would mean setting march=armv7ve and mtune to cortex-a7 internally along with using code generator to use instructions available for that cpu, thats why it errors out since it does not know which march to use.
when we override one of these values on cmdline which we do then this can cause the errors, these errors were happening before too see valgrind patch its that gcc8 is catching more cases.
The -mcpu, -march and -mtune options are not new and gcc 6 and 7 catch the same conflicts. It doesn't make sense that gcc8 is just catching more issues.
The valgrind case is not a good example. The conflict there comes because we leak CFLAGS intended for the target into Makefiles which valgrind uses to build test apps which are intended to only run under valgrind (ie NOT directly on the target). The real fix there would be to prevent the target specific flags being passed to build for those few valgrind test apps.
Quoted 8 lines
example is gcc-runtime/libstdc++ which deducts arch flags based on configure options
and we do not pass narrow mcpu option to it since we build SDKs which do not target
just one particular sub-family of cpu but rather a sub arch do not pass --with-cpu then it enforces some lowest common denominator. When we say -mcpu then we
are actually asking the code to be generated for that particular CPU.
If we are trying to build something which is reusable across multiple machines with the same architecture then it's a bug to be passing machine specific CFLAGS. Making the machine specific CFLAGS more generic is not the right solution.
Anyway, I suspect the real issue here is that when we build gcc to run on the target we currently configure using "--with-arch=armv7-a" for both armv7a and armv7ve. It was done that way deliberately to try to avoid rebuilds when switching between armv7a and armv7ve machines, although thinking about that now I'm not sure it makes so much sense. Does your original problem go away if you simply change:
EXTRA_OECONF_append_armv7ve = " --with-arch=armv7-a"
to
EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve"
in gcc-target.inc ?
Quoted 8 lines
Quoted 6 lines
This patch is potentially going to hide bugs in cases where components try to provide their own CPU specific flags rather than fully respecting the flags set by OE. Generally we want to make those cases fail so that we can debug and fix them.
No it wont. they can still do that. Last option wins so nothing changes there.
The thing that changes is that after your patch, gcc will no longer report a conflict!
Quoted 250 lines
and in many cases it should be able to override specific flags for specific packages
OE is a fall back for general default case.A good change this does is that code is targeted for bigger base arch e.g. armv7-a
and not for cortex-a8 but its tuned to run better on cortex-a8 when we use -mtune
it will still run on other armv7-a based CPUs, so right now when we say our package
arch is arm7ve but then use -mcpu=cortex-a7 we are actually doing wrong thing this should have meant package arch to be cortex-a7 as well. Now this will be more
inline as well.Quoted 234 lines
Quoted 234 lines
therefore setting just mtune here will ensure
that the code is optimized for the given tune as is the intention of mcpu, however with one advantage, it will be targetting broader march value so can be useful for pre-compiled objects where they can be run on wider subsetThis also fixed occasional conflicts like
cc1: error: switch -mcpu=cortex-a7 conflicts with -march=armv7-a switch [-Werror]
which is possible combination in some case for packages in OE
Signed-off-by Khem Raj <[email protected]>--- meta/conf/machine/include/tune-arm1136jf-s.inc | 2 +- meta/conf/machine/include/tune-arm920t.inc | 2 +- meta/conf/machine/include/tune-arm926ejs.inc | 2 +- meta/conf/machine/include/tune-arm9tdmi.inc | 2 +- meta/conf/machine/include/tune-cortexa15.inc | 2 +- meta/conf/machine/include/tune-cortexa17.inc | 2 +- meta/conf/machine/include/tune-cortexa5.inc | 2 +- meta/conf/machine/include/tune-cortexa7.inc | 2 +- meta/conf/machine/include/tune-cortexa8.inc | 2 +- meta/conf/machine/include/tune-cortexa9.inc | 2 +- meta/conf/machine/include/tune-ep9312.inc | 2 +- meta/conf/machine/include/tune-iwmmxt.inc | 2 +- meta/conf/machine/include/tune-strongarm1100.inc | 2 +- meta/conf/machine/include/tune-thunderx.inc | 2 +- meta/conf/machine/include/tune-xscale.inc | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-)meta/conf/machine/include/tune-arm1136jf-s.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv6hf" require conf/machine/include/arm/arch-armv6.inc TUNEVALID[arm1136jfs] = "Enable arm1136jfs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mcpu=arm1136jf-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mtune=arm1136jf-s', '', d)}" AVAILTUNES += "arm1136jfs" ARMPKGARCH_tune-arm1136jfs = "arm1136jfs"meta/conf/machine/include/tune-arm920t.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm920t] = "Enable arm920t specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mcpu=arm920t', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mtune=arm920t', '', d)}" AVAILTUNES += "arm920t" ARMPKGARCH_tune-arm920t = "arm920t"meta/conf/machine/include/tune-arm926ejs.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[arm926ejs] = "Enable arm926ejs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mcpu=arm926ej-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mtune=arm926ej-s', '', d)}" AVAILTUNES += "arm926ejs" ARMPKGARCH_tune-arm926ejs = "arm926ejs"meta/conf/machine/include/tune-arm9tdmi.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm9tdmi] = "Enable arm9tdmi specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mcpu=arm9tdmi', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mtune=arm9tdmi', '', d)}" AVAILTUNES += "arm9tdmi" ARMPKGARCH_tune-arm9tdmi = "arm9tdmi"meta/conf/machine/include/tune-cortexa15.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa15] = "Enable Cortex-A15 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mcpu=cortex-a15', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mtune=cortex-a15', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa15 cortexa15t cortexa15-neon cortexa15t-neon cortexa15-neon-vfpv4 cortexa15t-neon-vfpv4"meta/conf/machine/include/tune-cortexa17.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa17] = "Enable Cortex-A17 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mcpu=cortex-a17', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mtune=cortex-a17', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa17 cortexa17t cortexa17-neon cortexa17t-neon cortexa17-neon-vfpv4 cortexa17t-neon-vfpv4"meta/conf/machine/include/tune-cortexa5.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa5] = "Enable Cortex-A5 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mcpu=cortex-a5', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mtune=cortex-a5', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon"meta/conf/machine/include/tune-cortexa7.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa7] = "Enable Cortex-A7 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mcpu=cortex-a7', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mtune=cortex-a7', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa7 cortexa7t cortexa7-neon cortexa7t-neon cortexa7-neon-vfpv4 cortexa7t-neon-vfpv4"meta/conf/machine/include/tune-cortexa8.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa8] = "Enable Cortex-A8 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mcpu=cortex-a8', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mtune=cortex-a8', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa8 cortexa8t cortexa8-neon cortexa8t-neon"meta/conf/machine/include/tune-cortexa9.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa9] = "Enable Cortex-A9 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mcpu=cortex-a9', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mtune=cortex-a9', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa9 cortexa9t cortexa9-neon cortexa9t-neon"meta/conf/machine/include/tune-ep9312.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "ep9312" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[ep9312] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mcpu=ep9312', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mtune=ep9312', '', d)}" AVAILTUNES += "ep9312" ARMPKGARCH_tune-ep9312 = "ep9312"meta/conf/machine/include/tune-iwmmxt.inc +1
-1@@ -6,7 +6,7 @@ DEFAULTTUNE ?= "iwmmxt" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[iwmmxt] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mcpu=iwmmxt', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mtune=iwmmxt', '', d)}" AVAILTUNES += "iwmmxt" ARMPKGARCH_tune-iwmmxt = "iwmmxt"meta/conf/machine/include/tune-strongarm1100.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[strongarm] = "Enable Strongarm 1100 series processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mcpu=strongarm1100', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mtune=strongarm1100', '', d)}" AVAILTUNES += "strongarm" ARMPKGARCH_tune-strongarm = "strongarm"meta/conf/machine/include/tune-thunderx.inc +1
-1@@ -5,7 +5,7 @@ AVAILTUNES += "thunderx thunderx_be" TUNEVALID[thunderx] = "Enable instructions for Cavium ThunderX" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mcpu=thunderx ', '',d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mtune=thunderx ', '',d)}" ARMPKGARCH_tune-thunderx ?= "thunderx" ARMPKGARCH_tune-thunderx_be ?= "thunderx_be"meta/conf/machine/include/tune-xscale.inc +1
-2@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[xscale] = "Enable PXA255/PXA26x Xscale specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mcpu=xscale', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mtune=xscale', '', d)}" AVAILTUNES += "xscale" ARMPKGARCH_tune-xscale = "xscale" --2.17.1
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu
Quoted 23 lines · Andre McCurdy
Quoted 11 lines · Khem Raj
Quoted 9 lines · Andre McCurdy
Quoted 3 lines · Khem Raj
-march option is already used to select the base architecture therefore using -mcpu which infact will reset march+mtune can cause conflicts,
I think we need to at least understand how and why these conflicts have started to occur with gcc 8. The tuning files themselves don't contain any conflicts so the conflict must be coming from somewhere else. Do we know where?
Quoted 10 lines
I explained it in previous emails as well, mcpu is a combination of march+mtune how it reduces to these values depends on mcpu value. e.g. setting mcpu=cortex-a7
would mean setting march=armv7ve and mtune to cortex-a7 internally along with using code generator to use instructions available for that cpu, thats why it errors out since it does not know which march to use.
when we override one of these values on cmdline which we do then this can cause the errors, these errors were happening before too see valgrind patch its that gcc8 is catching more cases.
Quoted 3 lines
The -mcpu, -march and -mtune options are not new and gcc 6 and 7 catch the same conflicts. It doesn't make sense that gcc8 is just catching more issues.
It does make sense. the option parsing for these specific options on arm have been revamped after gcc7, see
Quoted 8 lines
The valgrind case is not a good example. The conflict there comes because we leak CFLAGS intended for the target into Makefiles which valgrind uses to build test apps which are intended to only run under valgrind (ie NOT directly on the target). The real fix there would be to prevent the target specific flags being passed to build for those few valgrind test apps.
it is manifesting similar conflicts
Quoted 9 lines
Quoted 8 lines
example is gcc-runtime/libstdc++ which deducts arch flags based on configure options
and we do not pass narrow mcpu option to it since we build SDKs which do not target
just one particular sub-family of cpu but rather a sub arch do not pass --with-cpu then it enforces some lowest common denominator. When we say -mcpu then we
are actually asking the code to be generated for that particular CPU.
Quoted 4 lines
If we are trying to build something which is reusable across multiple machines with the same architecture then it's a bug to be passing machine specific CFLAGS. Making the machine specific CFLAGS more generic is not the right solution.
being reusable is a side-effect and a good one. Real problem is we are not matching to what we say in package arches, Probably you are confusing tunes to be meant for static code generation for a given CPU. I am interested to hear more ideas to what would be right solution if this is not it.
Quoted 8 lines
Anyway, I suspect the real issue here is that when we build gcc to run on the target we currently configure using "--with-arch=armv7-a" for both armv7a and armv7ve. It was done that way deliberately to try to avoid rebuilds when switching between armv7a and armv7ve machines, although thinking about that now I'm not sure it makes so much sense. Does your original problem go away if you simply change:
Quoted 7 lines
EXTRA_OECONF_append_armv7ve = " --with-arch=armv7-a"to
EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve"in gcc-target.inc ?
No, this is not the problem I am talking about gcc-runtime which is configured during cross build but built for target later on.
talking about this case, changing --with-arch will make on device gcc complain about mismatches with default runtime since it is meant to use same runtime that will be built above. Using armv7-a here is a conscious choice.
Quoted 263 lines
Quoted 9 lines
Quoted 7 lines
This patch is potentially going to hide bugs in cases where components try to provide their own CPU specific flags rather than fully respecting the flags set by OE. Generally we want to make those cases fail so that we can debug and fix them.
No it wont. they can still do that. Last option wins so nothing changes there.
The thing that changes is that after your patch, gcc will no longer report a conflict!
Quoted 250 lines
and in many cases it should be able to override specific flags for specific packages
OE is a fall back for general default case.A good change this does is that code is targeted for bigger base arch e.g. armv7-a
and not for cortex-a8 but its tuned to run better on cortex-a8 when we use -mtune
it will still run on other armv7-a based CPUs, so right now when we say our package
arch is arm7ve but then use -mcpu=cortex-a7 we are actually doing wrong thing this should have meant package arch to be cortex-a7 as well. Now this will be more
inline as well.Quoted 234 lines
Quoted 234 lines
therefore setting just mtune here will ensure
that the code is optimized for the given tune as is the intention of mcpu, however with one advantage, it will be targetting broader march value so can be useful for pre-compiled objects where they can be run on wider subsetThis also fixed occasional conflicts like
cc1: error: switch -mcpu=cortex-a7 conflicts with -march=armv7-a switch [-Werror]
which is possible combination in some case for packages in OE
Signed-off-by Khem Raj <[email protected]>--- meta/conf/machine/include/tune-arm1136jf-s.inc | 2 +- meta/conf/machine/include/tune-arm920t.inc | 2 +- meta/conf/machine/include/tune-arm926ejs.inc | 2 +- meta/conf/machine/include/tune-arm9tdmi.inc | 2 +- meta/conf/machine/include/tune-cortexa15.inc | 2 +- meta/conf/machine/include/tune-cortexa17.inc | 2 +- meta/conf/machine/include/tune-cortexa5.inc | 2 +- meta/conf/machine/include/tune-cortexa7.inc | 2 +- meta/conf/machine/include/tune-cortexa8.inc | 2 +- meta/conf/machine/include/tune-cortexa9.inc | 2 +- meta/conf/machine/include/tune-ep9312.inc | 2 +- meta/conf/machine/include/tune-iwmmxt.inc | 2 +- meta/conf/machine/include/tune-strongarm1100.inc | 2 +- meta/conf/machine/include/tune-thunderx.inc | 2 +- meta/conf/machine/include/tune-xscale.inc | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-)meta/conf/machine/include/tune-arm1136jf-s.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv6hf" require conf/machine/include/arm/arch-armv6.inc TUNEVALID[arm1136jfs] = "Enable arm1136jfs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mcpu=arm1136jf-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mtune=arm1136jf-s', '', d)}" AVAILTUNES += "arm1136jfs" ARMPKGARCH_tune-arm1136jfs = "arm1136jfs"meta/conf/machine/include/tune-arm920t.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm920t] = "Enable arm920t specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mcpu=arm920t', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mtune=arm920t', '', d)}" AVAILTUNES += "arm920t" ARMPKGARCH_tune-arm920t = "arm920t"meta/conf/machine/include/tune-arm926ejs.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[arm926ejs] = "Enable arm926ejs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mcpu=arm926ej-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mtune=arm926ej-s', '', d)}" AVAILTUNES += "arm926ejs" ARMPKGARCH_tune-arm926ejs = "arm926ejs"meta/conf/machine/include/tune-arm9tdmi.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm9tdmi] = "Enable arm9tdmi specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mcpu=arm9tdmi', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mtune=arm9tdmi', '', d)}" AVAILTUNES += "arm9tdmi" ARMPKGARCH_tune-arm9tdmi = "arm9tdmi"meta/conf/machine/include/tune-cortexa15.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa15] = "Enable Cortex-A15 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mcpu=cortex-a15', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mtune=cortex-a15', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa15 cortexa15t cortexa15-neon cortexa15t-neon cortexa15-neon-vfpv4 cortexa15t-neon-vfpv4"meta/conf/machine/include/tune-cortexa17.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa17] = "Enable Cortex-A17 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mcpu=cortex-a17', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mtune=cortex-a17', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa17 cortexa17t cortexa17-neon cortexa17t-neon cortexa17-neon-vfpv4 cortexa17t-neon-vfpv4"meta/conf/machine/include/tune-cortexa5.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa5] = "Enable Cortex-A5 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mcpu=cortex-a5', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mtune=cortex-a5', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon"meta/conf/machine/include/tune-cortexa7.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa7] = "Enable Cortex-A7 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mcpu=cortex-a7', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mtune=cortex-a7', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa7 cortexa7t cortexa7-neon cortexa7t-neon cortexa7-neon-vfpv4 cortexa7t-neon-vfpv4"meta/conf/machine/include/tune-cortexa8.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa8] = "Enable Cortex-A8 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mcpu=cortex-a8', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mtune=cortex-a8', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa8 cortexa8t cortexa8-neon cortexa8t-neon"meta/conf/machine/include/tune-cortexa9.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa9] = "Enable Cortex-A9 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mcpu=cortex-a9', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mtune=cortex-a9', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa9 cortexa9t cortexa9-neon cortexa9t-neon"meta/conf/machine/include/tune-ep9312.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "ep9312" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[ep9312] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mcpu=ep9312', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mtune=ep9312', '', d)}" AVAILTUNES += "ep9312" ARMPKGARCH_tune-ep9312 = "ep9312"meta/conf/machine/include/tune-iwmmxt.inc +1
-1@@ -6,7 +6,7 @@ DEFAULTTUNE ?= "iwmmxt" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[iwmmxt] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mcpu=iwmmxt', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mtune=iwmmxt', '', d)}" AVAILTUNES += "iwmmxt" ARMPKGARCH_tune-iwmmxt = "iwmmxt"meta/conf/machine/include/tune-strongarm1100.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[strongarm] = "Enable Strongarm 1100 series processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mcpu=strongarm1100', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mtune=strongarm1100', '', d)}" AVAILTUNES += "strongarm" ARMPKGARCH_tune-strongarm = "strongarm"meta/conf/machine/include/tune-thunderx.inc +1
-1@@ -5,7 +5,7 @@ AVAILTUNES += "thunderx thunderx_be" TUNEVALID[thunderx] = "Enable instructions for Cavium ThunderX" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mcpu=thunderx ', '',d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mtune=thunderx ', '',d)}" ARMPKGARCH_tune-thunderx ?= "thunderx" ARMPKGARCH_tune-thunderx_be ?= "thunderx_be"meta/conf/machine/include/tune-xscale.inc +1
-2@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[xscale] = "Enable PXA255/PXA26x Xscale specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mcpu=xscale', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mtune=xscale', '', d)}" AVAILTUNES += "xscale" ARMPKGARCH_tune-xscale = "xscale" --2.17.1
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Re: [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu
Quoted 60 lines · Khem Raj
Quoted 23 lines · Andre McCurdy
Quoted 11 lines · Khem Raj
Quoted 9 lines · Andre McCurdy
Quoted 3 lines · Khem Raj
-march option is already used to select the base architecture therefore using -mcpu which infact will reset march+mtune can cause conflicts,
I think we need to at least understand how and why these conflicts have started to occur with gcc 8. The tuning files themselves don't contain any conflicts so the conflict must be coming from somewhere else. Do we know where?
Quoted 10 lines
I explained it in previous emails as well, mcpu is a combination of march+mtune how it reduces to these values depends on mcpu value. e.g. setting mcpu=cortex-a7
would mean setting march=armv7ve and mtune to cortex-a7 internally along with using code generator to use instructions available for that cpu, thats why it errors out since it does not know which march to use.
when we override one of these values on cmdline which we do then this can cause the errors, these errors were happening before too see valgrind patch its that gcc8 is catching more cases.Quoted 3 lines
The -mcpu, -march and -mtune options are not new and gcc 6 and 7 catch the same conflicts. It doesn't make sense that gcc8 is just catching more issues.
It does make sense. the option parsing for these specific options on arm have been revamped after gcc7, see
Quoted 8 lines
The valgrind case is not a good example. The conflict there comes because we leak CFLAGS intended for the target into Makefiles which valgrind uses to build test apps which are intended to only run under valgrind (ie NOT directly on the target). The real fix there would be to prevent the target specific flags being passed to build for those few valgrind test apps.
it is manifesting similar conflicts
Quoted 9 lines
Quoted 8 lines
example is gcc-runtime/libstdc++ which deducts arch flags based on configure options
and we do not pass narrow mcpu option to it since we build SDKs which do not target
just one particular sub-family of cpu but rather a sub arch do not pass --with-cpu then it enforces some lowest common denominator. When we say -mcpu then we
are actually asking the code to be generated for that particular CPU.Quoted 4 lines
If we are trying to build something which is reusable across multiple machines with the same architecture then it's a bug to be passing machine specific CFLAGS. Making the machine specific CFLAGS more generic is not the right solution.
Quoted 5 lines
being reusable is a side-effect and a good one. Real problem is we are not matching to what we say in package arches, Probably you are confusing tunes to be meant for static code generation for a given CPU. I am interested to hear more ideas to what would be right solution if this is not it.
I don't agree with this part, you're basically reverting the change from:
http://git.openembedded.org/openembedded-core/commit/?id=f7bb2d4cf18ca8d2a90b4b3b5c6c48dad106ca28
but since:
http://git.openembedded.org/openembedded-core/commit/?id=cffda9a821a3b83a8529d643c567859e091c6846
we already have different ARMPKGARCH for each DEFAULT_TUNE with different -mcpu option.
If you want to target more generic configuration than you should use more generic DEFAULT_TUNE and even the default configuration will select something generic, e.g.:
http://git.openembedded.org/openembedded-core/tree/meta/conf/machine/include/tune-cortexa8.inc
sets
DEFAULTTUNE ?= "armv7athf-neon"
so no -mcpu options unless you explicitly ask for it by selecting more specific DEFAULT_TUNE in DISTRO config.
Quoted 15 lines
Quoted 7 lines
Anyway, I suspect the real issue here is that when we build gcc to run on the target we currently configure using "--with-arch=armv7-a" for both armv7a and armv7ve. It was done that way deliberately to try to avoid rebuilds when switching between armv7a and armv7ve machines, although thinking about that now I'm not sure it makes so much sense. Does your original problem go away if you simply change:
Quoted 7 lines
EXTRA_OECONF_append_armv7ve = " --with-arch=armv7-a"to
EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve"in gcc-target.inc ?
Quoted 7 lines
No, this is not the problem I am talking about gcc-runtime which is configured during cross build but built for target later on.
talking about this case, changing --with-arch will make on device gcc complain about mismatches with default runtime since it is meant to use same runtime that will be built above. Using armv7-a here is a conscious choice.
I've already tried this as well, because that's what I was doing long time ago with the tune files:
http://git.openembedded.org/openembedded-core/commit/meta/conf/machine/include?id=35392025f3236f5e5393f9cf0857732da9a2e503
but it's true that gcc-runtime is a bit more complicated by that, it doesn't use gcc-target.inc (gcc-target.inc is only used by gcc itself), so I've tried to move the --with-arch options a bit lower to gcc-configure-common.inc where we already set the archs for MIPS, but it didn't work well, at least as done in:
https://pastebin.com/3Cc5MYBa
and then I've moved to something else and never finished this one.
Quoted 269 lines
Quoted 264 lines
Quoted 10 lines
Quoted 8 lines
This patch is potentially going to hide bugs in cases where components try to provide their own CPU specific flags rather than fully respecting the flags set by OE. Generally we want to make those cases fail so that we can debug and fix them.
No it wont. they can still do that. Last option wins so nothing changes there.
The thing that changes is that after your patch, gcc will no longer report a conflict!
Quoted 250 lines
and in many cases it should be able to override specific flags for specific packages
OE is a fall back for general default case.A good change this does is that code is targeted for bigger base arch e.g. armv7-a
and not for cortex-a8 but its tuned to run better on cortex-a8 when we use -mtune
it will still run on other armv7-a based CPUs, so right now when we say our package
arch is arm7ve but then use -mcpu=cortex-a7 we are actually doing wrong thing this should have meant package arch to be cortex-a7 as well. Now this will be more
inline as well.Quoted 234 lines
Quoted 234 lines
therefore setting just mtune here will ensure
that the code is optimized for the given tune as is the intention of mcpu, however with one advantage, it will be targetting broader march value so can be useful for pre-compiled objects where they can be run on wider subsetThis also fixed occasional conflicts like
cc1: error: switch -mcpu=cortex-a7 conflicts with -march=armv7-a switch [-Werror]
which is possible combination in some case for packages in OE
Signed-off-by Khem Raj <[email protected]>--- meta/conf/machine/include/tune-arm1136jf-s.inc | 2 +- meta/conf/machine/include/tune-arm920t.inc | 2 +- meta/conf/machine/include/tune-arm926ejs.inc | 2 +- meta/conf/machine/include/tune-arm9tdmi.inc | 2 +- meta/conf/machine/include/tune-cortexa15.inc | 2 +- meta/conf/machine/include/tune-cortexa17.inc | 2 +- meta/conf/machine/include/tune-cortexa5.inc | 2 +- meta/conf/machine/include/tune-cortexa7.inc | 2 +- meta/conf/machine/include/tune-cortexa8.inc | 2 +- meta/conf/machine/include/tune-cortexa9.inc | 2 +- meta/conf/machine/include/tune-ep9312.inc | 2 +- meta/conf/machine/include/tune-iwmmxt.inc | 2 +- meta/conf/machine/include/tune-strongarm1100.inc | 2 +- meta/conf/machine/include/tune-thunderx.inc | 2 +- meta/conf/machine/include/tune-xscale.inc | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-)meta/conf/machine/include/tune-arm1136jf-s.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv6hf" require conf/machine/include/arm/arch-armv6.inc TUNEVALID[arm1136jfs] = "Enable arm1136jfs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mcpu=arm1136jf-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mtune=arm1136jf-s', '', d)}" AVAILTUNES += "arm1136jfs" ARMPKGARCH_tune-arm1136jfs = "arm1136jfs"meta/conf/machine/include/tune-arm920t.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm920t] = "Enable arm920t specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mcpu=arm920t', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mtune=arm920t', '', d)}" AVAILTUNES += "arm920t" ARMPKGARCH_tune-arm920t = "arm920t"meta/conf/machine/include/tune-arm926ejs.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[arm926ejs] = "Enable arm926ejs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mcpu=arm926ej-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mtune=arm926ej-s', '', d)}" AVAILTUNES += "arm926ejs" ARMPKGARCH_tune-arm926ejs = "arm926ejs"meta/conf/machine/include/tune-arm9tdmi.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm9tdmi] = "Enable arm9tdmi specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mcpu=arm9tdmi', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mtune=arm9tdmi', '', d)}" AVAILTUNES += "arm9tdmi" ARMPKGARCH_tune-arm9tdmi = "arm9tdmi"meta/conf/machine/include/tune-cortexa15.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa15] = "Enable Cortex-A15 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mcpu=cortex-a15', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mtune=cortex-a15', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa15 cortexa15t cortexa15-neon cortexa15t-neon cortexa15-neon-vfpv4 cortexa15t-neon-vfpv4"meta/conf/machine/include/tune-cortexa17.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa17] = "Enable Cortex-A17 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mcpu=cortex-a17', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mtune=cortex-a17', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa17 cortexa17t cortexa17-neon cortexa17t-neon cortexa17-neon-vfpv4 cortexa17t-neon-vfpv4"meta/conf/machine/include/tune-cortexa5.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa5] = "Enable Cortex-A5 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mcpu=cortex-a5', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mtune=cortex-a5', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon"meta/conf/machine/include/tune-cortexa7.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa7] = "Enable Cortex-A7 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mcpu=cortex-a7', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mtune=cortex-a7', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa7 cortexa7t cortexa7-neon cortexa7t-neon cortexa7-neon-vfpv4 cortexa7t-neon-vfpv4"meta/conf/machine/include/tune-cortexa8.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa8] = "Enable Cortex-A8 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mcpu=cortex-a8', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mtune=cortex-a8', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa8 cortexa8t cortexa8-neon cortexa8t-neon"meta/conf/machine/include/tune-cortexa9.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa9] = "Enable Cortex-A9 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mcpu=cortex-a9', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mtune=cortex-a9', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa9 cortexa9t cortexa9-neon cortexa9t-neon"meta/conf/machine/include/tune-ep9312.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "ep9312" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[ep9312] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mcpu=ep9312', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mtune=ep9312', '', d)}" AVAILTUNES += "ep9312" ARMPKGARCH_tune-ep9312 = "ep9312"meta/conf/machine/include/tune-iwmmxt.inc +1
-1@@ -6,7 +6,7 @@ DEFAULTTUNE ?= "iwmmxt" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[iwmmxt] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mcpu=iwmmxt', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mtune=iwmmxt', '', d)}" AVAILTUNES += "iwmmxt" ARMPKGARCH_tune-iwmmxt = "iwmmxt"meta/conf/machine/include/tune-strongarm1100.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[strongarm] = "Enable Strongarm 1100 series processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mcpu=strongarm1100', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mtune=strongarm1100', '', d)}" AVAILTUNES += "strongarm" ARMPKGARCH_tune-strongarm = "strongarm"meta/conf/machine/include/tune-thunderx.inc +1
-1@@ -5,7 +5,7 @@ AVAILTUNES += "thunderx thunderx_be" TUNEVALID[thunderx] = "Enable instructions for Cavium ThunderX" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mcpu=thunderx ', '',d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mtune=thunderx ', '',d)}" ARMPKGARCH_tune-thunderx ?= "thunderx" ARMPKGARCH_tune-thunderx_be ?= "thunderx_be"meta/conf/machine/include/tune-xscale.inc +1
-2@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[xscale] = "Enable PXA255/PXA26x Xscale specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mcpu=xscale', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mtune=xscale', '', d)}" AVAILTUNES += "xscale" ARMPKGARCH_tune-xscale = "xscale" --2.17.1
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-coreSignature · 4 lines
_______________________________________________ Openembedded-core mailing list [email protected] http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Re: [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu
Quoted 74 lines · Martin Jansa
Quoted 60 lines · Khem Raj
Quoted 23 lines · Andre McCurdy
Quoted 11 lines · Khem Raj
Quoted 9 lines · Andre McCurdy
Quoted 3 lines · Khem Raj
-march option is already used to select the base architecture therefore using -mcpu which infact will reset march+mtune can cause conflicts,
I think we need to at least understand how and why these conflicts have started to occur with gcc 8. The tuning files themselves don't contain any conflicts so the conflict must be coming from somewhere else. Do we know where?
Quoted 10 lines
I explained it in previous emails as well, mcpu is a combination of march+mtune how it reduces to these values depends on mcpu value. e.g. setting mcpu=cortex-a7
would mean setting march=armv7ve and mtune to cortex-a7 internally along with using code generator to use instructions available for that cpu, thats why it errors out since it does not know which march to use.
when we override one of these values on cmdline which we do then this can cause the errors, these errors were happening before too see valgrind patch its that gcc8 is catching more cases.Quoted 3 lines
The -mcpu, -march and -mtune options are not new and gcc 6 and 7 catch the same conflicts. It doesn't make sense that gcc8 is just catching more issues.
It does make sense. the option parsing for these specific options on arm have been revamped after gcc7, see
Quoted 8 lines
The valgrind case is not a good example. The conflict there comes because we leak CFLAGS intended for the target into Makefiles which valgrind uses to build test apps which are intended to only run under valgrind (ie NOT directly on the target). The real fix there would be to prevent the target specific flags being passed to build for those few valgrind test apps.
it is manifesting similar conflicts
Quoted 9 lines
Quoted 8 lines
example is gcc-runtime/libstdc++ which deducts arch flags based on configure options
and we do not pass narrow mcpu option to it since we build SDKs which do not target
just one particular sub-family of cpu but rather a sub arch do not pass --with-cpu then it enforces some lowest common denominator. When we say -mcpu then we
are actually asking the code to be generated for that particular CPU.Quoted 4 lines
If we are trying to build something which is reusable across multiple machines with the same architecture then it's a bug to be passing machine specific CFLAGS. Making the machine specific CFLAGS more generic is not the right solution.
Quoted 5 lines
being reusable is a side-effect and a good one. Real problem is we are not matching to what we say in package arches, Probably you are confusing tunes to be meant for static code generation for a given CPU. I am interested to hear more ideas to what would be right solution if this is not it.
I don't agree with this part, you're basically reverting the change from:
http://git.openembedded.org/openembedded-core/commit/?id=f7bb2d4cf18ca8d2a90b4b3b5c6c48dad106ca28
but since:
http://git.openembedded.org/openembedded-core/commit/?id=cffda9a821a3b83a8529d643c567859e091c6846
we already have different ARMPKGARCH for eachDEFAULT_TUNEwith different -mcpu option.
Quoted 8 lines
If you want to target more generic configuration than you should use more generic
DEFAULT_TUNEand even the default configuration will select something generic, e.g.:
http://git.openembedded.org/openembedded-core/tree/meta/conf/machine/include/tune-cortexa8.inc
sets
DEFAULTTUNE ?= "armv7athf-neon"
so no -mcpu options unless you explicitly ask for it by selecting more specificDEFAULT_TUNEin DISTRO config.
Indeed thats correct. Although it does not solve the problem at hand. fundamental
contention is what tunes semantically should indicate. Currently, it is meaning tune to generate code for that cpu subset, I am proposing to revert to tuning the behaviour of
program for specific CPU while generating code for march.
I don't have data to prove one way is more optimized than other, but both approached have
distribution merits, from past experience to specific tunes have sometimes pessimized real world
workloads and limited single SDK's use to narrow set of machines.
Its clear we need to ignore -mcpu for gcc runtime since we want it to be generic enough.
however I think we need to systematically remove setting any -mcpu for it instead of just
addressing armv7ve case.
Quoted 309 lines
Quoted 16 lines
Quoted 8 lines
Anyway, I suspect the real issue here is that when we build gcc to run on the target we currently configure using "--with-arch=armv7-a" for both armv7a and armv7ve. It was done that way deliberately to try to avoid rebuilds when switching between armv7a and armv7ve machines, although thinking about that now I'm not sure it makes so much sense. Does your original problem go away if you simply change:
Quoted 7 lines
EXTRA_OECONF_append_armv7ve = " --with-arch=armv7-a"to
EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve"in gcc-target.inc ?
Quoted 7 lines
No, this is not the problem I am talking about gcc-runtime which is configured during cross build but built for target later on.
talking about this case, changing --with-arch will make on device gcc complain about mismatches with default runtime since it is meant to use same runtime that will be built above. Using armv7-a here is a conscious choice.
I've already tried this as well, because that's what I was doing long time ago with the tune files:
http://git.openembedded.org/openembedded-core/commit/meta/conf/machine/include?id=35392025f3236f5e5393f9cf0857732da9a2e503but it's true that gcc-runtime is a bit more complicated by that, it doesn't use gcc-target.inc (gcc-target.inc is only used by gcc itself), so I've tried to move the --with-arch options a bit lower to gcc-configure-common.inc where we already set the archs for MIPS, but it didn't work well, at least as done in:
https://pastebin.com/3Cc5MYBaand then I've moved to something else and never finished this one.
Quoted 259 lines
Quoted 259 lines
Quoted 10 lines
Quoted 8 lines
This patch is potentially going to hide bugs in cases where components try to provide their own CPU specific flags rather than fully respecting the flags set by OE. Generally we want to make those cases fail so that we can debug and fix them.
No it wont. they can still do that. Last option wins so nothing changes there.
The thing that changes is that after your patch, gcc will no longer report a conflict!
Quoted 245 lines
and in many cases it should be able to override specific flags for specific packages
OE is a fall back for general default case.A good change this does is that code is targeted for bigger base arch e.g. armv7-a
and not for cortex-a8 but its tuned to run better on cortex-a8 when we use -mtune
it will still run on other armv7-a based CPUs, so right now when we say our package
arch is arm7ve but then use -mcpu=cortex-a7 we are actually doing wrong thing this should have meant package arch to be cortex-a7 as well. Now this will be more
inline as well.Quoted 229 lines
Quoted 229 lines
therefore setting just mtune here will ensure
that the code is optimized for the given tune as is the intention of mcpu, however with one advantage, it will be targetting broader march value so can be useful for pre-compiled objects where they can be run on wider subsetThis also fixed occasional conflicts like
cc1: error: switch -mcpu=cortex-a7 conflicts with -march=armv7-a switch [-Werror]
which is possible combination in some case for packages in OE
Signed-off-by Khem Raj <[email protected]>--- meta/conf/machine/include/tune-arm1136jf-s.inc | 2 +- meta/conf/machine/include/tune-arm920t.inc | 2 +- meta/conf/machine/include/tune-arm926ejs.inc | 2 +- meta/conf/machine/include/tune-arm9tdmi.inc | 2 +- meta/conf/machine/include/tune-cortexa15.inc | 2 +- meta/conf/machine/include/tune-cortexa17.inc | 2 +- meta/conf/machine/include/tune-cortexa5.inc | 2 +- meta/conf/machine/include/tune-cortexa7.inc | 2 +- meta/conf/machine/include/tune-cortexa8.inc | 2 +- meta/conf/machine/include/tune-cortexa9.inc | 2 +- meta/conf/machine/include/tune-ep9312.inc | 2 +- meta/conf/machine/include/tune-iwmmxt.inc | 2 +- meta/conf/machine/include/tune-strongarm1100.inc | 2 +- meta/conf/machine/include/tune-thunderx.inc | 2 +- meta/conf/machine/include/tune-xscale.inc | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-)meta/conf/machine/include/tune-arm1136jf-s.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv6hf" require conf/machine/include/arm/arch-armv6.inc TUNEVALID[arm1136jfs] = "Enable arm1136jfs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mcpu=arm1136jf-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm1136jfs', ' -mtune=arm1136jf-s', '', d)}" AVAILTUNES += "arm1136jfs" ARMPKGARCH_tune-arm1136jfs = "arm1136jfs"meta/conf/machine/include/tune-arm920t.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm920t] = "Enable arm920t specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mcpu=arm920t', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm920t', ' -mtune=arm920t', '', d)}" AVAILTUNES += "arm920t" ARMPKGARCH_tune-arm920t = "arm920t"meta/conf/machine/include/tune-arm926ejs.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[arm926ejs] = "Enable arm926ejs specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mcpu=arm926ej-s', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm926ejs', ' -mtune=arm926ej-s', '', d)}" AVAILTUNES += "arm926ejs" ARMPKGARCH_tune-arm926ejs = "arm926ejs"meta/conf/machine/include/tune-arm9tdmi.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4t" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[arm9tdmi] = "Enable arm9tdmi specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mcpu=arm9tdmi', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'arm9tdmi', ' -mtune=arm9tdmi', '', d)}" AVAILTUNES += "arm9tdmi" ARMPKGARCH_tune-arm9tdmi = "arm9tdmi"meta/conf/machine/include/tune-cortexa15.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa15] = "Enable Cortex-A15 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mcpu=cortex-a15', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa15', ' -mtune=cortex-a15', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa15 cortexa15t cortexa15-neon cortexa15t-neon cortexa15-neon-vfpv4 cortexa15t-neon-vfpv4"meta/conf/machine/include/tune-cortexa17.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa17] = "Enable Cortex-A17 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mcpu=cortex-a17', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa17', ' -mtune=cortex-a17', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa17 cortexa17t cortexa17-neon cortexa17t-neon cortexa17-neon-vfpv4 cortexa17t-neon-vfpv4"meta/conf/machine/include/tune-cortexa5.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa5] = "Enable Cortex-A5 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mcpu=cortex-a5', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa5', ' -mtune=cortex-a5', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa5 cortexa5t cortexa5-neon cortexa5t-neon"meta/conf/machine/include/tune-cortexa7.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7vethf-neon" require conf/machine/include/arm/arch-armv7ve.inc TUNEVALID[cortexa7] = "Enable Cortex-A7 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mcpu=cortex-a7', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa7', ' -mtune=cortex-a7', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa7 cortexa7t cortexa7-neon cortexa7t-neon cortexa7-neon-vfpv4 cortexa7t-neon-vfpv4"meta/conf/machine/include/tune-cortexa8.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa8] = "Enable Cortex-A8 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mcpu=cortex-a8', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa8', ' -mtune=cortex-a8', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa8 cortexa8t cortexa8-neon cortexa8t-neon"meta/conf/machine/include/tune-cortexa9.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv7athf-neon" require conf/machine/include/arm/arch-armv7a.inc TUNEVALID[cortexa9] = "Enable Cortex-A9 specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mcpu=cortex-a9', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'cortexa9', ' -mtune=cortex-a9', '', d)}" # Little Endian base configs AVAILTUNES += "cortexa9 cortexa9t cortexa9-neon cortexa9t-neon"meta/conf/machine/include/tune-ep9312.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "ep9312" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[ep9312] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mcpu=ep9312', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'ep9312', ' -march=ep9312 -mtune=ep9312', '', d)}" AVAILTUNES += "ep9312" ARMPKGARCH_tune-ep9312 = "ep9312"meta/conf/machine/include/tune-iwmmxt.inc +1
-1@@ -6,7 +6,7 @@ DEFAULTTUNE ?= "iwmmxt" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[iwmmxt] = "Enable Intel PXA27x specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mcpu=iwmmxt', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'iwmmxt', ' -march=iwmmxt -mtune=iwmmxt', '', d)}" AVAILTUNES += "iwmmxt" ARMPKGARCH_tune-iwmmxt = "iwmmxt"meta/conf/machine/include/tune-strongarm1100.inc +1
-1@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv4" require conf/machine/include/arm/arch-armv4.inc TUNEVALID[strongarm] = "Enable Strongarm 1100 series processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mcpu=strongarm1100', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'strongarm', ' -mtune=strongarm1100', '', d)}" AVAILTUNES += "strongarm" ARMPKGARCH_tune-strongarm = "strongarm"meta/conf/machine/include/tune-thunderx.inc +1
-1@@ -5,7 +5,7 @@ AVAILTUNES += "thunderx thunderx_be" TUNEVALID[thunderx] = "Enable instructions for Cavium ThunderX" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mcpu=thunderx ', '',d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thunderx', ' -mtune=thunderx ', '',d)}" ARMPKGARCH_tune-thunderx ?= "thunderx" ARMPKGARCH_tune-thunderx_be ?= "thunderx_be"meta/conf/machine/include/tune-xscale.inc +1
-2@@ -3,7 +3,7 @@ DEFAULTTUNE ?= "armv5te" require conf/machine/include/arm/arch-armv5-dsp.inc TUNEVALID[xscale] = "Enable PXA255/PXA26x Xscale specific processor optimizations" -TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mcpu=xscale', '', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'xscale', ' -mtune=xscale', '', d)}" AVAILTUNES += "xscale" ARMPKGARCH_tune-xscale = "xscale" --2.17.1
Quoted 10 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
Quoted 5 lines
--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core--
Martin 'JaMa' Jansa jabber: [email protected]
Re: [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu
In reply to Khem RajQuoted 11 lines · Khem Raj
Quoted 5 lines · Andre McCurdy
On Wed, Jun 6, 2018 at 3:43 PM, Khem Raj <[email protected]> wrote:
The -mcpu, -march and -mtune options are not new and gcc 6 and 7 catch the same conflicts. It doesn't make sense that gcc8 is just catching more issues.
It does make sense. the option parsing for these specific options on arm have been revamped after gcc7, see
Thanks. These commits seem to be related to handling of options like "-mcpu=cortexa9+nosimd". Was that the error you saw in testing?
If you can provide the command line that caused the error then it should be quick to establish whether it's gcc8 being more picky.
Or perhaps there's always been a warning and -Werror has been added to a gcc8 Makefile where it wasn't before?
Quoted 8 lines
Quoted 4 lines
If we are trying to build something which is reusable across multiple machines with the same architecture then it's a bug to be passing machine specific CFLAGS. Making the machine specific CFLAGS more generic is not the right solution.
being reusable is a side-effect and a good one. Real problem is we are not matching to what we say in package arches, Probably you are confusing tunes to be meant for static code generation for a given CPU.
Sorry, I don't really follow what you mean?
Quoted 2 lines
I am interested to
hear more ideas to what would be right solution if this is not it.
I'd like to understand what the problem is first before trying to propose any solutions.
ie what specifically has changed with gcc8 to cause the error which wasn't seen before?
Quoted 9 lines
Quoted 9 lines
Anyway, I suspect the real issue here is that when we build gcc to run on the target we currently configure using "--with-arch=armv7-a" for both armv7a and armv7ve. It was done that way deliberately to try to avoid rebuilds when switching between armv7a and armv7ve machines, although thinking about that now I'm not sure it makes so much sense. Does your original problem go away if you simply change:
EXTRA_OECONF_append_armv7ve = " --with-arch=armv7-a"
Quoted 8 lines
Quoted 5 lines
to
EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve"in gcc-target.inc ?
No, this is not the problem I am talking about gcc-runtime which is configured during cross build but built for target later on.
OK, good to rule that out. It's nothing to do with gcc8 and I've sent a separate patch to fix it.
Re: [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu
Quoted 33 lines · Andre McCurdy
Quoted 11 lines · Khem Raj
Quoted 5 lines · Andre McCurdy
On Wed, Jun 6, 2018 at 3:43 PM, Khem Raj <[email protected]> wrote:
The -mcpu, -march and -mtune options are not new and gcc 6 and 7 catch the same conflicts. It doesn't make sense that gcc8 is just catching more issues.
It does make sense. the option parsing for these specific options on arm have been revamped after gcc7, see
Thanks. These commits seem to be related to handling of options like "-mcpu=cortexa9+nosimd". Was that the error you saw in testing?
If you can provide the command line that caused the error then it should be quick to establish whether it's gcc8 being more picky.
Or perhaps there's always been a warning and -Werror has been added to a gcc8
Makefilewhere it wasn't before?Quoted 8 lines
Quoted 4 lines
If we are trying to build something which is reusable across multiple machines with the same architecture then it's a bug to be passing machine specific CFLAGS. Making the machine specific CFLAGS more generic is not the right solution.
being reusable is a side-effect and a good one. Real problem is we are not matching to what we say in package arches, Probably you are confusing tunes to be meant for static code generation for a given CPU.
Sorry, I don't really follow what you mean?
Quoted 8 lines
Quoted 2 lines
I am interested to
hear more ideas to what would be right solution if this is not it.I'd like to understand what the problem is first before trying to propose any solutions.
ie what specifically has changed with gcc8 to cause the error which wasn't seen before?
I would suggest take this gcc8 patch series and revert this one then build gcc-runtime for rpi3
Quoted 21 lines
Quoted 10 lines
Quoted 10 lines
Anyway, I suspect the real issue here is that when we build gcc to run on the target we currently configure using "--with-arch=armv7-a" for both armv7a and armv7ve. It was done that way deliberately to try to avoid rebuilds when switching between armv7a and armv7ve machines, although thinking about that now I'm not sure it makes so much sense. Does your original problem go away if you simply change:
EXTRA_OECONF_append_armv7ve = " --with-arch=armv7-a"Quoted 8 lines
Quoted 5 lines
to
EXTRA_OECONF_append_armv7ve = " --with-arch=armv7ve"in gcc-target.inc ?
No, this is not the problem I am talking about gcc-runtime which is configured during cross build but built for target later on.
OK, good to rule that out. It's nothing to do with gcc8 and I've sent a separate patch to fix it.
Re: [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu
Quoted 37 lines · Khem Raj
Quoted 36 lines · Andre McCurdy
Quoted 11 lines · Khem Raj
Quoted 5 lines · Andre McCurdy
On Wed, Jun 6, 2018 at 3:43 PM, Khem Raj <[email protected]> wrote:
The -mcpu, -march and -mtune options are not new and gcc 6 and 7 catch the same conflicts. It doesn't make sense that gcc8 is just catching more issues.
It does make sense. the option parsing for these specific options on arm have been revamped after gcc7, see
Thanks. These commits seem to be related to handling of options like "-mcpu=cortexa9+nosimd". Was that the error you saw in testing?
If you can provide the command line that caused the error then it should be quick to establish whether it's gcc8 being more picky.
Or perhaps there's always been a warning and -Werror has been added to a gcc8
Makefilewhere it wasn't before?Quoted 8 lines
Quoted 4 lines
If we are trying to build something which is reusable across multiple machines with the same architecture then it's a bug to be passing machine specific CFLAGS. Making the machine specific CFLAGS more generic is not the right solution.
being reusable is a side-effect and a good one. Real problem is we are not matching to what we say in package arches, Probably you are confusing tunes to be meant for static code generation for a given CPU.
Sorry, I don't really follow what you mean?
Quoted 2 lines
I am interested to
hear more ideas to what would be right solution if this is not it.
Quoted 8 lines
Quoted 5 lines
I'd like to understand what the problem is first before trying to propose any solutions.
ie what specifically has changed with gcc8 to cause the error which wasn't seen before?
I would suggest take this gcc8 patch series and revert this one then build gcc-runtime for rpi3
That's the answer to "how do I reproduce the issue" not to "what is the issue".
Anyway, I can reproduce the issue. The root cause is that gcc-runtime libatomic tries to support runtime selection between different implementations of a few low level functions by making use of the gcc "ifunc" function attribute:
ie libatomic can contain versions of functions specific to armv6 or armv7 with selection between them being made at runtime via ifunc.
In order to build the armv7 versions of these few functions, the libatomic Makefiles selectively add -march=armv7-a to CFLAGS. This isn't new - it goes back to at least 2012 in gcc git history.
https://gcc.gnu.org/ml/gcc/2014-01/msg00141.html
What _is_ new is that for ARM, support for ifunc function attributes was not enabled prior to gcc8. ie when building with gcc7, the libatomic configure script determines that the toolchain doesn't support ifunc and libatomic therefore builds without support for runtime function selection... since it never needs to compile armv7 specific versions of the runtime selectable functions the -march -vs- -mcpu conflict never happens.
https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00521.html
(Note that ifunc support for ARM in gcc8 is still only enabled for glibc, so this issue doesn't show up at all with musl).
Various solutions are possible:
1) Let libatomic continue to build with ifunc support enabled, but avoid -march -vs- mcpu conflicts by dropping -mcpu from OE's CFLAGS in the gcc-runtime recipe.
2) Let libatomic continue to build with ifunc support enabled, but avoid -march -vs- -mcpu conflicts by updating the libatomic Makefiles so that they always safely over-ride any combination of -march, -mcpu, etc passed in from the build environment. ie patch the libatomic Makefiles to replace:
IFUNC_OPTIONS = -march=armv7-a+fp -DHAVE_KERNEL64
with:
IFUNC_OPTIONS = -march=armv7-a+fp -mcpu=generic-armv7-a -DHAVE_KERNEL64
(Regardless of the solution we pick for OE, I think that fix should be submitted upstream to libatomic. There's no need for libatomic to risk build errors by not defining -mcpu in cases where it specifically wants to target armv7a).
3) Prevent libatomic from building with ifunc support enabled for ARM by forcing "libat_cv_have_ifunc=no" from the gcc-runtime recipe.
Votes?
Re: [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu
Quoted 41 lines · Andre McCurdy
Quoted 40 lines · Khem Raj
Quoted 39 lines · Andre McCurdy
Quoted 11 lines · Khem Raj
Quoted 5 lines · Andre McCurdy
On Wed, Jun 6, 2018 at 3:43 PM, Khem Raj <[email protected]> wrote:
The -mcpu, -march and -mtune options are not new and gcc 6 and 7 catch the same conflicts. It doesn't make sense that gcc8 is just catching more issues.
It does make sense. the option parsing for these specific options on arm have been revamped after gcc7, see
Thanks. These commits seem to be related to handling of options like "-mcpu=cortexa9+nosimd". Was that the error you saw in testing?
If you can provide the command line that caused the error then it should be quick to establish whether it's gcc8 being more picky.
Or perhaps there's always been a warning and -Werror has been added to a gcc8
Makefilewhere it wasn't before?Quoted 8 lines
Quoted 4 lines
If we are trying to build something which is reusable across multiple machines with the same architecture then it's a bug to be passing machine specific CFLAGS. Making the machine specific CFLAGS more generic is not the right solution.
being reusable is a side-effect and a good one. Real problem is we are not matching to what we say in package arches, Probably you are confusing tunes to be meant for static code generation for a given CPU.
Sorry, I don't really follow what you mean?
Quoted 2 lines
I am interested to
hear more ideas to what would be right solution if this is not it.I'd like to understand what the problem is first before trying to propose any solutions.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
ie what specifically has changed with gcc8 to cause the error which wasn't seen before?
I would suggest take this gcc8 patch series and revert this one then build gcc-runtime for rpi3
That's the answer to "how do I reproduce the issue" not to "what is the issue".
another way to nudge for some help :) Thanks for digging further details.
Quoted 26 lines
Anyway, I can reproduce the issue. The root cause is that gcc-runtime libatomic tries to support runtime selection between different implementations of a few low level functions by making use of the gcc "ifunc" function attribute:
ie libatomic can contain versions of functions specific to armv6 or armv7 with selection between them being made at runtime via ifunc.
In order to build the armv7 versions of these few functions, the libatomic Makefiles selectively add -march=armv7-a to CFLAGS. This isn't new - it goes back to at least 2012 in gcc git history.
https://gcc.gnu.org/ml/gcc/2014-01/msg00141.htmlWhat _is_ new is that for ARM, support for ifunc function attributes was not enabled prior to gcc8. ie when building with gcc7, the libatomic configure script determines that the toolchain doesn't support ifunc and libatomic therefore builds without support for runtime function selection... since it never needs to compile armv7 specific versions of the runtime selectable functions the -march -vs- -mcpu conflict never happens.
https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00521.html
Quoted 8 lines
(Note that ifunc support for ARM in gcc8 is still only enabled for glibc, so this issue doesn't show up at all with musl).
Various solutions are possible:
1) Let libatomic continue to build with ifunc support enabled, but avoid -march -vs- mcpu conflicts by dropping -mcpu from OE's CFLAGS in the gcc-runtime recipe.
I don't think this is required. Even though it might be useful for other reasons.
Quoted 9 lines
2) Let libatomic continue to build with ifunc support enabled, but avoid -march -vs- -mcpu conflicts by updating the libatomic Makefiles so that they always safely over-ride any combination of -march, -mcpu, etc passed in from the build environment. ie patch the libatomic Makefiles to replace:
IFUNC_OPTIONS= -march=armv7-a+fp -DHAVE_KERNEL64
Quoted 8 lines
with:
IFUNC_OPTIONS= -march=armv7-a+fp -mcpu=generic-armv7-a -DHAVE_KERNEL64(Regardless of the solution we pick for OE, I think that fix should be submitted upstream to libatomic. There's no need for libatomic to risk build errors by not defining -mcpu in cases where it specifically wants to target armv7a).
I think this is better. Now my memory serves me right I had a local patch few months ago which I discarded where I was using -march with armv7ve but it was limiting for other reasons. I think it would be better to drop -march completely.
IFUNC_OPTIONS = -mcpu=generic-armv7-a -DHAVE_KERNEL64
I will test it out locally and see if that works.
Quoted 4 lines
3) Prevent libatomic from building with ifunc support enabled for ARM by forcing "libat_cv_have_ifunc=no" from the gcc-runtime recipe.
This would be ok too for OE ifuncs dont serve much since we target a specific CPU anyway.
Quoted 2 lines
Votes?
approach 2 is what we should use.
Re: [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu
Quoted 113 lines · Khem Raj
Quoted 48 lines · Andre McCurdy
Quoted 47 lines · Khem Raj
Quoted 44 lines · Andre McCurdy
Quoted 7 lines · Khem Raj
Quoted 5 lines · Andre McCurdy
On Wed, Jun 6, 2018 at 3:43 PM, Khem Raj <[email protected]> wrote:
The -mcpu, -march and -mtune options are not new and gcc 6 and 7 catch the same conflicts. It doesn't make sense that gcc8 is just catching more issues.
Quoted 5 lines
It does make sense. the option parsing for these specific options on arm
have been revamped after gcc7, seeThanks. These commits seem to be related to handling of options like "-mcpu=cortexa9+nosimd". Was that the error you saw in testing?
If you can provide the command line that caused the error then it should be quick to establish whether it's gcc8 being more picky.
Or perhaps there's always been a warning and -Werror has been added to a gcc8
Makefilewhere it wasn't before?Quoted 10 lines
Quoted 4 lines
If we are trying to build something which is reusable across multiple machines with the same architecture then it's a bug to be passing machine specific CFLAGS. Making the machine specific CFLAGS more generic is not the right solution.
being reusable is a side-effect and a good one. Real problem is we are not
matching to what we say in package arches, Probably you are confusing tunes
to be meant for static code generation for a given CPU.Sorry, I don't really follow what you mean?
Quoted 2 lines
I am interested to
hear more ideas to what would be right solution if this is not it.I'd like to understand what the problem is first before trying to propose any solutions.
ie what specifically has changed with gcc8 to cause the error which wasn't seen before?
Quoted 6 lines
Quoted 3 lines
I would suggest take this gcc8 patch series and revert this one then build
gcc-runtime for rpi3That's the answer to "how do I reproduce the issue" not to "what is the issue".
another way to nudge for some help :) Thanks for digging further details.
Quoted 26 lines
Anyway, I can reproduce the issue. The root cause is that gcc-runtime libatomic tries to support runtime selection between different implementations of a few low level functions by making use of the gcc "ifunc" function attribute:
ie libatomic can contain versions of functions specific to armv6 or armv7 with selection between them being made at runtime via ifunc.
In order to build the armv7 versions of these few functions, the libatomic Makefiles selectively add -march=armv7-a to CFLAGS. This isn't new - it goes back to at least 2012 in gcc git history.
https://gcc.gnu.org/ml/gcc/2014-01/msg00141.htmlWhat _is_ new is that for ARM, support for ifunc function attributes was not enabled prior to gcc8. ie when building with gcc7, the libatomic configure script determines that the toolchain doesn't support ifunc and libatomic therefore builds without support for runtime function selection... since it never needs to compile armv7 specific versions of the runtime selectable functions the -march -vs- -mcpu conflict never happens.
https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00521.htmlQuoted 8 lines
(Note that ifunc support for ARM in gcc8 is still only enabled for glibc, so this issue doesn't show up at all with musl).
Various solutions are possible:
1) Let libatomic continue to build with ifunc support enabled, but avoid -march -vs- mcpu conflicts by dropping -mcpu from OE's CFLAGS in the gcc-runtime recipe.
I don't think this is required. Even though it might be useful for other reasons.
Quoted 8 lines
2) Let libatomic continue to build with ifunc support enabled, but avoid -march -vs- -mcpu conflicts by updating the libatomic Makefiles so that they always safely over-ride any combination of -march, -mcpu, etc passed in from the build environment. ie patch the libatomic Makefiles to replace:
IFUNC_OPTIONS= -march=armv7-a+fp -DHAVE_KERNEL64Quoted 8 lines
with:
IFUNC_OPTIONS= -march=armv7-a+fp -mcpu=generic-armv7-a -DHAVE_KERNEL64(Regardless of the solution we pick for OE, I think that fix should be submitted upstream to libatomic. There's no need for libatomic to risk build errors by not defining -mcpu in cases where it specifically wants to target armv7a).
Quoted 8 lines
I think this is better. Now my memory serves me right I had a local patch few months ago which I discarded where I was using -march with armv7ve but it was limiting for other reasons. I think it would be better to drop -march completely.
IFUNC_OPTIONS= -mcpu=generic-armv7-a -DHAVE_KERNEL64I will test it out locally and see if that works.
If you only set -mcpu then you're likely to run into issues when -march is set externally to something incompatible.
Quoted 5 lines
Quoted 2 lines
3) Prevent libatomic from building with ifunc support enabled for ARM by forcing "libat_cv_have_ifunc=no" from the gcc-runtime recipe.
This would be ok too for OE ifuncs dont serve much since we target a specific CPU anyway.
Right. This is the one I'd vote for. For ARM there's little point including runtime alternatives when we always compile everything in rootfs for one particular target architecture level anyway.
Re: [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu
Quoted 119 lines · Andre McCurdy
Quoted 118 lines · Khem Raj
Quoted 48 lines · Andre McCurdy
Quoted 47 lines · Khem Raj
Quoted 44 lines · Andre McCurdy
Quoted 7 lines · Khem Raj
Quoted 5 lines · Andre McCurdy
On Wed, Jun 6, 2018 at 3:43 PM, Khem Raj <[email protected]> wrote:
The -mcpu, -march and -mtune options are not new and gcc 6 and 7 catch the same conflicts. It doesn't make sense that gcc8 is just catching more issues.
Quoted 5 lines
It does make sense. the option parsing for these specific options on arm
have been revamped after gcc7, seeThanks. These commits seem to be related to handling of options like "-mcpu=cortexa9+nosimd". Was that the error you saw in testing?
If you can provide the command line that caused the error then it should be quick to establish whether it's gcc8 being more picky.
Or perhaps there's always been a warning and -Werror has been added to a gcc8
Makefilewhere it wasn't before?Quoted 10 lines
Quoted 4 lines
If we are trying to build something which is reusable across multiple machines with the same architecture then it's a bug to be passing machine specific CFLAGS. Making the machine specific CFLAGS more generic is not the right solution.
being reusable is a side-effect and a good one. Real problem is we are not
matching to what we say in package arches, Probably you are confusing tunes
to be meant for static code generation for a given CPU.Sorry, I don't really follow what you mean?
Quoted 2 lines
I am interested to
hear more ideas to what would be right solution if this is not it.I'd like to understand what the problem is first before trying to propose any solutions.
ie what specifically has changed with gcc8 to cause the error which wasn't seen before?
Quoted 6 lines
Quoted 3 lines
I would suggest take this gcc8 patch series and revert this one then build
gcc-runtime for rpi3That's the answer to "how do I reproduce the issue" not to "what is the issue".
another way to nudge for some help :) Thanks for digging further details.
Quoted 26 lines
Anyway, I can reproduce the issue. The root cause is that gcc-runtime libatomic tries to support runtime selection between different implementations of a few low level functions by making use of the gcc "ifunc" function attribute:
ie libatomic can contain versions of functions specific to armv6 or armv7 with selection between them being made at runtime via ifunc.
In order to build the armv7 versions of these few functions, the libatomic Makefiles selectively add -march=armv7-a to CFLAGS. This isn't new - it goes back to at least 2012 in gcc git history.
https://gcc.gnu.org/ml/gcc/2014-01/msg00141.htmlWhat _is_ new is that for ARM, support for ifunc function attributes was not enabled prior to gcc8. ie when building with gcc7, the libatomic configure script determines that the toolchain doesn't support ifunc and libatomic therefore builds without support for runtime function selection... since it never needs to compile armv7 specific versions of the runtime selectable functions the -march -vs- -mcpu conflict never happens.
https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00521.htmlQuoted 8 lines
(Note that ifunc support for ARM in gcc8 is still only enabled for glibc, so this issue doesn't show up at all with musl).
Various solutions are possible:
1) Let libatomic continue to build with ifunc support enabled, but avoid -march -vs- mcpu conflicts by dropping -mcpu from OE's CFLAGS in the gcc-runtime recipe.
I don't think this is required. Even though it might be useful for other reasons.
Quoted 8 lines
2) Let libatomic continue to build with ifunc support enabled, but avoid -march -vs- -mcpu conflicts by updating the libatomic Makefiles so that they always safely over-ride any combination of -march, -mcpu, etc passed in from the build environment. ie patch the libatomic Makefiles to replace:
IFUNC_OPTIONS= -march=armv7-a+fp -DHAVE_KERNEL64Quoted 8 lines
with:
IFUNC_OPTIONS= -march=armv7-a+fp -mcpu=generic-armv7-a -DHAVE_KERNEL64(Regardless of the solution we pick for OE, I think that fix should be submitted upstream to libatomic. There's no need for libatomic to risk build errors by not defining -mcpu in cases where it specifically wants to target armv7a).
I think this is better. Now my memory serves me right I had a local patch few months ago which I discarded where I was using -march with armv7ve but it was limiting for other reasons. I think it would be better to drop -march completely.
Quoted 6 lines
Quoted 3 lines
IFUNC_OPTIONS= -mcpu=generic-armv7-a -DHAVE_KERNEL64I will test it out locally and see if that works.
If you only set -mcpu then you're likely to run into issues when -march is set externally to something incompatible.
yes that is right.
Quoted 11 lines
Quoted 6 lines
Quoted 3 lines
3) Prevent libatomic from building with ifunc support enabled for ARM by forcing "libat_cv_have_ifunc=no" from the gcc-runtime recipe.
This would be ok too for OE ifuncs dont serve much since we target a specific CPU anyway.
Right. This is the one I'd vote for. For ARM there's little point including runtime alternatives when we always compile everything in rootfs for one particular target architecture level anyway.
I think we can have both 2 and 3 where 2 is more upstreamworthy and 3 we can keep for OE
Re: [PATCH 01/12] tune/arm: Set -mtune instead of -mcpu
In reply to Andre McCurdyQuoted 119 lines · Andre McCurdy
Quoted 118 lines · Khem Raj
Quoted 48 lines · Andre McCurdy
Quoted 47 lines · Khem Raj
Quoted 44 lines · Andre McCurdy
Quoted 7 lines · Khem Raj
Quoted 5 lines · Andre McCurdy
On Wed, Jun 6, 2018 at 3:43 PM, Khem Raj <[email protected]> wrote:
The -mcpu, -march and -mtune options are not new and gcc 6 and 7 catch the same conflicts. It doesn't make sense that gcc8 is just catching more issues.
Quoted 5 lines
It does make sense. the option parsing for these specific options on arm
have been revamped after gcc7, seeThanks. These commits seem to be related to handling of options like "-mcpu=cortexa9+nosimd". Was that the error you saw in testing?
If you can provide the command line that caused the error then it should be quick to establish whether it's gcc8 being more picky.
Or perhaps there's always been a warning and -Werror has been added to a gcc8
Makefilewhere it wasn't before?Quoted 10 lines
Quoted 4 lines
If we are trying to build something which is reusable across multiple machines with the same architecture then it's a bug to be passing machine specific CFLAGS. Making the machine specific CFLAGS more generic is not the right solution.
being reusable is a side-effect and a good one. Real problem is we are not
matching to what we say in package arches, Probably you are confusing tunes
to be meant for static code generation for a given CPU.Sorry, I don't really follow what you mean?
Quoted 2 lines
I am interested to
hear more ideas to what would be right solution if this is not it.I'd like to understand what the problem is first before trying to propose any solutions.
ie what specifically has changed with gcc8 to cause the error which wasn't seen before?
Quoted 6 lines
Quoted 3 lines
I would suggest take this gcc8 patch series and revert this one then build
gcc-runtime for rpi3That's the answer to "how do I reproduce the issue" not to "what is the issue".
another way to nudge for some help :) Thanks for digging further details.
Quoted 26 lines
Anyway, I can reproduce the issue. The root cause is that gcc-runtime libatomic tries to support runtime selection between different implementations of a few low level functions by making use of the gcc "ifunc" function attribute:
ie libatomic can contain versions of functions specific to armv6 or armv7 with selection between them being made at runtime via ifunc.
In order to build the armv7 versions of these few functions, the libatomic Makefiles selectively add -march=armv7-a to CFLAGS. This isn't new - it goes back to at least 2012 in gcc git history.
https://gcc.gnu.org/ml/gcc/2014-01/msg00141.htmlWhat _is_ new is that for ARM, support for ifunc function attributes was not enabled prior to gcc8. ie when building with gcc7, the libatomic configure script determines that the toolchain doesn't support ifunc and libatomic therefore builds without support for runtime function selection... since it never needs to compile armv7 specific versions of the runtime selectable functions the -march -vs- -mcpu conflict never happens.
https://gcc.gnu.org/ml/gcc-patches/2017-10/msg00521.htmlQuoted 8 lines
(Note that ifunc support for ARM in gcc8 is still only enabled for glibc, so this issue doesn't show up at all with musl).
Various solutions are possible:
1) Let libatomic continue to build with ifunc support enabled, but avoid -march -vs- mcpu conflicts by dropping -mcpu from OE's CFLAGS in the gcc-runtime recipe.
I don't think this is required. Even though it might be useful for other reasons.
Quoted 8 lines
2) Let libatomic continue to build with ifunc support enabled, but avoid -march -vs- -mcpu conflicts by updating the libatomic Makefiles so that they always safely over-ride any combination of -march, -mcpu, etc passed in from the build environment. ie patch the libatomic Makefiles to replace:
IFUNC_OPTIONS= -march=armv7-a+fp -DHAVE_KERNEL64Quoted 8 lines
with:
IFUNC_OPTIONS= -march=armv7-a+fp -mcpu=generic-armv7-a -DHAVE_KERNEL64(Regardless of the solution we pick for OE, I think that fix should be submitted upstream to libatomic. There's no need for libatomic to risk build errors by not defining -mcpu in cases where it specifically wants to target armv7a).
I think this is better. Now my memory serves me right I had a local patch few months ago which I discarded where I was using -march with armv7ve but it was limiting for other reasons. I think it would be better to drop -march completely.
Quoted 6 lines
Quoted 3 lines
IFUNC_OPTIONS= -mcpu=generic-armv7-a -DHAVE_KERNEL64I will test it out locally and see if that works.
If you only set -mcpu then you're likely to run into issues when -march is set externally to something incompatible.
this actually is not a normal append but it actually build for each of options so adding -mcpu here wont work for the issue at hand. It will mean this is an additional build
Quoted 11 lines
Quoted 6 lines
Quoted 3 lines
3) Prevent libatomic from building with ifunc support enabled for ARM by forcing "libat_cv_have_ifunc=no" from the gcc-runtime recipe.
This would be ok too for OE ifuncs dont serve much since we target a specific CPU anyway.
Right. This is the one I'd vote for. For ARM there's little point including runtime alternatives when we always compile everything in rootfs for one particular target architecture level anyway.
So this is our best bet. I have taken this into v3 of patchset.
PATCH v2 2/12 valgrind: Remove code to remove -mcpu option on arm
In reply to Khem RajThis partially reverts 6a053573dc4e6c7490e0e86fd043e425ea85f12c Since the tune files are now supplying mtune and not mcpu this is no longer required to be managed here
--- meta/recipes-devtools/valgrind/valgrind_3.13.0.bb | 11 ----------- 1 file changed, 11 deletions(-)
meta/recipes-devtools/valgrind/valgrind_3.13.0.bb +0 -11
@@ -64,7 +64,6 @@ EXTRA_OECONF += "${@['--enable-only32bit','--enable-only64bit'][d.getVar('SITEIN # valgrind checks host_cpu "armv7*)", so we need to over-ride the autotools.bbclass default --host option EXTRA_OECONF_append_arm = " --host=armv7${HOST_VENDOR}-${HOST_OS}" -TARGET_CC_ARCH_remove_arm = "${@get_mcpu(d)}" EXTRA_OEMAKE = "-w"
@@ -76,14 +75,6 @@ CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'" # which fixes build path issue in DWARF. SELECTED_OPTIMIZATION = "${DEBUG_FLAGS}" -def get_mcpu(d): - for arg in (d.getVar('TUNE_CCARGS') or '').split(): - if arg.startswith('-mcpu='): - return arg - else: - continue - return "" - do_configure_prepend () { rm -rf ${S}/config.h sed -i -e 's:$(abs_top_builddir):$(pkglibdir)/ptest:g' ${S}/none/tests/Makefile.am
@@ -95,8 +86,6 @@ do_install_append () { oe_multilib_header valgrind/config.h } -TUNE = "${@strip_mcpu(d)}" - RDEPENDS_${PN} += "perl" # valgrind needs debug information for ld.so at runtime in order to
Signature · 1 line
2.17.1
PATCH v2 3/12 tune-mips-74k.inc: add tune file for 74kc mips
In reply to Khem Raj--- .../machine/include/mips/tune-mips-74k.inc | 37 +++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 meta/conf/machine/include/mips/tune-mips-74k.inc
meta/conf/machine/include/mips/tune-mips-74k.inc new file +37 -0
@@ -0,0 +1,37 @@ +DEFAULTTUNE ?= "mips32r2-74kc" + +MIPSPKGSFX_MIPS16E ??= "" + +require conf/machine/include/tune-mips32r2.inc +require conf/machine/include/mips/feature-mips-mips16e.inc + + +TUNEVALID[74kc] = "Enable MIPS 74K with DSPr2 processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "74kc", " -mtune=74kc", "", d)}" + +AVAILTUNES += "mips32r2-74kc mips32r2-74kc-m16" +AVAILTUNES += "mips32r2el-74kc mips32r2el-74kc-m16" + +# big endian: kc+dsp2=kc, kc+dsp2+mips16e=kc-m16 +TUNE_FEATURES_tune-mips32r2-74kc = "${TUNE_FEATURES_tune-mips32r2-nf} 74kc" +TUNE_FEATURES_tune-mips32r2-74kc-m16 = "${TUNE_FEATURES_tune-mips32r2-74kc} mips16e" + +MIPSPKGSFX_VARIANT_tune-mips32r2-74kc = "mips32r2-74kc" +PACKAGE_EXTRA_ARCHS_tune-mips32r2-74kc = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2-nf} mips32r2-74kc-nf" +QEMU_EXTRAOPTIONS_mips32r2-74kc-nf = " -cpu 24Kc" + +MIPSPKGSFX_VARIANT_tune-mips32r2-74kc-m16 = "mips32r2-74kc${MIPSPKGSFX_MIPS16E}" +PACKAGE_EXTRA_ARCHS_tune-mips32r2-74kc-m16 = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2-74kc} mips32r2-74kc-m16-nf" +QEMU_EXTRAOPTIONS_mips32r2-74kc-m16-nf = " -cpu 24KEc" + +# little endian: kc+dsp2=kc, kc+dsp2+mips16e=kc-m16 +TUNE_FEATURES_tune-mips32r2el-74kc = "${TUNE_FEATURES_tune-mips32r2el-nf} 74kc" +TUNE_FEATURES_tune-mips32r2el-74kc-m16 = "${TUNE_FEATURES_tune-mips32r2el-74kc} mips16e" + +MIPSPKGSFX_VARIANT_tune-mips32r2el-74kc = "mips32r2el-74kc" +PACKAGE_EXTRA_ARCHS_tune-mips32r2el-74kc = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2el-nf} mips32r2el-74kc-nf" +QEMU_EXTRAOPTIONS_mips32r2el-74kc-nf = " -cpu 24Kc" + +MIPSPKGSFX_VARIANT_tune-mips32r2el-74kc-m16 = "mips32r2el-74kc${MIPSPKGSFX_MIPS16E}" +PACKAGE_EXTRA_ARCHS_tune-mips32r2el-74kc-m16 = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2el-74kc} mips32r2el-74kc-m16-nf" +QEMU_EXTRAOPTIONS_mips32r2el-74kc-m16-nf = " -cpu 24KEc"
Signature · 1 line
2.17.1
PATCH v2 4/12 gcc-8: Add recipes for 8.1 release
In reply to Khem Raj--- meta/recipes-devtools/gcc/gcc-8.1.inc | 124 +++++++++ ...0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 42 +++ .../gcc/gcc-8.1/0002-c99-snprintf.patch | 28 ++ .../0003-gcc-poison-system-directories.patch | 192 +++++++++++++ .../gcc-8.1/0004-gcc-poison-dir-extend.patch | 39 +++ ...-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | 73 +++++ .../gcc-8.1/0006-64-bit-multilib-hack.patch | 85 ++++++ .../gcc/gcc-8.1/0007-optional-libstdc.patch | 125 +++++++++ ...gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch | 59 ++++ .../gcc-8.1/0009-COLLECT_GCC_OPTIONS.patch | 38 +++ ...ts.h-in-B-instead-of-S-and-t-oe-in-B.patch | 96 +++++++ .../0011-fortran-cross-compile-hack.patch | 46 ++++ .../gcc/gcc-8.1/0012-cpp-honor-sysroot.patch | 54 ++++ .../0013-MIPS64-Default-to-N64-ABI.patch | 57 ++++ ...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 234 ++++++++++++++++ ...gcc-Fix-argument-list-too-long-error.patch | 40 +++ .../gcc/gcc-8.1/0016-Disable-sdt.patch | 113 ++++++++ .../gcc/gcc-8.1/0017-libtool.patch | 42 +++ ...s-fix-v4bx-to-linker-to-support-EABI.patch | 43 +++ ...-config-files-from-B-instead-of-usin.patch | 102 +++++++ ...ir-from-.la-which-usually-points-to-.patch | 31 +++ .../gcc/gcc-8.1/0021-export-CPP.patch | 53 ++++ ...ILIB_OSDIRNAMES-and-other-multilib-o.patch | 42 +++ ...e-target-gcc-headers-can-be-included.patch | 98 +++++++ ...ild-with-disable-dependency-tracking.patch | 54 ++++ ...t-directory-during-relink-if-inst_pr.patch | 38 +++ ...IR-replacement-instead-of-hardcoding.patch | 29 ++ ...27-aarch64-Add-support-for-musl-ldso.patch | 28 ++ ...-fix-libcc1-s-install-path-and-rpath.patch | 54 ++++ ...le-sysroot-support-for-nativesdk-gcc.patch | 213 +++++++++++++++ ...sroot-gcc-version-specific-dirs-with.patch | 102 +++++++ ...ous-_FOR_BUILD-and-related-variables.patch | 137 ++++++++++ ...032-nios2-Define-MUSL_DYNAMIC_LINKER.patch | 28 ++ ...d-to-link-commandline-for-musl-targe.patch | 87 ++++++ ...bgcc-Add-knob-to-use-ldbl-128-on-ppc.patch | 125 +++++++++ ...using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch | 29 ++ ...as-for-__cpu_indicator_init-instead-.patch | 86 ++++++ .../0037-sync-gcc-stddef.h-with-musl.patch | 91 ++++++ ...-fault-in-precompiled-header-generat.patch | 60 ++++ .../0039-Fix-for-testsuite-failure.patch | 258 ++++++++++++++++++ .../gcc/gcc-cross-canadian_8.1.bb | 5 + .../gcc/gcc-cross-initial_8.1.bb | 2 + meta/recipes-devtools/gcc/gcc-cross_8.1.bb | 3 + .../gcc/gcc-crosssdk-initial_8.1.bb | 3 + meta/recipes-devtools/gcc/gcc-crosssdk_8.1.bb | 2 + meta/recipes-devtools/gcc/gcc-runtime_8.1.bb | 7 + .../gcc/gcc-sanitizers_8.1.bb | 2 + meta/recipes-devtools/gcc/gcc-source_8.1.bb | 4 + meta/recipes-devtools/gcc/gcc_8.1.bb | 10 + .../gcc/libgcc-initial_8.1.bb | 2 + meta/recipes-devtools/gcc/libgcc_8.1.bb | 2 + meta/recipes-devtools/gcc/libgfortran_8.1.bb | 3 + 52 files changed, 3320 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-8.1.inc create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0002-c99-snprintf.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0003-gcc-poison-system-directories.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0004-gcc-poison-dir-extend.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0006-64-bit-multilib-hack.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0007-optional-libstdc.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0008-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0009-COLLECT_GCC_OPTIONS.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0010-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0011-fortran-cross-compile-hack.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0012-cpp-honor-sysroot.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0013-MIPS64-Default-to-N64-ABI.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0015-gcc-Fix-argument-list-too-long-error.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0016-Disable-sdt.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0017-libtool.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0018-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0019-Use-the-multilib-config-files-from-B-instead-of-usin.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0020-Avoid-using-libdir-from-.la-which-usually-points-to-.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0021-export-CPP.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0022-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0023-Ensure-target-gcc-headers-can-be-included.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0024-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0025-Don-t-search-host-directory-during-relink-if-inst_pr.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0026-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0027-aarch64-Add-support-for-musl-ldso.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0028-libcc1-fix-libcc1-s-install-path-and-rpath.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0029-handle-sysroot-support-for-nativesdk-gcc.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0030-Search-target-sysroot-gcc-version-specific-dirs-with.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0031-Fix-various-_FOR_BUILD-and-related-variables.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0032-nios2-Define-MUSL_DYNAMIC_LINKER.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0033-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0034-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0035-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0036-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0037-sync-gcc-stddef.h-with-musl.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0038-fix-segmentation-fault-in-precompiled-header-generat.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0039-Fix-for-testsuite-failure.patch create mode 100644 meta/recipes-devtools/gcc/gcc-cross-canadian_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-cross-initial_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-cross_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-initial_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-runtime_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-sanitizers_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-source_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc_8.1.bb create mode 100644 meta/recipes-devtools/gcc/libgcc-initial_8.1.bb create mode 100644 meta/recipes-devtools/gcc/libgcc_8.1.bb create mode 100644 meta/recipes-devtools/gcc/libgfortran_8.1.bb
meta/recipes-devtools/gcc/gcc-8.1.inc new file +124 -0
@@ -0,0 +1,124 @@ +require gcc-common.inc + +# Third digit in PV should be incremented after a minor release + +PV = "8.1.0" + +# BINV should be incremented to a revision after a minor gcc release + +BINV = "8.1.0" + +FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc-8.1:${FILE_DIRNAME}/gcc-8.1/backport:" + +DEPENDS =+ "mpfr gmp libmpc zlib flex-native" +NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native" + +LICENSE = "GPL-3.0-with-GCC-exception & GPLv3" + +LIC_FILES_CHKSUM = "\ + file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ + file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ + file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ + file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ + file://COPYING.RUNTIME;md5=fe60d87048567d4fe8c8a0ed2448bcc8 \ +" + +#RELEASE = "8.0.1-RC-20180427" +BASEURI ?= "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.xz" +#SRCREV = "f7cf798b73fd1a07098f9a490deec1e2a36e0bed" +#BASEURI ?= "git://github.com/gcc-mirror/gcc;branch=gcc-6-branch;protocol=git" +#BASEURI ?= "http://mirrors.concertpass.com/gcc/snapshots/${RELEASE}/gcc-${RELEASE}.tar.xz" + +SRC_URI = "\ + ${BASEURI} \ + file://0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \ + file://0002-c99-snprintf.patch \ + file://0003-gcc-poison-system-directories.patch \ + file://0004-gcc-poison-dir-extend.patch \ + file://0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch \ + file://0006-64-bit-multilib-hack.patch \ + file://0007-optional-libstdc.patch \ + file://0008-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch \ + file://0009-COLLECT_GCC_OPTIONS.patch \ + file://0010-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch \ + file://0011-fortran-cross-compile-hack.patch \ + file://0012-cpp-honor-sysroot.patch \ + file://0013-MIPS64-Default-to-N64-ABI.patch \ + file://0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch \ + file://0015-gcc-Fix-argument-list-too-long-error.patch \ + file://0016-Disable-sdt.patch \ + file://0017-libtool.patch \ + file://0018-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch \ + file://0019-Use-the-multilib-config-files-from-B-instead-of-usin.patch \ + file://0020-Avoid-using-libdir-from-.la-which-usually-points-to-.patch \ + file://0021-export-CPP.patch \ + file://0022-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch \ + file://0023-Ensure-target-gcc-headers-can-be-included.patch \ + file://0024-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch \ + file://0025-Don-t-search-host-directory-during-relink-if-inst_pr.patch \ + file://0026-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch \ + file://0027-aarch64-Add-support-for-musl-ldso.patch \ + file://0028-libcc1-fix-libcc1-s-install-path-and-rpath.patch \ + file://0029-handle-sysroot-support-for-nativesdk-gcc.patch \ + file://0030-Search-target-sysroot-gcc-version-specific-dirs-with.patch \ + file://0031-Fix-various-_FOR_BUILD-and-related-variables.patch \ + file://0032-nios2-Define-MUSL_DYNAMIC_LINKER.patch \ + file://0033-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch \ + file://0034-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch \ + file://0035-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch \ + file://0036-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch \ + file://0037-sync-gcc-stddef.h-with-musl.patch \ + file://0038-fix-segmentation-fault-in-precompiled-header-generat.patch \ + file://0039-Fix-for-testsuite-failure.patch \ + ${BACKPORTS} \ +" +BACKPORTS = "\ +" +SRC_URI[md5sum] = "65f7c65818dc540b3437605026d329fc" +SRC_URI[sha256sum] = "1d1866f992626e61349a1ccd0b8d5253816222cdc13390dcfaa74b093aa2b153" + +S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${PV}" +#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/git" +#S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/gcc-${RELEASE}" +B = "${WORKDIR}/gcc-${PV}/build.${HOST_SYS}.${TARGET_SYS}" + +# Language Overrides +FORTRAN = "" +JAVA = "" + +LTO = "--enable-lto" + +EXTRA_OECONF_BASE = "\ + ${LTO} \ + --enable-libssp \ + --enable-libitm \ + --disable-bootstrap \ + --disable-libmudflap \ + --with-system-zlib \ + ${@'--with-linker-hash-style=${LINKER_HASH_STYLE}' if '${LINKER_HASH_STYLE}' else ''} \ + --enable-linker-build-id \ + --with-ppl=no \ + --with-cloog=no \ + --enable-checking=release \ + --enable-cheaders=c_global \ + --without-isl \ +" + +EXTRA_OECONF_INITIAL = "\ + --disable-libmudflap \ + --disable-libgomp \ + --disable-libitm \ + --disable-libquadmath \ + --with-system-zlib \ + --disable-lto \ + --disable-plugin \ + --enable-decimal-float=no \ + --without-isl \ + gcc_cv_libc_provides_ssp=yes \ +" + +EXTRA_OECONF_PATHS = "\ + --with-gxx-include-dir=/not/exist{target_includedir}/c++/${BINV} \ + --with-sysroot=/not/exist \ + --with-build-sysroot=${STAGING_DIR_TARGET} \ +"
meta/recipes-devtools/gcc/gcc-8.1/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch new file +42 -0
42 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0002-c99-snprintf.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 5fbfcf247ed6dd01263639daf0c9c3a291e2fd3a Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 29 Mar 2013 08:49:03 +0400 +Subject: [PATCH 02/39] c99-snprintf + +Signed-off-by: Khem Raj <[email protected]> + +Upstream-Status: Pending +--- + libstdc++-v3/include/c_std/cstdio | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libstdc++-v3/include/c_std/cstdio b/libstdc++-v3/include/c_std/cstdio +index 1b9571eaa8d..ad816be4fd1 100644 +--- a/libstdc++-v3/include/c_std/cstdio ++++ b/libstdc++-v3/include/c_std/cstdio +@@ -144,7 +144,7 @@ namespace std + using ::vsprintf; + } // namespace std + +-#if _GLIBCXX_USE_C99_STDIO ++#if _GLIBCXX_USE_C99_STDIO || defined(__UCLIBC__) + + #undef snprintf + #undef vfscanf +-- +2.17.0 +
meta/recipes-devtools/gcc/gcc-8.1/0003-gcc-poison-system-directories.patch new file +192 -0
192 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0004-gcc-poison-dir-extend.patch new file +39 -0
@@ -0,0 +1,39 @@ +From 97370eadcd10da5da529dfb734df56993ce24644 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 29 Mar 2013 09:00:34 +0400 +Subject: [PATCH 04/39] gcc-poison-dir-extend + +Add /sw/include and /opt/include based on the original +zecke-no-host-includes.patch patch. The original patch checked for +/usr/include, /sw/include and /opt/include and then triggered a failure and +aborted. + +Instead, we add the two missing items to the current scan. If the user +wants this to be a failure, they can add "-Werror=poison-system-directories". + +Signed-off-by: Mark Hatle <[email protected]> +Signed-off-by: Khem Raj <[email protected]> + +Upstream-Status: Pending +--- + gcc/incpath.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/gcc/incpath.c b/gcc/incpath.c +index e3b7a21966f..9a457e02dd3 100644 +--- a/gcc/incpath.c ++++ b/gcc/incpath.c +@@ -404,7 +404,9 @@ merge_include_chains (const char *sysroot, cpp_reader *pfile, int verbose) + { + if ((!strncmp (p->name, "/usr/include", 12)) + || (!strncmp (p->name, "/usr/local/include", 18)) +- || (!strncmp (p->name, "/usr/X11R6/include", 18))) ++ || (!strncmp (p->name, "/usr/X11R6/include", 18)) ++ || (!strncmp (p->name, "/sw/include", 11)) ++ || (!strncmp (p->name, "/opt/include", 12))) + warning (OPT_Wpoison_system_directories, + "include location \"%s\" is unsafe for " + "cross-compilation", +-- +2.17.0 +
meta/recipes-devtools/gcc/gcc-8.1/0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch new file +73 -0
73 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0006-64-bit-multilib-hack.patch new file +85 -0
85 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0007-optional-libstdc.patch new file +125 -0
125 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0008-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch new file +59 -0
59 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0009-COLLECT_GCC_OPTIONS.patch new file +38 -0
@@ -0,0 +1,38 @@ +From e19d25847f08eeb5ef26a031fa5eff732bfd0d43 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 29 Mar 2013 09:16:28 +0400 +Subject: [PATCH 09/39] COLLECT_GCC_OPTIONS + +This patch adds --sysroot into COLLECT_GCC_OPTIONS which is used to +invoke collect2. + +Signed-off-by: Khem Raj <[email protected]> + +Upstream-Status: Pending +--- + gcc/gcc.c | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index 8cd27a5dad5..d355d65583a 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -4677,6 +4677,15 @@ set_collect_gcc_options (void) + sizeof ("COLLECT_GCC_OPTIONS=") - 1); + + first_time = TRUE; ++#ifdef HAVE_LD_SYSROOT ++ if (target_system_root_changed && target_system_root) ++ { ++ obstack_grow (&collect_obstack, "'--sysroot=", sizeof("'--sysroot=")-1); ++ obstack_grow (&collect_obstack, target_system_root,strlen(target_system_root)); ++ obstack_grow (&collect_obstack, "'", 1); ++ first_time = FALSE; ++ } ++#endif + for (i = 0; (int) i < n_switches; i++) + { + const char *const *args; +-- +2.17.0 +
meta/recipes-devtools/gcc/gcc-8.1/0010-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch new file +96 -0
96 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0011-fortran-cross-compile-hack.patch new file +46 -0
46 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0012-cpp-honor-sysroot.patch new file +54 -0
54 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0013-MIPS64-Default-to-N64-ABI.patch new file +57 -0
57 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch new file +234 -0
234 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0015-gcc-Fix-argument-list-too-long-error.patch new file +40 -0
@@ -0,0 +1,40 @@ +From 2e75a14cd60227e036790184f0eb400abc3c870b Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 29 Mar 2013 09:26:37 +0400 +Subject: [PATCH 15/39] gcc: Fix argument list too long error. + +There would be an "Argument list too long" error when the +build directory is longer than 200, this is caused by: + +headers=`echo $(PLUGIN_HEADERS) | tr ' ' '\012' | sort -u` + +The PLUGIN_HEADERS is too long before sort, so the "echo" can't handle +it, use the $(sort list) of GNU make which can handle the too long list +would fix the problem, the header would be short enough after sorted. +The "tr ' ' '\012'" was used for translating the space to "\n", the +$(sort list) doesn't need this. + +Signed-off-by: Robert Yang <[email protected]> +Signed-off-by: Khem Raj <[email protected]> + +Upstream-Status: Pending +--- + gcc/Makefile.in | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/Makefile.in b/gcc/Makefile.in +index 1367136bfac..71a8275c39f 100644 +--- a/gcc/Makefile.in ++++ b/gcc/Makefile.in +@@ -3538,7 +3538,7 @@ install-plugin: installdirs lang.install-plugin s-header-vars install-gengtype + # We keep the directory structure for files in config or c-family and .def + # files. All other files are flattened to a single directory. + $(mkinstalldirs) $(DESTDIR)$(plugin_includedir) +- headers=`echo $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def) | tr ' ' '\012' | sort -u`; \ ++ headers="$(sort $(PLUGIN_HEADERS) $$(cd $(srcdir); echo *.h *.def))"; \ + srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`; \ + for file in $$headers; do \ + if [ -f $$file ] ; then \ +-- +2.17.0 +
meta/recipes-devtools/gcc/gcc-8.1/0016-Disable-sdt.patch new file +113 -0
113 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0017-libtool.patch new file +42 -0
42 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0018-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch new file +43 -0
43 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0019-Use-the-multilib-config-files-from-B-instead-of-usin.patch new file +102 -0
102 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0020-Avoid-using-libdir-from-.la-which-usually-points-to-.patch new file +31 -0
@@ -0,0 +1,31 @@ +From a7266111a5ba2d146c979e86ff84f6b807ca5fdc Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 20 Feb 2015 09:39:38 +0000 +Subject: [PATCH 20/39] Avoid using libdir from .la which usually points to a + host path + +Upstream-Status: Inappropriate [embedded specific] + +Signed-off-by: Jonathan Liu <[email protected]> +Signed-off-by: Khem Raj <[email protected]> +--- + ltmain.sh | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/ltmain.sh b/ltmain.sh +index 0121fba707f..52bdbdb5f9c 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -5628,6 +5628,9 @@ func_mode_link () + absdir="$abs_ladir" + libdir="$abs_ladir" + else ++ # Instead of using libdir from .la which usually points to a host path, ++ # use the path the .la is contained in. ++ libdir="$abs_ladir" + dir="$libdir" + absdir="$libdir" + fi +-- +2.17.0 +
meta/recipes-devtools/gcc/gcc-8.1/0021-export-CPP.patch new file +53 -0
53 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0022-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch new file +42 -0
42 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0023-Ensure-target-gcc-headers-can-be-included.patch new file +98 -0
98 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0024-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch new file +54 -0
54 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0025-Don-t-search-host-directory-during-relink-if-inst_pr.patch new file +38 -0
@@ -0,0 +1,38 @@ +From fd96c9b35c592f1bdd32bc5ae669157473e44063 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 3 Mar 2015 08:21:19 +0000 +Subject: [PATCH 25/39] Don't search host directory during "relink" if + $inst_prefix is provided + +http://lists.gnu.org/archive/html/libtool-patches/2011-01/msg00026.html + +Upstream-Status: Submitted + +Signed-off-by: Khem Raj <[email protected]> +--- + ltmain.sh | 5 +++-- + 1 file changed, 3 insertions(+), 2 deletions(-) + +diff --git a/ltmain.sh b/ltmain.sh +index 52bdbdb5f9c..82bcec39f05 100644 +--- a/ltmain.sh ++++ b/ltmain.sh +@@ -6004,12 +6004,13 @@ func_mode_link () + fi + else + # We cannot seem to hardcode it, guess we'll fake it. ++ # Default if $libdir is not relative to the prefix: + add_dir="-L$libdir" +- # Try looking first in the location we're being installed to. ++ + if test -n "$inst_prefix_dir"; then + case $libdir in + [\\/]*) +- add_dir="$add_dir -L$inst_prefix_dir$libdir" ++ add_dir="-L$inst_prefix_dir$libdir" + ;; + esac + fi +-- +2.17.0 +
meta/recipes-devtools/gcc/gcc-8.1/0026-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch new file +29 -0
@@ -0,0 +1,29 @@ +From c2e400afe8c514357859fca88af4d3e1fcbfe2ff Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 28 Apr 2015 23:15:27 -0700 +Subject: [PATCH 26/39] Use SYSTEMLIBS_DIR replacement instead of hardcoding + base_libdir + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Pending + + gcc/config/aarch64/aarch64-linux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h +index bf1327e98cc..64436183bc8 100644 +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -21,7 +21,7 @@ + #ifndef GCC_AARCH64_LINUX_H + #define GCC_AARCH64_LINUX_H + +-#define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" ++#define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef MUSL_DYNAMIC_LINKER + #define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" +-- +2.17.0 +
meta/recipes-devtools/gcc/gcc-8.1/0027-aarch64-Add-support-for-musl-ldso.patch new file +28 -0
@@ -0,0 +1,28 @@ +From a2cc175769fd8255750eaecae64e3d1f9c38d48f Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 28 Apr 2015 23:18:39 -0700 +Subject: [PATCH 27/39] aarch64: Add support for musl ldso + +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Pending + + gcc/config/aarch64/aarch64-linux.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/gcc/config/aarch64/aarch64-linux.h b/gcc/config/aarch64/aarch64-linux.h +index 64436183bc8..ba156676026 100644 +--- a/gcc/config/aarch64/aarch64-linux.h ++++ b/gcc/config/aarch64/aarch64-linux.h +@@ -24,7 +24,7 @@ + #define GLIBC_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-linux-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef MUSL_DYNAMIC_LINKER +-#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" ++#define MUSL_DYNAMIC_LINKER SYSTEMLIBS_DIR "ld-musl-aarch64%{mbig-endian:_be}%{mabi=ilp32:_ilp32}.so.1" + + #undef ASAN_CC1_SPEC + #define ASAN_CC1_SPEC "%{%:sanitize(address):-funwind-tables}" +-- +2.17.0 +
meta/recipes-devtools/gcc/gcc-8.1/0028-libcc1-fix-libcc1-s-install-path-and-rpath.patch new file +54 -0
54 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0029-handle-sysroot-support-for-nativesdk-gcc.patch new file +213 -0
213 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0030-Search-target-sysroot-gcc-version-specific-dirs-with.patch new file +102 -0
102 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0031-Fix-various-_FOR_BUILD-and-related-variables.patch new file +137 -0
137 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0032-nios2-Define-MUSL_DYNAMIC_LINKER.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 99f3e3b427996ac579d95e68440a0bd7af7ef0fc Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Tue, 2 Feb 2016 10:26:10 -0800 +Subject: [PATCH 32/39] nios2: Define MUSL_DYNAMIC_LINKER + +Signed-off-by: Marek Vasut <[email protected]> +Signed-off-by: Khem Raj <[email protected]> +--- +Upstream-Status: Pending + + gcc/config/nios2/linux.h | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/gcc/config/nios2/linux.h b/gcc/config/nios2/linux.h +index 4729105626d..36181eb7b85 100644 +--- a/gcc/config/nios2/linux.h ++++ b/gcc/config/nios2/linux.h +@@ -30,6 +30,7 @@ + #define CPP_SPEC "%{posix:-D_POSIX_SOURCE} %{pthread:-D_REENTRANT}" + + #define GLIBC_DYNAMIC_LINKER "/lib/ld-linux-nios2.so.1" ++#define MUSL_DYNAMIC_LINKER "/lib/ld-musl-nios2.so.1" + + #undef LINK_SPEC + #define LINK_SPEC LINK_SPEC_ENDIAN \ +-- +2.17.0 +
meta/recipes-devtools/gcc/gcc-8.1/0033-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch new file +87 -0
87 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0034-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch new file +125 -0
125 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0035-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 775c7fafcbfebed2d4bd8a6a011f18f70f3b59d3 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Wed, 4 May 2016 21:11:34 -0700 +Subject: [PATCH 35/39] Link libgcc using LDFLAGS, not just SHLIB_LDFLAGS + +Upstream-Status: Pending + +Signed-off-by: Christopher Larson <[email protected]> +Signed-off-by: Khem Raj <[email protected]> +--- + libgcc/config/t-slibgcc | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libgcc/config/t-slibgcc b/libgcc/config/t-slibgcc +index 7e60b621a2d..ea22ede3361 100644 +--- a/libgcc/config/t-slibgcc ++++ b/libgcc/config/t-slibgcc +@@ -32,7 +32,7 @@ SHLIB_INSTALL_SOLINK = $(LN_S) $(SHLIB_SONAME) \ + $(DESTDIR)$(slibdir)$(SHLIB_SLIBDIR_QUAL)/$(SHLIB_SOLINK) + + SHLIB_LINK = $(CC) $(LIBGCC2_CFLAGS) -shared -nodefaultlibs \ +- $(SHLIB_LDFLAGS) \ ++ $(LDFLAGS) $(SHLIB_LDFLAGS) \ + -o $(SHLIB_DIR)/$(SHLIB_SONAME).tmp @multilib_flags@ \ + $(SHLIB_OBJS) $(SHLIB_LC) && \ + rm -f $(SHLIB_DIR)/$(SHLIB_SOLINK) && \ +-- +2.17.0 +
meta/recipes-devtools/gcc/gcc-8.1/0036-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch new file +86 -0
86 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0037-sync-gcc-stddef.h-with-musl.patch new file +91 -0
91 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0038-fix-segmentation-fault-in-precompiled-header-generat.patch new file +60 -0
43 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-8.1/0039-Fix-for-testsuite-failure.patch new file +258 -0
258 lines not on this page · raw message
meta/recipes-devtools/gcc/gcc-cross-canadian_8.1.bb new file +5 -0
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-cross-initial_8.1.bb new file +2 -0
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-cross_8.1.bb new file +3 -0
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-crosssdk-initial_8.1.bb new file +3 -0
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-crosssdk_8.1.bb new file +2 -0
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-runtime_8.1.bb new file +7 -0
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-sanitizers_8.1.bb new file +2 -0
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc-source_8.1.bb new file +4 -0
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/gcc_8.1.bb new file +10 -0
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/libgcc-initial_8.1.bb new file +2 -0
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/libgcc_8.1.bb new file +2 -0
Lines of this file are not shown. View the raw message.
meta/recipes-devtools/gcc/libgfortran_8.1.bb new file +3 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
PATCH v2 5/12 gcc-8: Disable libssp for non mingw targets
In reply to Khem Raj--- meta/recipes-devtools/gcc/gcc-8.1.inc | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
meta/recipes-devtools/gcc/gcc-8.1.inc +4 -2
@@ -87,10 +87,12 @@ FORTRAN = "" JAVA = "" LTO = "--enable-lto" +SSP ?= "--disable-libssp" +SSP_mingw32 = "--enable-libssp" EXTRA_OECONF_BASE = "\ ${LTO} \ - --enable-libssp \ + ${SSP} \ --enable-libitm \ --disable-bootstrap \ --disable-libmudflap \
@@ -114,7 +116,7 @@ EXTRA_OECONF_INITIAL = "\ --disable-plugin \ --enable-decimal-float=no \ --without-isl \ - gcc_cv_libc_provides_ssp=yes \ + --disable-libssp \ " EXTRA_OECONF_PATHS = "\
Signature · 1 line
2.17.1
PATCH v2 6/12 gcc-8: Disable float128 for ppc/musl
In reply to Khem Raj--- meta/recipes-devtools/gcc/gcc-common.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/gcc/gcc-common.inc +1 -1
@@ -46,7 +46,7 @@ def get_long_double_setting(bb, d): if d.getVar('TRANSLATED_TARGET_ARCH') in [ 'powerpc', 'powerpc64' ] and d.getVar('TCLIBC') in [ 'glibc' ]: return "--with-long-double-128" else: - return "--without-long-double-128" + return "--without-long-double-128 libgcc_cv_powerpc_float128=no" return "" def get_gcc_multiarch_setting(bb, d):
Signature · 1 line
2.17.1
PATCH v2 7/12 gcc-8: Enabled mspe options for rs6000 ppc backend
In reply to Khem Raj--- meta/recipes-devtools/gcc/gcc-8.1.inc | 1 + ...Re-introduce-spe-commandline-options.patch | 41 +++++++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0040-Re-introduce-spe-commandline-options.patch
meta/recipes-devtools/gcc/gcc-8.1.inc +1 -0
@@ -70,6 +70,7 @@ SRC_URI = "\ file://0037-sync-gcc-stddef.h-with-musl.patch \ file://0038-fix-segmentation-fault-in-precompiled-header-generat.patch \ file://0039-Fix-for-testsuite-failure.patch \ + file://0040-Re-introduce-spe-commandline-options.patch \ ${BACKPORTS} \ " BACKPORTS = "\
meta/recipes-devtools/gcc/gcc-8.1/0040-Re-introduce-spe-commandline-options.patch new file +41 -0
41 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH v2 8/12 tcmode-default: Switch to gcc 8.0
In reply to Khem Raj--- meta/conf/distro/include/tcmode-default.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/conf/distro/include/tcmode-default.inc +1 -1
@@ -22,7 +22,7 @@ PREFERRED_PROVIDER_virtual/${TARGET_PREFIX}libc-initial = "${TCLIBC}-initial" PREFERRED_PROVIDER_virtual/nativesdk-${SDK_PREFIX}libc-initial ?= "nativesdk-glibc-initial" PREFERRED_PROVIDER_virtual/gettext ??= "gettext" -GCCVERSION ?= "7.%" +GCCVERSION ?= "8.%" SDKGCCVERSION ?= "${GCCVERSION}" BINUVERSION ?= "2.30%" GDBVERSION ?= "8.1%"
Signature · 1 line
2.17.1
PATCH v2 9/12 linux-yocto: Fix build with gcc8 for ppc
In reply to Khem Raj--- ...e-attribute-alias-warnings-from-gcc8.patch | 31 +++++++++++++++++++ ...isable-array-bounds-warning-with-gcc.patch | 28 +++++++++++++++++ meta/recipes-kernel/linux/linux-yocto_4.15.bb | 4 +++ 3 files changed, 63 insertions(+) create mode 100644 meta/recipes-kernel/linux/files/0001-powerpc-Disable-attribute-alias-warnings-from-gcc8.patch create mode 100644 meta/recipes-kernel/linux/files/0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch
meta/recipes-kernel/linux/files/0001-powerpc-Disable-attribute-alias-warnings-from-gcc8.patch new file +31 -0
@@ -0,0 +1,31 @@ +From a043b9e85af743103e71afcef943b359154727f8 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 4 May 2018 09:46:42 -0700 +Subject: [PATCH 1/2] powerpc: Disable attribute-alias warnings from gcc8 + +Fixes +alias between functions of incompatible types warnings +which are new with gcc8 + +Signed-off-by: Khem Raj <[email protected]> +--- + arch/powerpc/kernel/Makefile | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile +index 1b6bc7fba996..7fab5ab9edc2 100644 +--- a/arch/powerpc/kernel/Makefile ++++ b/arch/powerpc/kernel/Makefile +@@ -3,7 +3,8 @@ + # Makefile for the linux kernel. + # + +-CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' ++CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' $(call cc-disable-warning, attribute-alias) ++CFLAGS_syscalls.o += $(call cc-disable-warning, attribute-alias) + + subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror + +-- +2.17.0 +
meta/recipes-kernel/linux/files/0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch new file +28 -0
@@ -0,0 +1,28 @@ +From e2704b41efba4a6b94cd12e8d220f70d7a3b5c70 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 4 May 2018 09:50:05 -0700 +Subject: [PATCH 2/2] powerpc/ptrace: Disable array-bounds warning with gcc8 + +This masks the new gcc8 warning +include/linux/regset.h:270:4: error: 'memcpy' offset [-527, -529] is out of the bounds [0, 16] of object 'vrsave' with type 'union <anonymous>' + +Signed-off-by: Khem Raj <[email protected]> +--- + arch/powerpc/kernel/Makefile | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/arch/powerpc/kernel/Makefile b/arch/powerpc/kernel/Makefile +index 7fab5ab9edc2..601118b43545 100644 +--- a/arch/powerpc/kernel/Makefile ++++ b/arch/powerpc/kernel/Makefile +@@ -4,6 +4,7 @@ + # + + CFLAGS_ptrace.o += -DUTS_MACHINE='"$(UTS_MACHINE)"' $(call cc-disable-warning, attribute-alias) ++CFLAGS_ptrace.o += $(call cc-disable-warning, array-bounds) + CFLAGS_syscalls.o += $(call cc-disable-warning, attribute-alias) + + subdir-ccflags-$(CONFIG_PPC_WERROR) := -Werror +-- +2.17.0 +
meta/recipes-kernel/linux/linux-yocto_4.15.bb +4 -0
@@ -24,6 +24,10 @@ SRCREV_meta ?= "939d935b0c992c6f1e51a7a1c9e4fbe6ef3c3174" SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRANCH}; \ git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.15;destsuffix=${KMETA}" +SRC_URI += "file://0001-powerpc-Disable-attribute-alias-warnings-from-gcc8.patch \ + file://0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch \ +" + LINUX_VERSION ?= "4.15.13" DEPENDS += "${@bb.utils.contains('ARCH', 'x86', 'elfutils-native', '', d)}"
Signature · 1 line
2.17.1
PATCH v2 10/12 linux-yocto: Fix mips build with gcc8
In reply to Khem Raj--- ...ips-Disable-attribute-alias-warnings.patch | 43 +++++++++++++++++++ meta/recipes-kernel/linux/linux-yocto_4.15.bb | 1 + 2 files changed, 44 insertions(+) create mode 100644 meta/recipes-kernel/linux/files/0001-mips-Disable-attribute-alias-warnings.patch
meta/recipes-kernel/linux/files/0001-mips-Disable-attribute-alias-warnings.patch new file +43 -0
@@ -0,0 +1,43 @@ +From bb47f1bdc9243117bf8009f1c265b2a8feaf9c58 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 4 May 2018 11:49:35 -0700 +Subject: [PATCH] mips: Disable attribute-alias warnings + +This warning is seen with gcc-8 +include/linux/syscalls.h:211:18: error: 'sys_cachectl' alias between functions of incom +patible types 'long int(char *, int, int)' and 'long int(long int, long int, long int)' + +Signed-off-by: Khem Raj <[email protected]> +--- + arch/mips/kernel/Makefile | 2 ++ + arch/mips/mm/Makefile | 1 + + 2 files changed, 3 insertions(+) + +diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile +index f10e1e15e1c6..eb92e52eb3db 100644 +--- a/arch/mips/kernel/Makefile ++++ b/arch/mips/kernel/Makefile +@@ -2,6 +2,8 @@ + # + # Makefile for the Linux/MIPS kernel. + # ++CFLAGS_signal.o += $(call cc-disable-warning, attribute-alias) ++CFLAGS_syscall.o += $(call cc-disable-warning, attribute-alias) + + extra-y := head.o vmlinux.lds + +diff --git a/arch/mips/mm/Makefile b/arch/mips/mm/Makefile +index c463bdad45c7..b7f9ef80dac7 100644 +--- a/arch/mips/mm/Makefile ++++ b/arch/mips/mm/Makefile +@@ -2,6 +2,7 @@ + # + # Makefile for the Linux/MIPS-specific parts of the memory manager. + # ++CFLAGS_cache.o += $(call cc-disable-warning, attribute-alias) + + obj-y += cache.o dma-default.o extable.o fault.o \ + gup.o init.o mmap.o page.o page-funcs.o \ +-- +2.17.0 +
meta/recipes-kernel/linux/linux-yocto_4.15.bb +1 -0
@@ -26,6 +26,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA SRC_URI += "file://0001-powerpc-Disable-attribute-alias-warnings-from-gcc8.patch \ file://0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch \ + file://0001-mips-Disable-attribute-alias-warnings.patch \ " LINUX_VERSION ?= "4.15.13"
Signature · 1 line
2.17.1
PATCH v2 11/12 linux-yocto: Fix mips64 build with gcc8
In reply to Khem Raj--- ...ps64-Disable-attribute-alias-warning.patch | 26 +++++++++++++++++++ meta/recipes-kernel/linux/linux-yocto_4.15.bb | 1 + 2 files changed, 27 insertions(+) create mode 100644 meta/recipes-kernel/linux/files/0001-mips64-Disable-attribute-alias-warning.patch
meta/recipes-kernel/linux/files/0001-mips64-Disable-attribute-alias-warning.patch new file +26 -0
@@ -0,0 +1,26 @@ +From 65fa442fb787b03aa28920cf54a4d1e6da10bb35 Mon Sep 17 00:00:00 2001 +From: Khem Raj <[email protected]> +Date: Fri, 4 May 2018 12:43:49 -0700 +Subject: [PATCH] mips64: Disable attribute-alias warning + +Signed-off-by: Khem Raj <[email protected]> +--- + arch/mips/kernel/Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/arch/mips/kernel/Makefile b/arch/mips/kernel/Makefile +index eb92e52eb3db..795aa4c9ef7f 100644 +--- a/arch/mips/kernel/Makefile ++++ b/arch/mips/kernel/Makefile +@@ -4,6 +4,8 @@ + # + CFLAGS_signal.o += $(call cc-disable-warning, attribute-alias) + CFLAGS_syscall.o += $(call cc-disable-warning, attribute-alias) ++CFLAGS_linux32.o += $(call cc-disable-warning, attribute-alias) ++CFLAGS_signal32.o += $(call cc-disable-warning, attribute-alias) + + extra-y := head.o vmlinux.lds + +-- +2.17.0 +
meta/recipes-kernel/linux/linux-yocto_4.15.bb +1 -0
@@ -27,6 +27,7 @@ SRC_URI = "git://git.yoctoproject.org/linux-yocto.git;name=machine;branch=${KBRA SRC_URI += "file://0001-powerpc-Disable-attribute-alias-warnings-from-gcc8.patch \ file://0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch \ file://0001-mips-Disable-attribute-alias-warnings.patch \ + file://0001-mips64-Disable-attribute-alias-warning.patch \ " LINUX_VERSION ?= "4.15.13"
Signature · 1 line
2.17.1
PATCH v2 12/12 linux-yocto: Fix GCC 8 -Wrestrict error
In reply to Khem Rajpager.c: do not alias select() params
--- ...jtool-perf-Fix-GCC-8-Wrestrict-error.patch | 51 +++++++++++++++++++ ...d-pager.c-do-not-alias-select-params.patch | 43 ++++++++++++++++ meta/recipes-kernel/linux/linux-yocto_4.15.bb | 2 + 3 files changed, 96 insertions(+) create mode 100644 meta/recipes-kernel/linux/files/0001-objtool-perf-Fix-GCC-8-Wrestrict-error.patch create mode 100644 meta/recipes-kernel/linux/files/0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch
meta/recipes-kernel/linux/files/0001-objtool-perf-Fix-GCC-8-Wrestrict-error.patch new file +51 -0
@@ -0,0 +1,51 @@ +From 233aa0194c7ca773866f3ec871f5d12d64ad44e1 Mon Sep 17 00:00:00 2001 +From: Josh Poimboeuf <[email protected]> +Date: Thu, 15 Mar 2018 22:11:54 -0500 +Subject: [PATCH] objtool, perf: Fix GCC 8 -Wrestrict error +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +commit 854e55ad289ef8888e7991f0ada85d5846f5afb9 upstream. + +Starting with recent GCC 8 builds, objtool and perf fail to build with +the following error: + + ../str_error_r.c: In function ‘str_error_r’: + ../str_error_r.c:25:3: error: passing argument 1 to restrict-qualified parameter aliases with argument 5 [-Werror=restrict] + snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d", errnum, buf, buflen, err); + +The code seems harmless, but there's probably no benefit in printing the +'buf' pointer in this situation anyway, so just remove it to make GCC +happy. + +Reported-by: Laura Abbott <[email protected]> +Signed-off-by: Josh Poimboeuf <[email protected]> +Tested-by: Laura Abbott <[email protected]> +Cc: Adrian Hunter <[email protected]> +Cc: Jiri Olsa <[email protected]> +Cc: Namhyung Kim <[email protected]> +Cc: Wang Nan <[email protected]> +Link: http://lkml.kernel.org/r/20180316031154.juk2uncs7baffctp@treble +Signed-off-by: Arnaldo Carvalho de Melo <[email protected]> +Cc: Fredrik Schön <[email protected]> +Signed-off-by: Greg Kroah-Hartman <[email protected]> +--- + tools/lib/str_error_r.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tools/lib/str_error_r.c b/tools/lib/str_error_r.c +index d6d65537b0d9..6aad8308a0ac 100644 +--- a/tools/lib/str_error_r.c ++++ b/tools/lib/str_error_r.c +@@ -22,6 +22,6 @@ char *str_error_r(int errnum, char *buf, size_t buflen) + { + int err = strerror_r(errnum, buf, buflen); + if (err) +- snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, %p, %zd)=%d", errnum, buf, buflen, err); ++ snprintf(buf, buflen, "INTERNAL ERROR: strerror_r(%d, [buf], %zd)=%d", errnum, buflen, err); + return buf; + } +-- +2.17.0 +
meta/recipes-kernel/linux/files/0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch new file +43 -0
43 lines not on this page · raw message
meta/recipes-kernel/linux/linux-yocto_4.15.bb +2 -0
@@ -28,6 +28,8 @@ SRC_URI += "file://0001-powerpc-Disable-attribute-alias-warnings-from-gcc8.patch file://0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch \ file://0001-mips-Disable-attribute-alias-warnings.patch \ file://0001-mips64-Disable-attribute-alias-warning.patch \ + file://0001-objtool-perf-Fix-GCC-8-Wrestrict-error.patch \ + file://0001-tools-lib-subcmd-pager.c-do-not-alias-select-params.patch \ " LINUX_VERSION ?= "4.15.13"
Signature · 1 line
2.17.1
Quoted 11 lines · Khem Raj
This changeset is including the review feedback from last patchset
- Fixes ppc such that we dont have to change machine options so it remains backward compatible and folks can still use gcc7
- Tweaks arm tunes to set -mtune instead of -mcpu, this avoids conflicts between -march/-mcpu
- Removes workarounds to avoid these conflicts in valgrind
- Add mips 74kc tune files
- Linux yocto changes are also part of Bruce's kernel updates but this makes it complete until those changes are pulled in
Correct. I have all of the gcc8 patches in linux-yocto 4.12/4.14/4.15 and linux-yocto-dev.
They should have been covered by my last set of SRCREV updates, and I noticed that
some are in, and some not.
I'll resubmit my SRCREV queue tomorrow, and that will cover the gcc8 angle.
Bruce
Quoted 221 lines
The following changes since commit
cd195bdf5dd2c8ff03c58a63dcabe88b142d2a9c:oe-pkgdata-util: package-info: Re-add support for the --extra option
(2018-06-04 15:14:43 +0100)are available in the Git repository at:
git://git.openembedded.org/openembedded-core-contribkraj/gcc-8
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=kraj/gcc-8Khem Raj (12):
tune/arm: Set -mtune instead of -mcpu
valgrind: Remove code to remove -mcpu option on arm tune-mips-74k.inc: add tune file for 74kc mips
gcc-8: Add recipes for 8.1 release
gcc-8: Disable libssp for non mingw targets
gcc-8: Disable float128 for ppc/musl
gcc-8: Enabled mspe options for rs6000 ppc backend
tcmode-default: Switch to gcc 8.0
linux-yocto: Fix build with gcc8 for ppc
linux-yocto: Fix mips build with gcc8
linux-yocto: Fix mips64 build with gcc8
linux-yocto: Fix GCC 8 -Wrestrict errormeta/conf/distro/include/tcmode-default.inc | 2 +- .../machine/include/mips/tune-mips-74k.inc | 37 +++ .../conf/machine/include/tune-arm1136jf-s.inc | 2 +- meta/conf/machine/include/tune-arm920t.inc | 2 +- meta/conf/machine/include/tune-arm926ejs.inc | 2 +- meta/conf/machine/include/tune-arm9tdmi.inc | 2 +- meta/conf/machine/include/tune-cortexa15.inc | 2 +- meta/conf/machine/include/tune-cortexa17.inc | 2 +- meta/conf/machine/include/tune-cortexa5.inc | 2 +- meta/conf/machine/include/tune-cortexa7.inc | 2 +- meta/conf/machine/include/tune-cortexa8.inc | 2 +- meta/conf/machine/include/tune-cortexa9.inc | 2 +- meta/conf/machine/include/tune-ep9312.inc | 2 +- meta/conf/machine/include/tune-iwmmxt.inc | 2 +- .../machine/include/tune-strongarm1100.inc | 2 +- meta/conf/machine/include/tune-thunderx.inc | 2 +- meta/conf/machine/include/tune-xscale.inc | 2 +- meta/recipes-devtools/gcc/gcc-8.1.inc | 127 +++++++++ ...0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch | 42 +++ .../gcc/gcc-8.1/0002-c99-snprintf.patch | 28 ++ .../0003-gcc-poison-system-directories.patch | 192 +++++++++++++ .../gcc-8.1/0004-gcc-poison-dir-extend.patch | 39 +++ ...-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch | 73 +++++ .../gcc-8.1/0006-64-bit-multilib-hack.patch | 85 ++++++ .../gcc/gcc-8.1/0007-optional-libstdc.patch | 125 +++++++++ ...gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch | 59 ++++ .../gcc-8.1/0009-COLLECT_GCC_OPTIONS.patch | 38 +++ ...ts.h-in-B-instead-of-S-and-t-oe-in-B.patch | 96 +++++++ .../0011-fortran-cross-compile-hack.patch | 46 ++++ .../gcc/gcc-8.1/0012-cpp-honor-sysroot.patch | 54 ++++ .../0013-MIPS64-Default-to-N64-ABI.patch | 57 ++++ ...AMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch | 234 ++++++++++++++++ ...gcc-Fix-argument-list-too-long-error.patch | 40 +++ .../gcc/gcc-8.1/0016-Disable-sdt.patch | 113 ++++++++ .../gcc/gcc-8.1/0017-libtool.patch | 42 +++ ...s-fix-v4bx-to-linker-to-support-EABI.patch | 43 +++ ...-config-files-from-B-instead-of-usin.patch | 102 +++++++ ...ir-from-.la-which-usually-points-to-.patch | 31 +++ .../gcc/gcc-8.1/0021-export-CPP.patch | 53 ++++ ...ILIB_OSDIRNAMES-and-other-multilib-o.patch | 42 +++ ...e-target-gcc-headers-can-be-included.patch | 98 +++++++ ...ild-with-disable-dependency-tracking.patch | 54 ++++ ...t-directory-during-relink-if-inst_pr.patch | 38 +++ ...IR-replacement-instead-of-hardcoding.patch | 29 ++ ...27-aarch64-Add-support-for-musl-ldso.patch | 28 ++ ...-fix-libcc1-s-install-path-and-rpath.patch | 54 ++++ ...le-sysroot-support-for-nativesdk-gcc.patch | 213 +++++++++++++++ ...sroot-gcc-version-specific-dirs-with.patch | 102 +++++++ ...ous-_FOR_BUILD-and-related-variables.patch | 137 ++++++++++ ...032-nios2-Define-MUSL_DYNAMIC_LINKER.patch | 28 ++ ...d-to-link-commandline-for-musl-targe.patch | 87 ++++++ ...bgcc-Add-knob-to-use-ldbl-128-on-ppc.patch | 125 +++++++++ ...using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch | 29 ++ ...as-for-__cpu_indicator_init-instead-.patch | 86 ++++++ .../0037-sync-gcc-stddef.h-with-musl.patch | 91 ++++++ ...-fault-in-precompiled-header-generat.patch | 60 ++++ .../0039-Fix-for-testsuite-failure.patch | 258 ++++++++++++++++++ ...Re-introduce-spe-commandline-options.patch | 41 +++ meta/recipes-devtools/gcc/gcc-common.inc | 2 +- .../gcc/gcc-cross-canadian_8.1.bb | 5 + .../gcc/gcc-cross-initial_8.1.bb | 2 + meta/recipes-devtools/gcc/gcc-cross_8.1.bb | 3 + .../gcc/gcc-crosssdk-initial_8.1.bb | 3 + meta/recipes-devtools/gcc/gcc-crosssdk_8.1.bb | 2 + meta/recipes-devtools/gcc/gcc-runtime_8.1.bb | 7 + .../gcc/gcc-sanitizers_8.1.bb | 2 + meta/recipes-devtools/gcc/gcc-source_8.1.bb | 4 + meta/recipes-devtools/gcc/gcc_8.1.bb | 10 + .../gcc/libgcc-initial_8.1.bb | 2 + meta/recipes-devtools/gcc/libgcc_8.1.bb | 2 + meta/recipes-devtools/gcc/libgfortran_8.1.bb | 3 + .../valgrind/valgrind_3.13.0.bb | 11 - ...ips-Disable-attribute-alias-warnings.patch | 43 +++ ...ps64-Disable-attribute-alias-warning.patch | 26 ++ ...jtool-perf-Fix-GCC-8-Wrestrict-error.patch | 51 ++++ ...e-attribute-alias-warnings-from-gcc8.patch | 31 +++ ...d-pager.c-do-not-alias-select-params.patch | 43 +++ ...isable-array-bounds-warning-with-gcc.patch | 28 ++ meta/recipes-kernel/linux/linux-yocto_4.15.bb | 8 + 79 files changed, 3648 insertions(+), 28 deletions(-) create mode 100644 meta/conf/machine/include/mips/tune-mips-74k.inc create mode 100644 meta/recipes-devtools/gcc/gcc-8.1.inc create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0001-gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0002-c99-snprintf.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0003-gcc-poison-system-directories.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0004-gcc-poison-dir- extend.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0005-gcc-4.3.3-SYSROOT_CFLAGS_FOR_TARGET.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0006-64-bit-multilib-hack.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0007-optional-libstdc.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0008-gcc-disable-MASK_RELAX_PIC_CALLS-bit.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0009-COLLECT_GCC_OPTIONS.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0010-Use-the-defaults.h-in-B-instead-of-S-and-t-oe-in-B.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0011-fortran-cross- compile-hack.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0012-cpp-honor-sysroot.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0013-MIPS64-Default-to-N64-ABI.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0014-Define-GLIBC_DYNAMIC_LINKER-and-UCLIBC_DYNAMIC_LINKE.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0015-gcc-Fix-argument-list-too-long-error.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0016-Disable-sdt.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0017-libtool.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0018-gcc-armv4-pass-fix-v4bx-to-linker-to-support-EABI.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0019-Use-the-multilib-config-files-from-B-instead-of-usin.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0020-Avoid-using-libdir-from-.la-which-usually-points-to-.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0021-export-CPP.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0022-Disable-the-MULTILIB_OSDIRNAMES-and-other-multilib-o.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0023-Ensure-target-gcc-headers-can-be-included.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0024-gcc-4.8-won-t-build-with-disable-dependency-tracking.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0025-Don-t-search-host-directory-during-relink-if-inst_pr.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0026-Use-SYSTEMLIBS_DIR-replacement-instead-of-hardcoding.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0027-aarch64-Add-support-for-musl-ldso.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0028-libcc1-fix-libcc1-s-install-path-and-rpath.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0029-handle-sysroot- support-for-nativesdk-gcc.patch create mode 100644 meta/recipes-devtools/gcc/gcc-8.1/0030-Search-target- sysroot-gcc-version-specific-dirs-with.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0031-Fix-various-_FOR_BUILD-and-related-variables.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0032-nios2-Define-MUSL_DYNAMIC_LINKER.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0033-Add-ssp_nonshared-to-link-commandline-for-musl-targe.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0034-libgcc-Add-knob-to-use-ldbl-128-on-ppc.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0035-Link-libgcc-using-LDFLAGS-not-just-SHLIB_LDFLAGS.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0036-libgcc_s-Use-alias-for-__cpu_indicator_init-instead-.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0037-sync-gcc-stddef.h-with-musl.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0038-fix-segmentation-fault-in-precompiled-header-generat.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0039-Fix-for-testsuite-failure.patch create mode 100644 meta/recipes-devtools/gcc/gcc- 8.1/0040-Re-introduce-spe-commandline-options.patch create mode 100644 meta/recipes-devtools/gcc/gcc-cross-canadian_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-cross-initial_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-cross_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk-initial_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-crosssdk_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-runtime_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-sanitizers_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc-source_8.1.bb create mode 100644 meta/recipes-devtools/gcc/gcc_8.1.bb create mode 100644 meta/recipes-devtools/gcc/libgcc-initial_8.1.bb create mode 100644 meta/recipes-devtools/gcc/libgcc_8.1.bb create mode 100644 meta/recipes-devtools/gcc/libgfortran_8.1.bb create mode 100644 meta/recipes-kernel/linux/files/0001-mips-Disable- attribute-alias-warnings.patch create mode 100644 meta/recipes-kernel/linux/files/0001-mips64-Disable- attribute-alias-warning.patch create mode 100644 meta/recipes-kernel/linux/files/0001-objtool-perf-Fix- GCC-8-Wrestrict-error.patch create mode 100644 meta/recipes-kernel/linux/files/0001-powerpc-Disable- attribute-alias-warnings-from-gcc8.patch create mode 100644 meta/recipes-kernel/linux/files/0001-tools-lib-subcmd- pager.c-do-not-alias-select-params.patch create mode 100644 meta/recipes-kernel/linux/files/0002-powerpc-ptrace-Disable-array-bounds-warning-with-gcc.patch
--
2.17.1--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 2 lines
"Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end"
Quoted 17 lines · Bruce Ashfield
Quoted 10 lines · Khem Raj
This changeset is including the review feedback from last patchset
- Fixes ppc such that we dont have to change machine options so it remains backward compatible and folks can still use gcc7
- Tweaks arm tunes to set -mtune instead of -mcpu, this avoids conflicts between -march/-mcpu
- Removes workarounds to avoid these conflicts in valgrind
- Add mips 74kc tune files
- Linux yocto changes are also part of Bruce's kernel updates but this makes it complete until those changes are pulled inCorrect. I have all of the gcc8 patches in linux-yocto 4.12/4.14/4.15 and linux-yocto-dev.
Quoted 6 lines
They should have been covered by my last set of SRCREV updates, and I noticed that
some are in, and some not.I'll resubmit my SRCREV queue tomorrow, and that will cover the gcc8 angle.
Thanks. Khem's series failed since it doesn't cover 4.14, Bruce's patchset helped a lot.
It looks like we have kernel failures with:
MACHINE="mpc8315e-rdb" DISTRO="poky-lsb" in linux-yocto 4.14
https://autobuilder.yocto.io/builders/nightly-ppc-lsb/builds/1051/steps/BuildImages_1/logs/stdio
MACHINE="mpc8315e-rdb" DISTRO="poky" in linux-yocto 4.15
https://autobuilder.yocto.io/builders/nightly-ppc/builds/1066/steps/BuildImages_1/logs/stdio
MACHINE="edgerouter" DISTRO="poky-lsb" in linux-yocto 4.14:
https://autobuilder.yocto.io/builders/nightly-mips-lsb/builds/1040/steps/BuildImages_1/logs/stdio
MACHINE="edgerouter" DISTRO="poky" in linux-yocto 4.15:
https://autobuilder.yocto.io/builders/nightly-mips/builds/1044/steps/BuildImages_1/logs/stdio
I realised the above may be due to missing BSP SRCREV updates (cc Kevin)?
With gcc 8, it seems we have a problem with meta-mingw:
https://autobuilder.yocto.io/builders/nightly-qa-extras/builds/1062/steps/BuildImages_3/logs/stdio
The build isn't finished but I'm hoping these are the main remaining issues.
Cheers,
Richard
Quoted 36 lines · Richard Purdie
Quoted 17 lines · Bruce Ashfield
Quoted 10 lines · Khem Raj
This changeset is including the review feedback from last patchset
- Fixes ppc such that we dont have to change machine options so it remains backward compatible and folks can still use gcc7
- Tweaks arm tunes to set -mtune instead of -mcpu, this avoids conflicts between -march/-mcpu
- Removes workarounds to avoid these conflicts in valgrind
- Add mips 74kc tune files
- Linux yocto changes are also part of Bruce's kernel updates but this makes it complete until those changes are pulled inCorrect. I have all of the gcc8 patches in linux-yocto 4.12/4.14/4.15 and linux-yocto-dev.
Quoted 6 lines
They should have been covered by my last set of SRCREV updates, and I noticed that
some are in, and some not.I'll resubmit my SRCREV queue tomorrow, and that will cover the gcc8 angle.
Thanks. Khem's series failed since it doesn't cover 4.14, Bruce's patchset helped a lot.
It looks like we have kernel failures with:
MACHINE="mpc8315e-rdb" DISTRO="poky-lsb" in linux-yocto 4.14
https://autobuilder.yocto.io/builders/nightly-ppc-lsb/builds/1051/steps/BuildImages_1/logs/stdioMACHINE="mpc8315e-rdb" DISTRO="poky" in linux-yocto 4.15
https://autobuilder.yocto.io/builders/nightly-ppc/builds/1066/steps/BuildImages_1/logs/stdio
Quoted 7 lines
MACHINE="edgerouter" DISTRO="poky-lsb" in linux-yocto 4.14:
https://autobuilder.yocto.io/builders/nightly-mips-lsb/builds/1040/steps/BuildImages_1/logs/stdioMACHINE="edgerouter" DISTRO="poky" in linux-yocto 4.15:
https://autobuilder.yocto.io/builders/nightly-mips/builds/1044/steps/BuildImages_1/logs/stdioI realised the above may be due to missing BSP SRCREV updates (cc Kevin)?
I will update the SRCREV for these boards ASAP.
Thanks,
Kevin
Quoted 19 lines
With gcc 8, it seems we have a problem with meta-mingw:
https://autobuilder.yocto.io/builders/nightly-qa-extras/builds/1062/steps/BuildImages_3/logs/stdio
The build isn't finished but I'm hoping these are the main remaining issues.
Cheers,
Richard
Quoted 22 lines · Richard Purdie
Quoted 21 lines · Bruce Ashfield
Quoted 10 lines · Khem Raj
This changeset is including the review feedback from last patchset
- Fixes ppc such that we dont have to change machine options so it remains backward compatible and folks can still use gcc7
- Tweaks arm tunes to set -mtune instead of -mcpu, this avoids conflicts between -march/-mcpu
- Removes workarounds to avoid these conflicts in valgrind
- Add mips 74kc tune files
- Linux yocto changes are also part of Bruce's kernel updates but this makes it complete until those changes are pulled inCorrect. I have all of the gcc8 patches in linux-yocto 4.12/4.14/4.15 and linux-yocto-dev.
They should have been covered by my last set of SRCREV updates, and I noticed that
some are in, and some not.
Quoted 5 lines
Quoted 2 lines
I'll resubmit my SRCREV queue tomorrow, and that will cover the gcc8 angle.
Thanks. Khem's series failed since it doesn't cover 4.14, Bruce's patchset helped a lot.
yes I only fixed 4.15 since that was default kernel
Quoted 12 lines
It looks like we have kernel failures with:
MACHINE="mpc8315e-rdb" DISTRO="poky-lsb" in linux-yocto 4.14
https://autobuilder.yocto.io/builders/nightly-ppc-lsb/builds/1051/steps/BuildImages_1/logs/stdioMACHINE="mpc8315e-rdb" DISTRO="poky" in linux-yocto 4.15
https://autobuilder.yocto.io/builders/nightly-ppc/builds/1066/steps/BuildImages_1/logs/stdioMACHINE="edgerouter" DISTRO="poky-lsb" in linux-yocto 4.14:
https://autobuilder.yocto.io/builders/nightly-mips-lsb/builds/1040/steps/BuildImages_1/logs/stdio
Quoted 9 lines
MACHINE="edgerouter" DISTRO="poky" in linux-yocto 4.15:
https://autobuilder.yocto.io/builders/nightly-mips/builds/1044/steps/BuildImages_1/logs/stdioI realised the above may be due to missing BSP SRCREV updates (cc Kevin)?
With gcc 8, it seems we have a problem with meta-mingw:
https://autobuilder.yocto.io/builders/nightly-qa-extras/builds/1062/steps/BuildImages_3/logs/stdio
yes I have patch for this sent to yp mailing list just now.
Quoted 14 lines
The build isn't finished but I'm hoping these are the main remaining issues.
Cheers,
Richard