Patch review - gcc 10 build support
cover Patch review - gcc 10 build support
This set of patches consists only of patches related to supporting builds on distros using gcc 10. All patches are cherry-picked from master except for "u-boot-tools: backport patch from upstream to fix gcc 10 builds"
Test builds of oe-selftest-fedora and qemux86-world using the autobuilder fedora32 worker were successful. An a-full build using currently supported distros was also successful.
Patches to add fedora32 to the supported disto list will follow at a later date.
Please review and have comments back by end of day Monday.
The following changes since commit d9de155f6452f916edd3131addd0c2eebaf4d639:
vim: _FORTIFY_SOURCE=2 be gone (2020-06-16 10:14:02 -1000)
are available in the Git repository at:
git://git.openembedded.org/openembedded-core-contrib stable/dunfell-nut
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=stable/dunfell-nut
Adrian Bunk (6):
iproute2: Remove -fcommon
libxcrypt2: Remove -fcommon
mesa: Remove -fcommon
at-spi2-atk: Remove -fcommon
menu-cache: Replace -fcommon with fix
matchbox-wm: Replace -fcommon with fix
Jacob Kroon (1):
squashfs-tools: Backport fix for compiling with gcc 10
Joe Slater (1):
acpica: Upgrade 20200214 -> 20200430 for gcc-10 fixes
Khem Raj (5):
glibc: Update to latest on 2.31 branch
wayland: fix condition for strndup detection
syslinux: Fix build with gcc10
valgrind: Do not use outline-atomics on aarch64
valgrind: Backport upstream patch to fix __getauxval needs
Richard Leitner (6):
libtirpc: remove extra "-fcommon" from CFLAGS
gdbm: add patch to fix link failure against gcc 10
dtc: update to 1.6.0
libcomps: update to 0.1.15
binutils: add patch to fix issues with gcc 10
cpio: add patch to fix issues with gcc 10
Steve Sakoman (1):
u-boot-tools: backport patch from upstream to fix gcc 10 builds
zhengruoqin (1):
libtirpc: upgrade 1.2.5 -> 1.2.6
.../remove-redundant-yyloc-global.patch | 27 +++
.../u-boot/u-boot-tools_2020.01.bb | 2 +
.../iproute2/iproute2_5.5.0.bb | 2 +-
meta/recipes-core/glibc/glibc-version.inc | 2 +-
.../0030-Improve-IFUNC-check-BZ-25506.patch | 47 -----
...-with-GCC-10-when-long-double-double.patch | 170 ------------------
.../glibc/glibc/CVE-2020-10029.patch | 128 -------------
meta/recipes-core/glibc/glibc_2.31.bb | 3 -
meta/recipes-core/libxcrypt/libxcrypt.inc | 2 -
.../binutils/binutils-2.34.inc | 1 +
...dundant-program_name-definition-fno-.patch | 61 +++++++
.../0001-Add-crc32.c-to-sources-list.patch | 9 +-
...-__comps_objmrtree_all-static-inline.patch | 35 ----
...YTHON_INSTALL_DIR-by-running-python.patch} | 12 +-
.../{libcomps_git.bb => libcomps_0.1.15.bb} | 6 +-
...ols-fix-build-failure-against-gcc-10.patch | 45 +++++
.../squashfs-tools/squashfs-tools_git.bb | 1 +
...multiple-definition-of-symbol-errors.patch | 97 ++++++++++
.../syslinux/syslinux_6.04-pre2.bb | 1 +
...d-needs-__getauxval-for-linking-with.patch | 144 +++++++++++++++
.../valgrind/valgrind_3.15.0.bb | 1 +
...{acpica_20200214.bb => acpica_20200430.bb} | 4 +-
...ove-superfluous-declaration-of-progr.patch | 28 +++
meta/recipes-extended/cpio/cpio_2.13.bb | 1 +
...r_float-do-not-include-bits-endian.h.patch | 34 ----
.../{libtirpc_1.2.5.bb => libtirpc_1.2.6.bb} | 10 +-
.../0001-Fix-build-with-gcc-10.patch | 41 +++++
.../matchbox-wm/matchbox-wm_1.2.2.bb | 3 +-
.../0001-Support-gcc10-compilation.patch | 111 ++++++++++++
.../menu-cache/menu-cache_1.1.0.bb | 6 +-
meta/recipes-graphics/mesa/mesa_20.0.2.bb | 2 -
...build-Fix-strndup-detection-on-MinGW.patch | 7 +-
.../dtc/{dtc_1.5.1.bb => dtc_1.6.0.bb} | 2 +-
.../recipes-support/atk/at-spi2-atk_2.34.1.bb | 2 -
...gdbm-fix-link-failure-against-gcc-10.patch | 47 +++++
meta/recipes-support/gdbm/gdbm_1.18.1.bb | 3 +-
36 files changed, 637 insertions(+), 460 deletions(-)
create mode 100644 meta/recipes-bsp/u-boot/u-boot-tools/remove-redundant-yyloc-global.patch
delete mode 100644 meta/recipes-core/glibc/glibc/0030-Improve-IFUNC-check-BZ-25506.patch
delete mode 100644 meta/recipes-core/glibc/glibc/0031-Fix-build-with-GCC-10-when-long-double-double.patch
delete mode 100644 meta/recipes-core/glibc/glibc/CVE-2020-10029.patch
create mode 100644 meta/recipes-devtools/binutils/binutils/0017-binutils-drop-redundant-program_name-definition-fno-.patch
delete mode 100644 meta/recipes-devtools/libcomps/libcomps/0001-Make-__comps_objmrtree_all-static-inline.patch
rename meta/recipes-devtools/libcomps/libcomps/{0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch => 0002-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch} (85%)
rename meta/recipes-devtools/libcomps/{libcomps_git.bb => libcomps_0.1.15.bb} (74%)
create mode 100644 meta/recipes-devtools/squashfs-tools/files/0001-squashfs-tools-fix-build-failure-against-gcc-10.patch
create mode 100644 meta/recipes-devtools/syslinux/syslinux/0010-Workaround-multiple-definition-of-symbol-errors.patch
create mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-gcc10-arm64-build-needs-__getauxval-for-linking-with.patch
rename meta/recipes-extended/acpica/{acpica_20200214.bb => acpica_20200430.bb} (91%)
create mode 100644 meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch
delete mode 100644 meta/recipes-extended/libtirpc/libtirpc/0001-xdr_float-do-not-include-bits-endian.h.patch
rename meta/recipes-extended/libtirpc/{libtirpc_1.2.5.bb => libtirpc_1.2.6.bb} (73%)
create mode 100644 meta/recipes-graphics/matchbox-wm/matchbox-wm/0001-Fix-build-with-gcc-10.patch
create mode 100644 meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch
rename meta/recipes-kernel/dtc/{dtc_1.5.1.bb => dtc_1.6.0.bb} (81%)
create mode 100644 meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patchSignature · 1 line
2.17.1
PATCH 1/21 libtirpc: upgrade 1.2.5 -> 1.2.6
From: zhengruoqin <[email protected]>
0001-xdr_float-do-not-include-bits-endian.h.patch
removed since it is included in 1.2.6
---
...r_float-do-not-include-bits-endian.h.patch | 34 -------------------
.../{libtirpc_1.2.5.bb => libtirpc_1.2.6.bb} | 8 ++---
2 files changed, 3 insertions(+), 39 deletions(-)
delete mode 100644 meta/recipes-extended/libtirpc/libtirpc/0001-xdr_float-do-not-include-bits-endian.h.patch
rename meta/recipes-extended/libtirpc/{libtirpc_1.2.5.bb => libtirpc_1.2.6.bb} (74%)meta/recipes-extended/libtirpc/libtirpc/0001-xdr_float-do-not-include-bits-endian.h.patch deleted +0 -34
@@ -1,34 +0,0 @@ -From d04f4d6f0e682f16b0ce96839ab4eadade591eb1 Mon Sep 17 00:00:00 2001 -From: Rosen Penev <[email protected]> -Date: Tue, 21 Jan 2020 11:51:16 -0500 -Subject: [PATCH] xdr_float: do not include bits/endian.h - -bits/endian.h is an internal header. endian.h should be included. - -Fixes compilation with recent musl. - -Signed-off-by: Rosen Penev <[email protected]> -Signed-off-by: Steve Dickson <[email protected]> - -Upstream-Status: Backport [http://git.linux-nfs.org/?p=steved/libtirpc.git;a=commit;h=d04f4d6f0e682f16b0ce96839ab4eadade591eb1] -Signed-off-by: Anuj Mittal <[email protected]> ---- - src/xdr_float.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/src/xdr_float.c b/src/xdr_float.c -index 26bc865..349d48f 100644 ---- a/src/xdr_float.c -+++ b/src/xdr_float.c -@@ -83,7 +83,7 @@ static struct sgl_limits { - }; - #else - --#include <bits/endian.h> -+#include <endian.h> - #define IEEEFP - - #endif /* vax */ --- -2.21.1 -
meta/recipes-extended/libtirpc/libtirpc_1.2.6.bb renamed from meta/recipes-extended/libtirpc/libtirpc_1.2.5.bb +3 -5
@@ -9,13 +9,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f835cce8852481e4b2bbbdd23b5e47f3 \ PROVIDES = "virtual/librpc" -SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2 \ - file://0001-xdr_float-do-not-include-bits-endian.h.patch \ - " +SRC_URI = "${SOURCEFORGE_MIRROR}/${BPN}/${BP}.tar.bz2" UPSTREAM_CHECK_URI = "https://sourceforge.net/projects/libtirpc/files/libtirpc/" UPSTREAM_CHECK_REGEX = "(?P<pver>\d+(\.\d+)+)/" -SRC_URI[md5sum] = "688787ddff7c6a92ef15ae3f5dc4dfa1" -SRC_URI[sha256sum] = "f3b6350c7e9c3cd9c58fc7a5e5f8e6be469cc571bb5eb31eb9790b3e675186ca" +SRC_URI[md5sum] = "b25f9cc18bfad50f7c446c77f4ae00bb" +SRC_URI[sha256sum] = "4278e9a5181d5af9cd7885322fdecebc444f9a3da87c526e7d47f7a12a37d1cc" inherit autotools pkgconfig
Signature · 1 line
2.17.1
PATCH 2/21 libtirpc: remove extra "-fcommon" from CFLAGS
In reply to Steve SakomanFrom: Richard Leitner <[email protected]>
commit daed7eedba ("Avoid multiple-definiton with gcc -fno-common") of libtirpc fixed the -fno-common issues. Therefore it should be save to remove the extra "-fcommon" in CFLAGS.
--- meta/recipes-extended/libtirpc/libtirpc_1.2.6.bb | 2 -- 1 file changed, 2 deletions(-)
meta/recipes-extended/libtirpc/libtirpc_1.2.6.bb +0 -2
@@ -19,8 +19,6 @@ inherit autotools pkgconfig EXTRA_OECONF = "--disable-gssapi" -CFLAGS += "-fcommon" - do_install_append() { chown root:root ${D}${sysconfdir}/netconfig }
Signature · 1 line
2.17.1
PATCH 3/21 gdbm: add patch to fix link failure against gcc 10
In reply to Steve SakomanFrom: Richard Leitner <[email protected]>
This also makes appending "-fcommon" to CFLAGS obsolete and enables native builds with a host gcc v10.
--- ...gdbm-fix-link-failure-against-gcc-10.patch | 47 +++++++++++++++++++ meta/recipes-support/gdbm/gdbm_1.18.1.bb | 3 +- 2 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patch
meta/recipes-support/gdbm/files/gdbm-fix-link-failure-against-gcc-10.patch new file +47 -0
@@ -0,0 +1,47 @@ +From f993697af81c37df9c55e0ebedeb1b8b880506ae Mon Sep 17 00:00:00 2001 +From: Richard Leitner <[email protected]> +Date: Tue, 5 May 2020 11:59:42 +0200 +Subject: [PATCH] gdbm: fix link failure against gcc-10 + +Copied from gentoo's solution at https://bugs.gentoo.org/show_bug.cgi?id=705898 +Original patch by Sergei Trofimovich <[email protected]> + +Original description: + +Before the change on gcc-10 link failed as: +``` + CCLD gdbmtool +ld: ./libgdbmapp.a(parseopt.o):(.bss+0x8): multiple definition of `parseopt_program_args'; + gdbmtool.o:(.data.rel.local+0x260): first defined here +ld: ./libgdbmapp.a(parseopt.o):(.bss+0x10): multiple definition of `parseopt_program_doc'; + gdbmtool.o:(.data.rel.local+0x268): first defined here +``` + +gcc-10 will change the default from -fcommon to fno-common: + https://gcc.gnu.org/PR85678. + +The fix is to avoid multiple definition and rely on +declarations only. + +Upstream-Status: Pending +Signed-off-by: Richard Leitner <[email protected]> +--- + src/parseopt.c | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/parseopt.c b/src/parseopt.c +index 268e080..a4c8576 100644 +--- a/src/parseopt.c ++++ b/src/parseopt.c +@@ -255,8 +255,6 @@ print_option_descr (const char *descr, size_t lmargin, size_t rmargin) + } + + char *parseopt_program_name; +-char *parseopt_program_doc; +-char *parseopt_program_args; + const char *program_bug_address = "<" PACKAGE_BUGREPORT ">"; + void (*parseopt_help_hook) (FILE *stream); + +-- +2.26.2 +
meta/recipes-support/gdbm/gdbm_1.18.1.bb +1 -2
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=241da1b9fe42e642cbb2c24d5e0c4d24" SRC_URI = "${GNU_MIRROR}/gdbm/gdbm-${PV}.tar.gz \ file://run-ptest \ file://ptest.patch \ + file://gdbm-fix-link-failure-against-gcc-10.patch \ " SRC_URI[md5sum] = "988dc82182121c7570e0cb8b4fcd5415"
@@ -23,8 +24,6 @@ CACHED_CONFIGUREVARS += "ac_cv_lib_ndbm_main=no ac_cv_lib_dbm_main=no" BBCLASSEXTEND = "native nativesdk" -CFLAGS += "-fcommon" - do_install_append () { # Create a symlink to ndbm.h and gdbm.h in include/gdbm to let other packages to find # these headers
Signature · 1 line
2.17.1
PATCH 4/21 dtc: update to 1.6.0
In reply to Steve SakomanFrom: Richard Leitner <[email protected]>
This also fixes issues with gcc 10's default change to "-fno-common".
---
meta/recipes-kernel/dtc/{dtc_1.5.1.bb => dtc_1.6.0.bb} | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
rename meta/recipes-kernel/dtc/{dtc_1.5.1.bb => dtc_1.6.0.bb} (81%)meta/recipes-kernel/dtc/dtc_1.6.0.bb renamed from meta/recipes-kernel/dtc/dtc_1.5.1.bb +1 -1
@@ -3,7 +3,7 @@ require dtc.inc LIC_FILES_CHKSUM = "file://GPL;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ file://libfdt/libfdt.h;beginline=4;endline=7;md5=05bb357cfb75cae7d2b01d2ee8d76407" -SRCREV = "60e0db3d65a1218b0d5a29474e769f28a18e3ca6" +SRCREV = "2525da3dba9beceb96651dc2986581871dbeca30" S = "${WORKDIR}/git"
Signature · 1 line
2.17.1
PATCH 5/21 libcomps: update to 0.1.15
In reply to Steve SakomanFrom: Richard Leitner <[email protected]>
In this update the 0001-Make-__comps_objmrtree_all-static-inline.patch was mainlined by commit 18f52cb.
Furthermore mainline commit 3237f44 fixes a build problem with the default "-fno-common" of gcc 10.
---
.../0001-Add-crc32.c-to-sources-list.patch | 9 +++--
...-__comps_objmrtree_all-static-inline.patch | 35 -------------------
...YTHON_INSTALL_DIR-by-running-python.patch} | 12 ++++---
.../{libcomps_git.bb => libcomps_0.1.15.bb} | 6 ++--
4 files changed, 15 insertions(+), 47 deletions(-)
delete mode 100644 meta/recipes-devtools/libcomps/libcomps/0001-Make-__comps_objmrtree_all-static-inline.patch
rename meta/recipes-devtools/libcomps/libcomps/{0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch => 0002-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch} (85%)
rename meta/recipes-devtools/libcomps/{libcomps_git.bb => libcomps_0.1.15.bb} (74%)meta/recipes-devtools/libcomps/libcomps/0001-Add-crc32.c-to-sources-list.patch +6 -3
@@ -1,7 +1,7 @@ -From 83407aa50e06d967d0a1095a140bd7b0e5d51d27 Mon Sep 17 00:00:00 2001 +From 72065bb2b5881dc224299f302379391aebdfca3d Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Wed, 21 Nov 2018 13:09:05 +0100 -Subject: [PATCH] Add crc32.c to sources list +Subject: [PATCH 1/2] Add crc32.c to sources list Otherwise, there is a missing symbol runtime error under musl C library.
@@ -13,7 +13,7 @@ Signed-off-by: Alexander Kanavin <[email protected]> 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libcomps/src/python/src/CMakeLists.txt b/libcomps/src/python/src/CMakeLists.txt -index 6ed25bb..c15c8b2 100644 +index adabb31..b9b96ab 100644 --- a/libcomps/src/python/src/CMakeLists.txt +++ b/libcomps/src/python/src/CMakeLists.txt @@ -9,13 +9,13 @@ set (pycomps_SRCDIR ${CMAKE_CURRENT_SOURCE_DIR})
@@ -45,3 +45,6 @@ index d8f5e34..f266067 100644 static uint32_t crc32_tab[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, +-- +2.26.2 +
meta/recipes-devtools/libcomps/libcomps/0001-Make-__comps_objmrtree_all-static-inline.patch deleted +0 -35
@@ -1,35 +0,0 @@ -From 91a324f8771818b81017fdf4daaad0c8c4b6987c Mon Sep 17 00:00:00 2001 -From: Khem Raj <[email protected]> -Date: Mon, 20 Mar 2017 11:38:54 -0700 -Subject: [PATCH] Make __comps_objmrtree_all() static inline - -This helps compilers to scope the symbol correctly -and apply the inlining optimizations, clang e.g. -emits the functions and calls in code which is -suboptimal, therefore give a little help to compiler -this function is not used anywhere else to have -a global scope. - -Upstream-Status: Pending - -Signed-off-by: Khem Raj <[email protected]> ---- - libcomps/src/comps_objmradix.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/libcomps/src/comps_objmradix.c b/libcomps/src/comps_objmradix.c -index 9be6648..55f7793 100644 ---- a/libcomps/src/comps_objmradix.c -+++ b/libcomps/src/comps_objmradix.c -@@ -604,7 +604,7 @@ inline void comps_objmrtree_pair_destroy_v(void * pair) { - free(pair); - } - --inline COMPS_HSList* __comps_objmrtree_all(COMPS_ObjMRTree * rt, char keyvalpair) { -+static inline COMPS_HSList* __comps_objmrtree_all(COMPS_ObjMRTree * rt, char keyvalpair) { - COMPS_HSList *to_process, *ret; - COMPS_HSListItem *hsit, *oldit; - size_t x; --- -2.12.0 -
meta/recipes-devtools/libcomps/libcomps/0002-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch renamed from meta/recipes-devtools/libcomps/libcomps/0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch +7 -5
@@ -1,20 +1,19 @@ -From b28859ea93110d52d8a87d7b5a6c8796d0d523ed Mon Sep 17 00:00:00 2001 +From 32447a79e24f8e7e9e0150eb747f34116d63ef38 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Fri, 30 Dec 2016 18:22:09 +0200 -Subject: [PATCH] Do not set PYTHON_INSTALL_DIR by running python. +Subject: [PATCH 2/2] Do not set PYTHON_INSTALL_DIR by running python. Upstream-Status: Inappropriate [oe-core specific] Signed-off-by: Alexander Kanavin <[email protected]> - --- libcomps/src/python/src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libcomps/src/python/src/CMakeLists.txt b/libcomps/src/python/src/CMakeLists.txt -index fa590ae..6913214 100644 +index b9b96ab..6d44567 100644 --- a/libcomps/src/python/src/CMakeLists.txt +++ b/libcomps/src/python/src/CMakeLists.txt -@@ -117,7 +117,7 @@ IF (SKBUILD) +@@ -115,7 +115,7 @@ IF (SKBUILD) INSTALL(FILES libcomps/__init__.py DESTINATION libcomps/src/python/src/libcomps) INSTALL(TARGETS pycomps LIBRARY DESTINATION libcomps/src/python/src/libcomps) ELSE ()
@@ -23,3 +22,6 @@ index fa590ae..6913214 100644 INSTALL(FILES ${pycomps_SRCDIR}/libcomps/__init__.py DESTINATION ${PYTHON_INSTALL_DIR}/libcomps) #INSTALL(FILES ${pycomps_SRCDIR}/tests/__test.py DESTINATION +-- +2.26.2 +
meta/recipes-devtools/libcomps/libcomps_0.1.15.bb renamed from meta/recipes-devtools/libcomps/libcomps_git.bb +2 -4
@@ -3,13 +3,11 @@ LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" SRC_URI = "git://github.com/rpm-software-management/libcomps.git \ - file://0001-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ - file://0001-Make-__comps_objmrtree_all-static-inline.patch \ file://0001-Add-crc32.c-to-sources-list.patch \ + file://0002-Do-not-set-PYTHON_INSTALL_DIR-by-running-python.patch \ " -PV = "0.1.14" -SRCREV = "5a0e04286f3462e3308f2a332eb0f90a66920218" +SRCREV = "b213f749405d84e989b25e183bcf28ce701696dd" S = "${WORKDIR}/git"
Signature · 1 line
2.17.1
PATCH 6/21 binutils: add patch to fix issues with gcc 10
In reply to Steve SakomanFrom: Richard Leitner <[email protected]>
gcc 10 introduced "-fno-common" as default. Therefore backport the according binutils patch to fix this issue.
--- .../binutils/binutils-2.34.inc | 1 + ...dundant-program_name-definition-fno-.patch | 61 +++++++++++++++++++ 2 files changed, 62 insertions(+) create mode 100644 meta/recipes-devtools/binutils/binutils/0017-binutils-drop-redundant-program_name-definition-fno-.patch
meta/recipes-devtools/binutils/binutils-2.34.inc +1 -0
@@ -41,6 +41,7 @@ SRC_URI = "\ file://0014-Detect-64-bit-MIPS-targets.patch \ file://0015-sync-with-OE-libtool-changes.patch \ file://0016-Check-for-clang-before-checking-gcc-version.patch \ + file://0017-binutils-drop-redundant-program_name-definition-fno-.patch \ file://CVE-2020-0551.patch \ " S = "${WORKDIR}/git"
meta/recipes-devtools/binutils/binutils/0017-binutils-drop-redundant-program_name-definition-fno-.patch new file +61 -0
61 lines not on this page · raw message
Signature · 1 line
2.17.1
PATCH 7/21 cpio: add patch to fix issues with gcc 10
In reply to Steve SakomanFrom: Richard Leitner <[email protected]>
gcc 10 introduced "-fno-common" as default. Therefore backport the according cpio patch to fix this issue.
--- ...ove-superfluous-declaration-of-progr.patch | 28 +++++++++++++++++++ meta/recipes-extended/cpio/cpio_2.13.bb | 1 + 2 files changed, 29 insertions(+) create mode 100644 meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch
meta/recipes-extended/cpio/cpio-2.13/0002-src-global.c-Remove-superfluous-declaration-of-progr.patch new file +28 -0
@@ -0,0 +1,28 @@ +From 33e6cb5a28fab3d99bd6818f8c01e6f33805390f Mon Sep 17 00:00:00 2001 +From: Sergey Poznyakoff <[email protected]> +Date: Mon, 20 Jan 2020 07:45:39 +0200 +Subject: [PATCH] src/global.c: Remove superfluous declaration of program_name + +Upstream-Status: Accepted (commit 641d3f4) +Signed-off-by: Richard Leitner <[email protected]> +--- + src/global.c | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/src/global.c b/src/global.c +index fb3abe9..acf92bc 100644 +--- a/src/global.c ++++ b/src/global.c +@@ -184,9 +184,6 @@ unsigned int warn_option = 0; + /* Extract to standard output? */ + bool to_stdout_option = false; + +-/* The name this program was run with. */ +-char *program_name; +- + /* A pointer to either lstat or stat, depending on whether + dereferencing of symlinks is done for input files. */ + int (*xstat) (); +-- +2.26.2 +
meta/recipes-extended/cpio/cpio_2.13.bb +1 -0
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949" SRC_URI = "${GNU_MIRROR}/cpio/cpio-${PV}.tar.gz \ file://0001-Unset-need_charset_alias-when-building-for-musl.patch \ + file://0002-src-global.c-Remove-superfluous-declaration-of-progr.patch \ " SRC_URI[md5sum] = "389c5452d667c23b5eceb206f5000810"
Signature · 1 line
2.17.1
PATCH 8/21 iproute2: Remove -fcommon
In reply to Steve SakomanFrom: Adrian Bunk <[email protected]>
This was fixed in upstream version 5.5.0.
--- meta/recipes-connectivity/iproute2/iproute2_5.5.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/iproute2/iproute2_5.5.0.bb +1 -1
@@ -9,4 +9,4 @@ SRC_URI[sha256sum] = "bac543435cac208a11db44c9cc8e35aa902befef8750594654ee71941c # CFLAGS are computed in Makefile and reference CCOPTS # -EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS} -fcommon'" +EXTRA_OEMAKE_append = " CCOPTS='${CFLAGS}'"
Signature · 1 line
2.17.1
PATCH 9/21 libxcrypt2: Remove -fcommon
In reply to Steve SakomanFrom: Adrian Bunk <[email protected]>
This was fixed in upstream version 4.4.12.
--- meta/recipes-core/libxcrypt/libxcrypt.inc | 2 -- 1 file changed, 2 deletions(-)
meta/recipes-core/libxcrypt/libxcrypt.inc +0 -2
@@ -27,8 +27,6 @@ BUILD_CPPFLAGS = "-I${STAGING_INCDIR_NATIVE}" TARGET_CPPFLAGS = "-I${STAGING_DIR_TARGET}${includedir} -Wno-error" CPPFLAGS_append_class-nativesdk = " -Wno-error" -CFLAGS += "-fcommon" - API = "--disable-obsolete-api" EXTRA_OECONF += "${API}"
Signature · 1 line
2.17.1
PATCH 10/21 mesa: Remove -fcommon
In reply to Steve SakomanFrom: Adrian Bunk <[email protected]>
This was fixed in upstream version 20.0.
--- meta/recipes-graphics/mesa/mesa_20.0.2.bb | 2 -- 1 file changed, 2 deletions(-)
meta/recipes-graphics/mesa/mesa_20.0.2.bb +0 -2
@@ -14,8 +14,6 @@ SRC_URI[sha256sum] = "aa54f1cb669550606aab8ceb475105d15aeb814fca5a778ce70d0fd10e UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" -CFLAGS += "-fcommon" - #because we cannot rely on the fact that all apps will use pkgconfig, #make eglplatform.h independent of MESA_EGL_NO_X11_HEADER do_install_append() {
Signature · 1 line
2.17.1
PATCH 11/21 at-spi2-atk: Remove -fcommon
In reply to Steve SakomanFrom: Adrian Bunk <[email protected]>
This was fixed in upstream version 2.34.0.
--- meta/recipes-support/atk/at-spi2-atk_2.34.1.bb | 2 -- 1 file changed, 2 deletions(-)
meta/recipes-support/atk/at-spi2-atk_2.34.1.bb +0 -2
@@ -20,5 +20,3 @@ FILES_${PN}-gnome = "${libdir}/gnome-settings-daemon-3.0/gtk-modules" FILES_${PN}-gtk2 = "${libdir}/gtk-2.0/modules/libatk-bridge.*" BBCLASSEXTEND = "native nativesdk" - -CFLAGS += "-fcommon"
Signature · 1 line
2.17.1
PATCH 12/21 menu-cache: Replace -fcommon with fix
In reply to Steve SakomanFrom: Adrian Bunk <[email protected]>
--- .../0001-Support-gcc10-compilation.patch | 111 ++++++++++++++++++ .../menu-cache/menu-cache_1.1.0.bb | 6 +- 2 files changed, 114 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch
meta/recipes-graphics/menu-cache/files/0001-Support-gcc10-compilation.patch new file +111 -0
@@ -0,0 +1,111 @@ +From 1ce739649b4d66339a03fc0ec9ee7a2f7c141780 Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA <[email protected]> +Date: Fri, 24 Jan 2020 13:33:00 +0900 +Subject: Support gcc10 compilation + +gcc10 now defaults to -fno-common, and with gcc10 menu-cache compilation fails like + +/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:167: multiple definition of `DirDirs'; main.o:menu-cache-gen/menu-tags.h:167: first defined here +/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:164: multiple definition of `AppDirs'; main.o:menu-cache-gen/menu-tags.h:164: first defined here +/bin/ld: menu-merge.o:menu-cache-gen/menu-tags.h:52: multiple definition of `menuTag_Layout'; main.o:menu-cache-gen/menu-tags.h:52: first defined here +.... + +This patch fixes compilation with gcc10: properly declaring variables in header with "extern", and also removing some unneeded variables in header files. + +Upstream-Status: Submitted [https://github.com/lxde/menu-cache/pull/19] +Signed-off-by: Adrian Bunk <[email protected]> +--- + menu-cache-gen/menu-tags.h | 55 ++++++++++++-------------------------- + 1 file changed, 17 insertions(+), 38 deletions(-) + +diff --git a/menu-cache-gen/menu-tags.h b/menu-cache-gen/menu-tags.h +index f3fd7d3..f71c0bc 100644 +--- a/menu-cache-gen/menu-tags.h ++++ b/menu-cache-gen/menu-tags.h +@@ -22,38 +22,17 @@ + #include <libfm/fm-extra.h> + #include <menu-cache.h> + +-FmXmlFileTag menuTag_Menu; +-FmXmlFileTag menuTag_AppDir; +-FmXmlFileTag menuTag_DefaultAppDirs; +-FmXmlFileTag menuTag_DirectoryDir; +-FmXmlFileTag menuTag_DefaultDirectoryDirs; +-FmXmlFileTag menuTag_Include; +-FmXmlFileTag menuTag_Exclude; +-FmXmlFileTag menuTag_Filename; +-FmXmlFileTag menuTag_Or; +-FmXmlFileTag menuTag_And; +-FmXmlFileTag menuTag_Not; +-FmXmlFileTag menuTag_Category; +-FmXmlFileTag menuTag_MergeFile; +-FmXmlFileTag menuTag_MergeDir; +-FmXmlFileTag menuTag_DefaultMergeDirs; +-FmXmlFileTag menuTag_Directory; +-FmXmlFileTag menuTag_Name; +-FmXmlFileTag menuTag_Deleted; +-FmXmlFileTag menuTag_NotDeleted; +-FmXmlFileTag menuTag_OnlyUnallocated; +-FmXmlFileTag menuTag_NotOnlyUnallocated; +-FmXmlFileTag menuTag_All; +-FmXmlFileTag menuTag_LegacyDir; +-FmXmlFileTag menuTag_KDELegacyDirs; +-FmXmlFileTag menuTag_Move; +-FmXmlFileTag menuTag_Old; +-FmXmlFileTag menuTag_New; +-FmXmlFileTag menuTag_Layout; +-FmXmlFileTag menuTag_DefaultLayout; +-FmXmlFileTag menuTag_Menuname; +-FmXmlFileTag menuTag_Separator; +-FmXmlFileTag menuTag_Merge; ++extern FmXmlFileTag menuTag_AppDir; ++extern FmXmlFileTag menuTag_DirectoryDir; ++extern FmXmlFileTag menuTag_Include; ++extern FmXmlFileTag menuTag_Exclude; ++extern FmXmlFileTag menuTag_Filename; ++extern FmXmlFileTag menuTag_Or; ++extern FmXmlFileTag menuTag_And; ++extern FmXmlFileTag menuTag_Not; ++extern FmXmlFileTag menuTag_Category; ++extern FmXmlFileTag menuTag_All; ++extern FmXmlFileTag menuTag_LegacyDir; + + typedef enum { + MERGE_NONE, /* starting value */ +@@ -152,19 +131,19 @@ typedef struct { + } MenuRule; + + /* requested language(s) */ +-char **languages; ++extern char **languages; + + /* list of menu files to monitor */ +-GSList *MenuFiles; ++extern GSList *MenuFiles; + + /* list of menu dirs to monitor */ +-GSList *MenuDirs; ++extern GSList *MenuDirs; + + /* list of available app dirs */ +-GSList *AppDirs; ++extern GSList *AppDirs; + + /* list of available dir dirs */ +-GSList *DirDirs; ++extern GSList *DirDirs; + + /* parse and merge menu files */ + MenuMenu *get_merged_menu(const char *file, FmXmlFile **xmlfile, GError **error); +@@ -177,7 +156,7 @@ gboolean save_menu_cache(MenuMenu *layout, const char *menuname, const char *fil + void _free_layout_items(GList *data); + + /* verbosity level */ +-gint verbose; ++extern gint verbose; + + #define DBG if (verbose) g_debug + #define VDBG if (verbose > 1) g_debug +-- +2.17.1 +
meta/recipes-graphics/menu-cache/menu-cache_1.1.0.bb +3 -3
@@ -8,7 +8,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0964c689fcf4c21c6797ea87408416b6" SECTION = "x11/libs" DEPENDS = "glib-2.0 libfm-extra" -SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz" +SRC_URI = "${SOURCEFORGE_MIRROR}/lxde/menu-cache-${PV}.tar.xz \ + file://0001-Support-gcc10-compilation.patch \ +" SRC_URI[md5sum] = "99999a0bca48b980105208760c8fd893" SRC_URI[sha256sum] = "ed02eb459dcb398f69b9fa5bf4dd813020405afc84331115469cdf7be9273ec7"
@@ -16,5 +18,3 @@ SRC_URI[sha256sum] = "ed02eb459dcb398f69b9fa5bf4dd813020405afc84331115469cdf7be9 UPSTREAM_CHECK_URI = "http://sourceforge.net/projects/lxde/files/menu-cache/1.1/" inherit autotools gettext pkgconfig gtk-doc - -CFLAGS += "-fcommon"
Signature · 1 line
2.17.1
PATCH 13/21 matchbox-wm: Replace -fcommon with fix
In reply to Steve SakomanFrom: Adrian Bunk <[email protected]>
--- .../0001-Fix-build-with-gcc-10.patch | 41 +++++++++++++++++++ .../matchbox-wm/matchbox-wm_1.2.2.bb | 3 +- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-graphics/matchbox-wm/matchbox-wm/0001-Fix-build-with-gcc-10.patch
meta/recipes-graphics/matchbox-wm/matchbox-wm/0001-Fix-build-with-gcc-10.patch new file +41 -0
@@ -0,0 +1,41 @@ +From 8a8f8446e803cad04d7bbceaab78ee45d9778c3c Mon Sep 17 00:00:00 2001 +From: Adrian Bunk <[email protected]> +Date: Tue, 12 May 2020 09:44:05 +0300 +Subject: Fix build with gcc 10 + +Upstream-Status: Pending +Signed-off-by: Adrian Bunk <[email protected]> +--- + src/mbtheme.h | 2 +- + src/structs.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/src/mbtheme.h b/src/mbtheme.h +index aa9a7c5..ad03bde 100644 +--- a/src/mbtheme.h ++++ b/src/mbtheme.h +@@ -46,7 +46,7 @@ typedef struct _mb_theme_param + + } MBThemeParam; + +-enum { ++typedef enum { + LAYER_GRADIENT_HORIZ = 1, + LAYER_GRADIENT_VERT, + LAYER_LABEL, +diff --git a/src/structs.h b/src/structs.h +index 24985e7..8f53e72 100644 +--- a/src/structs.h ++++ b/src/structs.h +@@ -148,7 +148,7 @@ + + /* Atoms, if you change these check ewmh_init() first */ + +-enum { ++typedef enum { + WM_STATE = 0, + WM_CHANGE_STATE, + WM_PROTOCOLS, +-- +2.17.1 +
meta/recipes-graphics/matchbox-wm/matchbox-wm_1.2.2.bb +1 -2
@@ -13,6 +13,7 @@ DEPENDS = "libmatchbox virtual/libx11 libxext libxrender startup-notification ex # SRCREV tagged 1.2.2 SRCREV = "27da947e7fbdf9659f7e5bd1e92af92af6c03970" SRC_URI = "git://git.yoctoproject.org/matchbox-window-manager \ + file://0001-Fix-build-with-gcc-10.patch \ file://kbdconfig" S = "${WORKDIR}/git"
@@ -21,8 +22,6 @@ inherit autotools pkgconfig features_check # depends on virtual/libx11 REQUIRED_DISTRO_FEATURES = "x11" -CFLAGS += "-fcommon" - FILES_${PN} = "${bindir}/* \ ${datadir}/matchbox \ ${sysconfdir}/matchbox \
Signature · 1 line
2.17.1
PATCH 14/21 glibc: Update to latest on 2.31 branch
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
There are few fixes specifically for compiling with gcc10 that are good to have, before hitting them later
Backport build fix from master for aarch64 with gcc10
Drop CVE-2020-10029 patch its already applied on latest 2.31 branch
latest glibc 2.31 added fix for __getauxval/aarch64 issue
--- meta/recipes-core/glibc/glibc-version.inc | 2 +- .../0030-Improve-IFUNC-check-BZ-25506.patch | 47 ----- ...-with-GCC-10-when-long-double-double.patch | 170 ------------------ .../glibc/glibc/CVE-2020-10029.patch | 128 ------------- meta/recipes-core/glibc/glibc_2.31.bb | 3 - 5 files changed, 1 insertion(+), 349 deletions(-) delete mode 100644 meta/recipes-core/glibc/glibc/0030-Improve-IFUNC-check-BZ-25506.patch delete mode 100644 meta/recipes-core/glibc/glibc/0031-Fix-build-with-GCC-10-when-long-double-double.patch delete mode 100644 meta/recipes-core/glibc/glibc/CVE-2020-10029.patch
meta/recipes-core/glibc/glibc-version.inc +1 -1
@@ -1,6 +1,6 @@ SRCBRANCH ?= "release/2.31/master" PV = "2.31+git${SRCPV}" -SRCREV_glibc ?= "71f2b249a28e17eac0e47c53af44d5c5b65101aa" +SRCREV_glibc ?= "109474122400ca7d60782b131dc867a5c1f2fe55" SRCREV_localedef ?= "cd9f958c4c94a638fa7b2b4e21627364f1a1a655" GLIBC_GIT_URI ?= "git://sourceware.org/git/glibc.git"
meta/recipes-core/glibc/glibc/0030-Improve-IFUNC-check-BZ-25506.patch deleted +0 -47
47 lines not on this page · raw message
meta/recipes-core/glibc/glibc/0031-Fix-build-with-GCC-10-when-long-double-double.patch deleted +0 -170
170 lines not on this page · raw message
meta/recipes-core/glibc/glibc/CVE-2020-10029.patch deleted +0 -128
128 lines not on this page · raw message
meta/recipes-core/glibc/glibc_2.31.bb +0 -3
@@ -40,9 +40,6 @@ SRC_URI = "${GLIBC_GIT_URI};branch=${SRCBRANCH};name=glibc \ file://0027-intl-Emit-no-lines-in-bison-generated-files.patch \ file://0028-inject-file-assembly-directives.patch \ file://0029-locale-prevent-maybe-uninitialized-errors-with-Os-BZ.patch \ - file://CVE-2020-10029.patch \ - file://0030-Improve-IFUNC-check-BZ-25506.patch \ - file://0031-Fix-build-with-GCC-10-when-long-double-double.patch \ " S = "${WORKDIR}/git" B = "${WORKDIR}/build-${TARGET_SYS}"
Signature · 1 line
2.17.1
PATCH 15/21 wayland: fix condition for strndup detection
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
current check does not work with gcc10
--- .../0001-build-Fix-strndup-detection-on-MinGW.patch | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-)
meta/recipes-graphics/wayland/wayland/0001-build-Fix-strndup-detection-on-MinGW.patch +1 -6
@@ -17,8 +17,6 @@ Upstream-Status: Submitted [https://gitlab.freedesktop.org/wayland/wayland/merge meson.build | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -diff --git a/meson.build b/meson.build -index 26b084f..c05d019 100644 --- a/meson.build +++ b/meson.build @@ -36,11 +36,11 @@ have_funcs = [
@@ -30,10 +28,7 @@ index 26b084f..c05d019 100644 foreach f: have_funcs config_h.set('HAVE_' + f.underscorify().to_upper(), cc.has_function(f)) endforeach -+config_h.set('HAVE_STRNDUP', cc.has_function('strndup', prefix:'#include <string.h>')) ++config_h.set('HAVE_STRNDUP', cc.has_function('strndup') and cc.has_header_symbol('string.h', 'strndup')) if get_option('libraries') ffi_dep = dependency('libffi') --- -2.17.1 -
Signature · 1 line
2.17.1
PATCH 16/21 squashfs-tools: Backport fix for compiling with gcc 10
In reply to Steve SakomanFrom: Jacob Kroon <[email protected]>
--- ...ols-fix-build-failure-against-gcc-10.patch | 45 +++++++++++++++++++ .../squashfs-tools/squashfs-tools_git.bb | 1 + 2 files changed, 46 insertions(+) create mode 100644 meta/recipes-devtools/squashfs-tools/files/0001-squashfs-tools-fix-build-failure-against-gcc-10.patch
meta/recipes-devtools/squashfs-tools/files/0001-squashfs-tools-fix-build-failure-against-gcc-10.patch new file +45 -0
@@ -0,0 +1,45 @@ +From 94e1911ca24726b7cb3efe2f8b9eb7a784757e18 Mon Sep 17 00:00:00 2001 +From: Sergei Trofimovich <[email protected]> +Date: Sun, 26 Jan 2020 18:35:13 +0000 +Subject: [PATCH] squashfs-tools: fix build failure against gcc-10 +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +On gcc-10 (and gcc-9 -fno-common) build fails as: + +``` +cc ... -o mksquashfs +ld: read_fs.o:(.bss+0x0): + multiple definition of `fwriter_buffer'; mksquashfs.o:(.bss+0x400c90): first defined here +ld: read_fs.o:(.bss+0x8): + multiple definition of `bwriter_buffer'; mksquashfs.o:(.bss+0x400c98): first defined here +``` + +gcc-10 will change the default from -fcommon to fno-common: +https://gcc.gnu.org/PR85678. + +The error also happens if CFLAGS=-fno-common passed explicitly. + +Reported-by: Toralf Förster +Bug: https://bugs.gentoo.org/706456 +Signed-off-by: Sergei Trofimovich <[email protected]> +Signed-off-by: Jacob Kroon <[email protected]> +Upstream-Status: Backport [https://github.com/plougher/squashfs-tools/commit/fe2f5da4b0f8994169c53e84b7cb8a0feefc97b5] +--- + squashfs-tools/mksquashfs.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/squashfs-tools/mksquashfs.h b/squashfs-tools/mksquashfs.h +index 1beefef..b650306 100644 +--- a/squashfs-tools/mksquashfs.h ++++ b/squashfs-tools/mksquashfs.h +@@ -143,7 +143,7 @@ struct append_file { + #endif + + extern struct cache *reader_buffer, *fragment_buffer, *reserve_cache; +-struct cache *bwriter_buffer, *fwriter_buffer; ++extern struct cache *bwriter_buffer, *fwriter_buffer; + extern struct queue *to_reader, *to_deflate, *to_writer, *from_writer, + *to_frag, *locked_fragment, *to_process_frag; + extern struct append_file **file_mapping;
meta/recipes-devtools/squashfs-tools/squashfs-tools_git.bb +1 -0
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://../COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" PV = "4.4" SRCREV = "52eb4c279cd283ed9802dd1ceb686560b22ffb67" SRC_URI = "git://github.com/plougher/squashfs-tools.git;protocol=https \ + file://0001-squashfs-tools-fix-build-failure-against-gcc-10.patch;striplevel=2 \ " S = "${WORKDIR}/git/squashfs-tools"
Signature · 1 line
2.17.1
PATCH 17/21 syslinux: Fix build with gcc10
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
Bring in a patch from fedora to fix -fno-common issue
--- ...multiple-definition-of-symbol-errors.patch | 97 +++++++++++++++++++ .../syslinux/syslinux_6.04-pre2.bb | 1 + 2 files changed, 98 insertions(+) create mode 100644 meta/recipes-devtools/syslinux/syslinux/0010-Workaround-multiple-definition-of-symbol-errors.patch
meta/recipes-devtools/syslinux/syslinux/0010-Workaround-multiple-definition-of-symbol-errors.patch new file +97 -0
@@ -0,0 +1,97 @@ +From 951928f2cad5682c2844e6bd0f7201236c5d9b66 Mon Sep 17 00:00:00 2001 +From: Merlin Mathesius <[email protected]> +Date: Wed, 13 May 2020 08:02:27 -0500 +Subject: [PATCH] Workaround multiple definition of symbol errors + +Lifted from Fedora https://src.fedoraproject.org/rpms/syslinux/blob/master/f/0005-Workaround-multiple-definition-of-symbol-errors.patch + +Upstream-Status: Pending +Signed-off-by: Khem Raj <[email protected]> + +--- + com32/cmenu/Makefile | 2 +- + com32/elflink/ldlinux/Makefile | 2 +- + com32/gpllib/Makefile | 2 +- + com32/hdt/Makefile | 2 +- + core/Makefile | 2 +- + dos/Makefile | 2 +- + efi/Makefile | 2 +- + 7 files changed, 7 insertions(+), 7 deletions(-) + +--- a/com32/cmenu/Makefile ++++ b/com32/cmenu/Makefile +@@ -49,7 +49,7 @@ makeoutputdirs: + @mkdir -p $(OBJ)/libmenu + + libmenu/libmenu.elf: $(LIBMENU) +- $(LD) -shared $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) \ ++ $(LD) -shared $(LDFLAGS) -z muldefs -soname $(patsubst %.elf,%.c32,$(@F)) \ + -o $@ $^ + + tidy dist: +--- a/com32/elflink/ldlinux/Makefile ++++ b/com32/elflink/ldlinux/Makefile +@@ -33,7 +33,7 @@ endif + all: $(BTARGET) ldlinux_lnx.a + + ldlinux.elf : $(OBJS) +- $(LD) $(LDFLAGS) -soname $(SONAME) -o $@ $^ $(LIBS) ++ $(LD) $(LDFLAGS) -z muldefs -soname $(SONAME) -o $@ $^ $(LIBS) + + LNXCFLAGS += -D__export='__attribute__((visibility("default")))' + LNXLIBOBJS = get_key.lo +--- a/com32/gpllib/Makefile ++++ b/com32/gpllib/Makefile +@@ -24,7 +24,7 @@ makeoutputdirs: + $(addprefix $(OBJ),$(sort $(dir $(LIBOBJS)))),$(b)) + + libgpl.elf : $(LIBOBJS) +- $(LD) -shared $(LDFLAGS) -soname $(patsubst %.elf,%.c32,$(@F)) -o $@ $^ ++ $(LD) -shared $(LDFLAGS) -z muldefs -soname $(patsubst %.elf,%.c32,$(@F)) -o $@ $^ + + tidy dist clean: + find . \( -name \*.o -o -name .\*.d -o -name \*.tmp \) -print0 | \ +--- a/com32/hdt/Makefile ++++ b/com32/hdt/Makefile +@@ -52,7 +52,7 @@ QEMU ?= qemu-kvm + all: $(MODULES) $(TESTFILES) + + hdt.elf : $(OBJS) $(LIBS) $(C_LIBS) +- $(LD) $(LDFLAGS) -o $@ $^ ++ $(LD) $(LDFLAGS) -z muldefs -o $@ $^ + + memtest: + -[ ! -f $(FLOPPY_DIR)/$(MEMTEST) ] && $(WGET) $(MEMTEST_URL) -O $(FLOPPY_DIR)/$(MEMTEST) +--- a/core/Makefile ++++ b/core/Makefile +@@ -156,7 +156,7 @@ LDSCRIPT = $(SRC)/$(ARCH)/syslinux.ld + NASM_ELF = elf + + %.elf: %.o $(LIBDEP) $(LDSCRIPT) $(AUXLIBS) +- $(LD) $(LDFLAGS) -pie -Bsymbolic \ ++ $(LD) $(LDFLAGS) -z muldefs -pie -Bsymbolic \ + -T $(LDSCRIPT) \ + --unresolved-symbols=report-all \ + -E --hash-style=gnu -M -o $@ $< \ +--- a/dos/Makefile ++++ b/dos/Makefile +@@ -19,7 +19,7 @@ include $(MAKEDIR)/embedded.mk + CFLAGS += -D__MSDOS__ -mregparm=3 -DREGPARM=3 + # CFLAGS += -DDEBUG + +-LDFLAGS = -T $(SRC)/dosexe.ld ++LDFLAGS = -T $(SRC)/dosexe.ld -z muldefs + OPTFLAGS = -g + INCLUDES = -include code16.h -nostdinc -iwithprefix include \ + -I$(SRC) -I$(SRC)/.. -I$(SRC)/../libfat \ +--- a/efi/Makefile ++++ b/efi/Makefile +@@ -71,7 +71,7 @@ $(OBJS): | $(OBJ)/$(ARCH) + BTARGET = syslinux.efi + + syslinux.so: $(OBJS) $(CORE_OBJS) $(LIB_OBJS) +- $(LD) $(LDFLAGS) --strip-debug -o $@ $^ -lgnuefi -lefi ++ $(LD) $(LDFLAGS) -z muldefs --strip-debug -o $@ $^ -lgnuefi -lefi + + # We need to rename the .hash section because the EFI firmware + # linker really doesn't like it.
meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb +1 -0
@@ -20,6 +20,7 @@ SRC_URI = "https://www.zytor.com/pub/syslinux/Testing/6.04/syslinux-${PV}.tar.xz file://0007-linux-syslinux-implement-ext_construct_sectmap_fs.patch \ file://0008-libinstaller-syslinuxext-implement-syslinux_patch_bo.patch \ file://0009-linux-syslinux-implement-install_bootblock.patch \ + file://0010-Workaround-multiple-definition-of-symbol-errors.patch \ file://0001-install-don-t-install-obsolete-file-com32.ld.patch \ "
Signature · 1 line
2.17.1
PATCH 18/21 valgrind: Do not use outline-atomics on aarch64
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
This avoids the __getauxval undefined reference error seen with gcc10 on doing static linking with -nodefaultlibs, which is uncommon usecase anyway, disabling outline-atomics is not a huge deal for OE in terms of performance as we already use -mcpu which is tuned enough to the SOC the code is being generated for
--- meta/recipes-devtools/valgrind/valgrind_3.15.0.bb | 2 ++ 1 file changed, 2 insertions(+)
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +2 -0
@@ -74,6 +74,8 @@ 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}" +CFLAGS_append_aarch64 = " -mno-outline-atomics " + EXTRA_OEMAKE = "-w" CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
Signature · 1 line
2.17.1
PATCH 19/21 valgrind: Backport upstream patch to fix __getauxval needs
In reply to Steve SakomanFrom: Khem Raj <[email protected]>
Drop disabling outline-atomics since that was added to fix this issue in particular
--- ...d-needs-__getauxval-for-linking-with.patch | 144 ++++++++++++++++++ .../valgrind/valgrind_3.15.0.bb | 3 +- 2 files changed, 145 insertions(+), 2 deletions(-) create mode 100644 meta/recipes-devtools/valgrind/valgrind/0001-gcc10-arm64-build-needs-__getauxval-for-linking-with.patch
meta/recipes-devtools/valgrind/valgrind/0001-gcc10-arm64-build-needs-__getauxval-for-linking-with.patch new file +144 -0
@@ -0,0 +1,144 @@ +From abbc0761fa0349d49b10dc8c0f10af6bc0578c40 Mon Sep 17 00:00:00 2001 +From: Mark Wielaard <[email protected]> +Date: Tue, 12 May 2020 16:58:36 +0200 +Subject: [PATCH 1/2] gcc10 arm64 build needs __getauxval for linking with + libgcc + +Provide a new library libgcc-sup-<platform>.a that contains symbols +needed by libgcc. This needs to be linked after -lgcc to provide +any symbols missing which would normally be provided by glibc. +At the moment this only provides __getauxval on arm64 linux. + +https://bugs.kde.org/show_bug.cgi?id=421321 + +Signed-off-by: Khem Raj <[email protected]> +Upstream-Status: Backport [https://sourceware.org/git/?p=valgrind.git;a=commit;h=abbc0761fa0349d49b10dc8c0f10af6bc0578c40] + +--- + Makefile.tool.am | 3 +- + coregrind/Makefile.am | 26 +++++++++++++++++ + coregrind/m_libgcc_sup.c | 61 ++++++++++++++++++++++++++++++++++++++++ + 3 files changed, 89 insertions(+), 1 deletion(-) + create mode 100644 coregrind/m_libgcc_sup.c + +diff --git a/Makefile.tool.am b/Makefile.tool.am +index cc2fa0ee6..2bf90de5d 100644 +--- a/Makefile.tool.am ++++ b/Makefile.tool.am +@@ -17,7 +17,8 @@ TOOL_DEPENDENCIES_@VGCONF_PLATFORM_SEC_CAPS@ = \ + endif + + +-TOOL_LDADD_COMMON = -lgcc ++TOOL_LDADD_COMMON = -lgcc \ ++ $(top_builddir)/coregrind/libgcc-sup-@VGCONF_ARCH_PRI@-@[email protected] + TOOL_LDADD_@VGCONF_PLATFORM_PRI_CAPS@ = \ + $(TOOL_DEPENDENCIES_@VGCONF_PLATFORM_PRI_CAPS@) $(TOOL_LDADD_COMMON) + if VGCONF_HAVE_PLATFORM_SEC +diff --git a/coregrind/Makefile.am b/coregrind/Makefile.am +index 6a1a925fb..1753fb633 100644 +--- a/coregrind/Makefile.am ++++ b/coregrind/Makefile.am +@@ -542,6 +542,32 @@ libcoregrind_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_DEPENDENCIES = \ + libnolto_coregrind-@VGCONF_ARCH_SEC@-@[email protected] + endif + ++#---------------------------------------------------------------------------- ++# libgcc-sup-<platform>.a ++# Special supplemental library for functions normally supplied by glibc ++# used by libgcc. ++#---------------------------------------------------------------------------- ++ ++pkglib_LIBRARIES += libgcc-sup-@VGCONF_ARCH_PRI@-@[email protected] ++if VGCONF_HAVE_PLATFORM_SEC ++pkglib_LIBRARIES += libgcc-sup-@VGCONF_ARCH_SEC@-@[email protected] ++endif ++ ++libgcc_sup_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_SOURCES = \ ++ m_libgcc_sup.c ++libgcc_sup_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CPPFLAGS = \ ++ $(AM_CPPFLAGS_@VGCONF_PLATFORM_PRI_CAPS@) ++libgcc_sup_@VGCONF_ARCH_PRI@_@VGCONF_OS@_a_CFLAGS = \ ++ $(AM_CFLAGS_PSO_@VGCONF_PLATFORM_PRI_CAPS@) ++if VGCONF_HAVE_PLATFORM_SEC ++libgcc_sup_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_SOURCES = \ ++ m_libgcc_sup.c ++libgcc_sup_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CPPFLAGS = \ ++ $(AM_CPPFLAGS_@VGCONF_PLATFORM_SEC_CAPS@) ++libgcc_sup_@VGCONF_ARCH_SEC@_@VGCONF_OS@_a_CFLAGS = \ ++ $(AM_CFLAGS_PSO_@VGCONF_PLATFORM_SEC_CAPS@) ++endif ++ + #---------------------------------------------------------------------------- + # libreplacemalloc_toolpreload-<platform>.a + #---------------------------------------------------------------------------- +diff --git a/coregrind/m_libgcc_sup.c b/coregrind/m_libgcc_sup.c +new file mode 100644 +index 000000000..e29325459 +--- /dev/null ++++ b/coregrind/m_libgcc_sup.c +@@ -0,0 +1,61 @@ ++/* -*- mode: C; c-basic-offset: 3; -*- */ ++ ++/*--------------------------------------------------------------------*/ ++/*--- Supplemental functions for libgcc normally provided by glibc ---*/ ++/*--------------------------------------------------------------------*/ ++ ++/* ++ This file is part of Valgrind, a dynamic binary instrumentation ++ framework. ++ ++ Copyright (C) 2020 Mark Wielaard ++ [email protected] ++ ++ This program is free software; you can redistribute it and/or ++ modify it under the terms of the GNU General Public License as ++ published by the Free Software Foundation; either version 2 of the ++ License, or (at your option) any later version. ++ ++ This program is distributed in the hope that it will be useful, but ++ WITHOUT ANY WARRANTY; without even the implied warranty of ++ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ General Public License for more details. ++ ++ You should have received a copy of the GNU General Public License ++ along with this program; if not, see <http://www.gnu.org/licenses/>. ++ ++ The GNU General Public License is contained in the file COPYING. ++*/ ++ ++#include "config.h" ++#include "pub_core_basics.h" ++#include "pub_core_clientstate.h" ++ ++/*====================================================================*/ ++/*=== arm64 libgcc support function for init_have_lse_atomics ===*/ ++/*====================================================================*/ ++ ++#if defined(VGP_arm64_linux) ++struct auxv ++{ ++ Word a_type; ++ union { ++ void *a_ptr; ++ Word a_val; ++ } u; ++}; ++#define AT_NULL 0 ++ ++unsigned long int __getauxval (unsigned long int type); ++unsigned long int __getauxval (unsigned long int type) ++{ ++ struct auxv *p; ++ for (p = (struct auxv *) VG_(client_auxv); ++ p != NULL && p->a_type != AT_NULL; ++ p++) ++ if (p->a_type == type) ++ return p->u.a_val; ++ ++ return 0; ++} ++#endif +-- +2.26.2 +
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb +1 -2
@@ -42,6 +42,7 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \ file://0001-none-tests-fdleak_cmsg.stderr.exp-adjust-tmp-paths.patch \ file://0001-tests-Make-pthread_detatch-call-portable-across-plat.patch \ file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \ + file://0001-gcc10-arm64-build-needs-__getauxval-for-linking-with.patch \ " SRC_URI[md5sum] = "46e5fbdcbc3502a5976a317a0860a975" SRC_URI[sha256sum] = "417c7a9da8f60dd05698b3a7bc6002e4ef996f14c13f0ff96679a16873e78ab1"
@@ -74,8 +75,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}" -CFLAGS_append_aarch64 = " -mno-outline-atomics " - EXTRA_OEMAKE = "-w" CACHED_CONFIGUREVARS += "ac_cv_path_PERL='/usr/bin/env perl'"
Signature · 1 line
2.17.1
PATCH 20/21 acpica: Upgrade 20200214 -> 20200430 for gcc-10 fixes
In reply to Steve SakomanFrom: Joe Slater <[email protected]>
Advance to version 20200430 to avoid multiple definition errors for uninitialized variables. In this case, it is not enough to add -fcommon to CFLAGS.
---
.../acpica/{acpica_20200214.bb => acpica_20200430.bb} | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
rename meta/recipes-extended/acpica/{acpica_20200214.bb => acpica_20200430.bb} (91%)meta/recipes-extended/acpica/acpica_20200430.bb renamed from meta/recipes-extended/acpica/acpica_20200214.bb +2 -2
@@ -17,8 +17,8 @@ COMPATIBLE_HOST = "(i.86|x86_64|arm|aarch64).*-linux" DEPENDS = "m4-native flex-native bison-native" SRC_URI = "https://acpica.org/sites/acpica/files/acpica-unix-${PV}.tar.gz" -SRC_URI[md5sum] = "3505ba6170b77db1399eae0e2a959113" -SRC_URI[sha256sum] = "e77ab9f8557ca104f6e8f49efaa8eead29f78ca11cadfc8989012469ecc0738e" +SRC_URI[sha256sum] = "fb807f1dec31664f972af37d213abf72987afe33abf68c83051e298da35d297c" + UPSTREAM_CHECK_URI = "https://acpica.org/downloads" S = "${WORKDIR}/acpica-unix-${PV}"
Signature · 1 line
2.17.1
PATCH 21/21 u-boot-tools: backport patch from upstream to fix gcc 10 builds
In reply to Steve Sakoman--- .../remove-redundant-yyloc-global.patch | 27 +++++++++++++++++++ .../u-boot/u-boot-tools_2020.01.bb | 2 ++ 2 files changed, 29 insertions(+) create mode 100644 meta/recipes-bsp/u-boot/u-boot-tools/remove-redundant-yyloc-global.patch
meta/recipes-bsp/u-boot/u-boot-tools/remove-redundant-yyloc-global.patch new file +27 -0
@@ -0,0 +1,27 @@ +From 018921ee79d3f30893614b3b2b63b588d8544f73 Mon Sep 17 00:00:00 2001 +From: Peter Robinson <[email protected]> +Date: Thu, 30 Jan 2020 09:37:15 +0000 +Subject: [PATCH] Remove redundant YYLOC global declaration + +Same as the upstream fix for building dtc with gcc 10. + +Signed-off-by: Peter Robinson <[email protected]> +--- + scripts/dtc/dtc-lexer.l | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l +index fd825ebba6..24af549977 100644 +--- a/scripts/dtc/dtc-lexer.l ++++ b/scripts/dtc/dtc-lexer.l +@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n + #include "srcpos.h" + #include "dtc-parser.tab.h" + +-YYLTYPE yylloc; + extern bool treesource_error; + + /* CAUTION: this will stop working if we ever use yyless() or yyunput() */ +-- +2.26.2 +
meta/recipes-bsp/u-boot/u-boot-tools_2020.01.bb +2 -0
@@ -1,2 +1,4 @@ require u-boot-common.inc require u-boot-tools.inc + +SRC_URI += "file://remove-redundant-yyloc-global.patch"
Signature · 1 line
2.17.1
Quoted 4 lines · Steve Sakoman
This set of patches consists only of patches related to supporting builds on distros using gcc 10. All patches are cherry-picked
from master except
The ones which caused trouble for me are included.
Quoted 1 line
for "u-boot-tools: backport patch from upstream to fix gcc 10 builds"
Did not find this one. Helped myself by cherry-picking upgrade to 2020.04 - but this is definitely the better choice.
Can't wait to see it applied - Thanks!
Andreas