diff options
Diffstat (limited to 'poky/meta/recipes-bsp')
-rw-r--r-- | poky/meta/recipes-bsp/grub/files/0001-configure-Remove-obsoleted-malign-jumps-loops-functi.patch | 48 | ||||
-rw-r--r-- | poky/meta/recipes-bsp/grub/files/0002-configure-Check-for-falign-jumps-1-beside-falign-loo.patch | 59 | ||||
-rw-r--r-- | poky/meta/recipes-bsp/grub/grub2.inc | 12 | ||||
-rw-r--r-- | poky/meta/recipes-bsp/u-boot/libubootenv_0.3.3.bb (renamed from poky/meta/recipes-bsp/u-boot/libubootenv_0.3.2.bb) | 6 | ||||
-rw-r--r-- | poky/meta/recipes-bsp/u-boot/u-boot_2022.07.bb | 2 |
5 files changed, 120 insertions, 7 deletions
diff --git a/poky/meta/recipes-bsp/grub/files/0001-configure-Remove-obsoleted-malign-jumps-loops-functi.patch b/poky/meta/recipes-bsp/grub/files/0001-configure-Remove-obsoleted-malign-jumps-loops-functi.patch new file mode 100644 index 0000000000..98142a7b60 --- /dev/null +++ b/poky/meta/recipes-bsp/grub/files/0001-configure-Remove-obsoleted-malign-jumps-loops-functi.patch @@ -0,0 +1,48 @@ +From eb486898dac8cbc29b2cc39f911b657c3417ae34 Mon Sep 17 00:00:00 2001 +From: Fangrui Song via Grub-devel <grub-devel@gnu.org> +Date: Thu, 26 Aug 2021 09:02:31 -0700 +Subject: [PATCH 1/2] configure: Remove obsoleted -malign-{jumps, loops, + functions} +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The GCC warns "cc1: warning: ‘-malign-loops’ is obsolete, use ‘-falign-loops’". +The Clang silently ignores -malign-{jumps,loops,functions}. + +The preferred -falign-* forms have been supported since GCC 3.2. So, just +remove -malign-{jumps,loops,functions}. + +Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=eb486898dac8cbc29b2cc39f911b657c3417ae34] +Signed-off-by: Fangrui Song <maskray@google.com> +Acked-by: Paul Menzel <pmenzel@molgen.mpg.de> +Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> +--- + configure.ac | 9 --------- + 1 file changed, 9 deletions(-) + +diff --git a/configure.ac b/configure.ac +index bee28dbeb..9a12151bd 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -805,17 +805,8 @@ if test "x$target_cpu" = xi386; then + [grub_cv_cc_falign_loop=no]) + ]) + +- AC_CACHE_CHECK([whether -malign-loops works], [grub_cv_cc_malign_loop], [ +- CFLAGS="$TARGET_CFLAGS -malign-loops=1 -Werror" +- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], +- [grub_cv_cc_malign_loop=yes], +- [grub_cv_cc_malign_loop=no]) +- ]) +- + if test "x$grub_cv_cc_falign_loop" = xyes; then + TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1" +- elif test "x$grub_cv_cc_malign_loop" = xyes; then +- TARGET_CFLAGS="$TARGET_CFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1" + fi + fi + +-- +2.37.3 + diff --git a/poky/meta/recipes-bsp/grub/files/0002-configure-Check-for-falign-jumps-1-beside-falign-loo.patch b/poky/meta/recipes-bsp/grub/files/0002-configure-Check-for-falign-jumps-1-beside-falign-loo.patch new file mode 100644 index 0000000000..437e5b29b2 --- /dev/null +++ b/poky/meta/recipes-bsp/grub/files/0002-configure-Check-for-falign-jumps-1-beside-falign-loo.patch @@ -0,0 +1,59 @@ +From e372dcb0d4541ee9b9682cde088ec87a7b238ca2 Mon Sep 17 00:00:00 2001 +From: Fangrui Song via Grub-devel <grub-devel@gnu.org> +Date: Thu, 26 Aug 2021 09:02:32 -0700 +Subject: [PATCH 2/2] configure: Check for -falign-jumps=1 beside + -falign-loops=1 + +The Clang does not support -falign-jumps and only recently gained support +for -falign-loops. The -falign-jumps=1 should be tested beside +-fliang-loops=1 to avoid passing unrecognized options to the Clang: + + clang-14: error: optimization flag '-falign-jumps=1' is not supported [-Werror,-Wignored-optimization-argument] + +The -falign-functions=1 is supported by GCC 5.1.0/Clang 3.8.0. So, just +add the option unconditionally. + +Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=e372dcb0d4541ee9b9682cde088ec87a7b238ca2] +Signed-off-by: Fangrui Song <maskray@google.com> +Acked-by: Paul Menzel <pmenzel@molgen.mpg.de> +Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> +--- + configure.ac | 15 ++++++++++++++- + 1 file changed, 14 insertions(+), 1 deletion(-) + +diff --git a/configure.ac b/configure.ac +index 9a12151bd..eeb5d2211 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -798,6 +798,8 @@ fi + + # Force no alignment to save space on i386. + if test "x$target_cpu" = xi386; then ++ TARGET_CFLAGS="$TARGET_CFLAGS -falign-functions=1" ++ + AC_CACHE_CHECK([whether -falign-loops works], [grub_cv_cc_falign_loop], [ + CFLAGS="$TARGET_CFLAGS -falign-loops=1 -Werror" + AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], +@@ -806,7 +808,18 @@ if test "x$target_cpu" = xi386; then + ]) + + if test "x$grub_cv_cc_falign_loop" = xyes; then +- TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1" ++ TARGET_CFLAGS="$TARGET_CFLAGS -falign-loops=1" ++ fi ++ ++ AC_CACHE_CHECK([whether -falign-jumps works], [grub_cv_cc_falign_jumps], [ ++ CFLAGS="$TARGET_CFLAGS -falign-jumps=1 -Werror" ++ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])], ++ [grub_cv_cc_falign_jumps=yes], ++ [grub_cv_cc_falign_jumps=no]) ++ ]) ++ ++ if test "x$grub_cv_cc_falign_jumps" = xyes; then ++ TARGET_CFLAGS="$TARGET_CFLAGS -falign-jumps=1" + fi + fi + +-- +2.37.3 + diff --git a/poky/meta/recipes-bsp/grub/grub2.inc b/poky/meta/recipes-bsp/grub/grub2.inc index 47ea561002..2545b99b6a 100644 --- a/poky/meta/recipes-bsp/grub/grub2.inc +++ b/poky/meta/recipes-bsp/grub/grub2.inc @@ -32,6 +32,8 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \ file://CVE-2022-28734-net-http-Fix-OOB-write-for-split-http-headers.patch \ file://CVE-2022-28734-net-http-Error-out-on-headers-with-LF-without-CR.patch \ file://CVE-2022-28735-kern-efi-sb-Reject-non-kernel-files-in-the-shim_lock.patch \ + file://0001-configure-Remove-obsoleted-malign-jumps-loops-functi.patch \ + file://0002-configure-Check-for-falign-jumps-1-beside-falign-loo.patch \ " SRC_URI[sha256sum] = "23b64b4c741569f9426ed2e3d0e6780796fca081bee4c99f62aa3f53ae803f5f" @@ -43,9 +45,13 @@ CVE_CHECK_IGNORE += "CVE-2021-46705" DEPENDS = "flex-native bison-native gettext-native" -COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)' -COMPATIBLE_HOST:armv7a = 'null' -COMPATIBLE_HOST:armv7ve = 'null' +GRUB_COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|riscv.*)-(linux.*|freebsd.*)' +COMPATIBLE_HOST = "${GRUB_COMPATIBLE_HOST}" +# Grub doesn't support hard float toolchain and won't be able to forcefully +# disable it on some of the target CPUs. See 'configure.ac' for +# supported/unsupported CPUs in hardfp. +COMPATIBLE_HOST:armv7a = "${@'null' if d.getVar('TUNE_CCARGS_MFLOAT') == 'hardfp' else d.getVar('GRUB_COMPATIBLE_HOST')}" +COMPATIBLE_HOST:armv7ve = "${@'null' if d.getVar('TUNE_CCARGS_MFLOAT') == 'hardfp' else d.getVar('GRUB_COMPATIBLE_HOST')}" # configure.ac has code to set this automagically from the target tuple # but the OE freeform one (core2-foo-bar-linux) don't work with that. diff --git a/poky/meta/recipes-bsp/u-boot/libubootenv_0.3.2.bb b/poky/meta/recipes-bsp/u-boot/libubootenv_0.3.3.bb index e8f58941cf..55f91b6f05 100644 --- a/poky/meta/recipes-bsp/u-boot/libubootenv_0.3.2.bb +++ b/poky/meta/recipes-bsp/u-boot/libubootenv_0.3.3.bb @@ -6,12 +6,12 @@ It provides a hardware-independent replacement for fw_printenv/setenv utilities provided by U-Boot" HOMEPAGE = "https://github.com/sbabic/libubootenv" -LICENSE = "LGPL-2.1-only" -LIC_FILES_CHKSUM = "file://Licenses/lgpl-2.1.txt;md5=4fbd65380cdd255951079008b364516c" +LICENSE = "LGPL-2.1-or-later" +LIC_FILES_CHKSUM = "file://LICENSES/LGPL-2.1-or-later.txt;md5=4fbd65380cdd255951079008b364516c" SECTION = "libs" SRC_URI = "git://github.com/sbabic/libubootenv;protocol=https;branch=master" -SRCREV = "ba7564f5006d09bec51058cf4f5ac90d4dc18b3c" +SRCREV = "108100622160bb0c7ef4b6186230fe1f26402791" S = "${WORKDIR}/git" diff --git a/poky/meta/recipes-bsp/u-boot/u-boot_2022.07.bb b/poky/meta/recipes-bsp/u-boot/u-boot_2022.07.bb index 0d2464d74b..1ae575790c 100644 --- a/poky/meta/recipes-bsp/u-boot/u-boot_2022.07.bb +++ b/poky/meta/recipes-bsp/u-boot/u-boot_2022.07.bb @@ -1,7 +1,7 @@ require u-boot-common.inc require u-boot.inc -SRC_URI:append = " file://0001-riscv32-Use-double-float-ABI-for-rv32.patch \ +SRC_URI += " file://0001-riscv32-Use-double-float-ABI-for-rv32.patch \ file://0001-riscv-fix-build-with-binutils-2.38.patch \ " |