summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/classes-global/insane.bbclass7
-rw-r--r--meta/classes-recipe/kernel-module-split.bbclass25
-rw-r--r--meta/classes-recipe/ptest-cargo.bbclass12
-rw-r--r--meta/classes-recipe/setuptools3.bbclass1
-rw-r--r--meta/classes-recipe/setuptools3_legacy.bbclass1
-rw-r--r--meta/classes-recipe/testimage.bbclass4
-rw-r--r--meta/classes-recipe/uboot-sign.bbclass14
-rw-r--r--meta/conf/distro/include/default-providers.inc3
-rw-r--r--meta/conf/distro/include/distro_alias.inc1
-rw-r--r--meta/conf/distro/include/maintainers.inc3
-rw-r--r--meta/conf/distro/include/ptest-packagelists.inc5
-rw-r--r--meta/conf/toolchain/clang.inc7
-rw-r--r--meta/lib/oe/rootfs.py11
-rw-r--r--meta/lib/oeqa/selftest/cases/reproducible.py11
-rw-r--r--meta/lib/oeqa/selftest/cases/rust.py1
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi/0001-Do-not-treat-warnings-as-errors.patch (renamed from meta/recipes-bsp/gnu-efi/gnu-efi/0002-Do-not-treat-warnings-as-errors.patch)14
-rw-r--r--meta/recipes-bsp/gnu-efi/gnu-efi_4.0.1.bb (renamed from meta/recipes-bsp/gnu-efi/gnu-efi_4.0.0.bb)8
-rw-r--r--meta/recipes-bsp/grub/grub2.inc4
-rw-r--r--meta/recipes-bsp/opensbi/opensbi/0001-Makefile-Add-flag-for-reprodubility-compiler-flags.patch49
-rw-r--r--meta/recipes-bsp/opensbi/opensbi_1.6.bb8
-rw-r--r--meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch41
-rw-r--r--meta/recipes-connectivity/connman/connman_1.44.bb1
-rw-r--r--meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver28
-rw-r--r--meta/recipes-connectivity/openssh/openssh/0001-regress-test-exec-use-the-absolute-path-in-the-SSH-e.patch6
-rw-r--r--meta/recipes-connectivity/openssh/openssh_10.0p1.bb (renamed from meta/recipes-connectivity/openssh/openssh_9.9p2.bb)4
-rw-r--r--meta/recipes-connectivity/openssl/openssl_3.5.0.bb22
-rw-r--r--meta/recipes-core/base-files/base-files/0001-add-nss-resolve-to-nsswitch.patch31
-rw-r--r--meta/recipes-core/base-files/base-files/nsswitch-resolved.conf20
-rw-r--r--meta/recipes-core/base-files/base-files_3.0.14.bb4
-rw-r--r--meta/recipes-core/busybox/busybox/0001-hwclock-Check-for-SYS_settimeofday-before-calling-sy.patch52
-rw-r--r--meta/recipes-core/busybox/busybox_1.37.0.bb1
-rw-r--r--meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch26
-rw-r--r--meta/recipes-core/coreutils/coreutils_9.6.bb12
-rw-r--r--meta/recipes-core/dropbear/dropbear/0001-Fix-proxycmd-without-netcat.patch74
-rw-r--r--meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch2
-rw-r--r--meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch28
-rw-r--r--meta/recipes-core/dropbear/dropbear_2025.88.bb (renamed from meta/recipes-core/dropbear/dropbear_2024.86.bb)8
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0-initial_2.84.2.bb (renamed from meta/recipes-core/glib-2.0/glib-2.0-initial_2.84.1.bb)0
-rw-r--r--meta/recipes-core/glib-2.0/glib-2.0_2.84.2.bb (renamed from meta/recipes-core/glib-2.0/glib-2.0_2.84.1.bb)0
-rw-r--r--meta/recipes-core/glib-2.0/glib.inc2
-rw-r--r--meta/recipes-core/glibc/glibc-common.inc2
-rw-r--r--meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch81
-rw-r--r--meta/recipes-core/libxml/libxml2/install-tests.patch4
-rwxr-xr-xmeta/recipes-core/libxml/libxml2/run-ptest2
-rw-r--r--meta/recipes-core/libxml/libxml2_2.14.3.bb (renamed from meta/recipes-core/libxml/libxml2_2.13.8.bb)10
-rw-r--r--meta/recipes-core/newlib/libgloss_git.bb8
-rw-r--r--meta/recipes-core/newlib/newlib.inc8
-rw-r--r--meta/recipes-core/ovmf/ovmf/0003-debug-prefix-map.patch21
-rw-r--r--meta/recipes-core/ovmf/ovmf/0004-reproducible.patch23
-rw-r--r--meta/recipes-core/ovmf/ovmf_git.bb4
-rw-r--r--[-rwxr-xr-x]meta/recipes-core/psplash/files/psplash-init0
-rw-r--r--meta/recipes-core/psplash/psplash_git.bb2
-rw-r--r--meta/recipes-core/systemd/systemd-boot_257.5.bb5
-rw-r--r--meta/recipes-devtools/binutils/binutils-2.44.inc2
-rw-r--r--meta/recipes-devtools/binutils/binutils/0015-CVE-2025-1178.patch33
-rw-r--r--meta/recipes-devtools/binutils/binutils/CVE-2025-1180.patch165
-rw-r--r--meta/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0014-cmake-Fix-configure-for-packages-using-find_package.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0015-clang-Fix-resource-dir-location-for-cross-toolchains.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0016-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0017-clang-Use-python3-in-python-scripts.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0018-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch10
-rw-r--r--meta/recipes-devtools/clang/clang/0019-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0020-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0021-libunwind-Added-unw_backtrace-method.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0022-lldb-Link-with-libatomic-on-x86.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0023-compiler-rt-Enable-__int128-for-ppc32.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0024-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0025-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0026-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0027-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0028-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0029-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0030-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0031-compiler-rt-Do-not-pass-target-to-clang-compiler.patch2
-rw-r--r--meta/recipes-devtools/clang/clang/0032-Fix-build-on-ppc64-musl.patch97
-rw-r--r--meta/recipes-devtools/clang/clang/0032-clangd-Add-a-build-option-to-disable-building-dexp.patch (renamed from meta/recipes-devtools/clang/clang/0033-clangd-Add-a-build-option-to-disable-building-dexp.patch)2
-rw-r--r--meta/recipes-devtools/clang/clang/0033-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch (renamed from meta/recipes-devtools/clang/clang/0034-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch)2
-rw-r--r--meta/recipes-devtools/clang/clang/0034-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch (renamed from meta/recipes-devtools/clang/clang/0035-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch)2
-rw-r--r--meta/recipes-devtools/clang/clang/0035-openmp-Do-not-emit-date-and-time-into-generate-files.patch (renamed from meta/recipes-devtools/clang/clang/0036-openmp-Do-not-emit-date-and-time-into-generate-files.patch)2
-rw-r--r--meta/recipes-devtools/clang/clang/0036-libunwind-Use-gcs-instead-of-gcs-target-attribute.patch56
-rw-r--r--meta/recipes-devtools/clang/clang/0037-compiler-rt-Exclude-sync_fetch_and_-for-any-pre-ARMv.patch63
-rw-r--r--meta/recipes-devtools/clang/clang/0038-compiler-rt-Hardcode-uptr-sptr-typedefs-on-Mips-Linu.patch35
-rw-r--r--meta/recipes-devtools/clang/clang_git.bb9
-rw-r--r--meta/recipes-devtools/clang/common-clang.inc2
-rw-r--r--meta/recipes-devtools/clang/common.inc14
-rw-r--r--meta/recipes-devtools/clang/compiler-rt-sanitizers_git.bb17
-rw-r--r--meta/recipes-devtools/clang/compiler-rt_git.bb17
-rw-r--r--meta/recipes-devtools/gcc/gcc-15.1.inc4
-rw-r--r--meta/recipes-devtools/gcc/gcc-multilib-config.inc6
-rw-r--r--meta/recipes-devtools/gcc/gcc-runtime.inc5
-rw-r--r--meta/recipes-devtools/gcc/gcc/0026-arm-fully-validate-mem_noofs_operand-PR120351.patch95
-rw-r--r--meta/recipes-devtools/gcc/gcc/0026-fix-incorrect-preprocessor-line-numbers.patch475
-rw-r--r--meta/recipes-devtools/go/go-1.24.3.inc (renamed from meta/recipes-devtools/go/go-1.24.2.inc)2
-rw-r--r--meta/recipes-devtools/go/go-binary-native_1.24.3.bb (renamed from meta/recipes-devtools/go/go-binary-native_1.24.2.bb)6
-rw-r--r--meta/recipes-devtools/go/go-cross-canadian_1.24.3.bb (renamed from meta/recipes-devtools/go/go-cross-canadian_1.24.2.bb)0
-rw-r--r--meta/recipes-devtools/go/go-cross_1.24.3.bb (renamed from meta/recipes-devtools/go/go-cross_1.24.2.bb)0
-rw-r--r--meta/recipes-devtools/go/go-crosssdk_1.24.3.bb (renamed from meta/recipes-devtools/go/go-crosssdk_1.24.2.bb)0
-rw-r--r--meta/recipes-devtools/go/go-runtime_1.24.3.bb (renamed from meta/recipes-devtools/go/go-runtime_1.24.2.bb)0
-rw-r--r--meta/recipes-devtools/go/go_1.24.3.bb (renamed from meta/recipes-devtools/go/go_1.24.2.bb)0
-rw-r--r--meta/recipes-devtools/m4/m4-1.4.20.inc (renamed from meta/recipes-devtools/m4/m4-1.4.19.inc)16
-rw-r--r--meta/recipes-devtools/m4/m4-native_1.4.20.bb (renamed from meta/recipes-devtools/m4/m4-native_1.4.19.bb)0
-rw-r--r--meta/recipes-devtools/m4/m4/0001-Define-alignof_slot-using-_Alignof-when-using-C11-or.patch49
-rw-r--r--meta/recipes-devtools/m4/m4/0001-sigsegv-Fix-build-on-ppc-musl.patch37
-rw-r--r--meta/recipes-devtools/m4/m4/ac_config_links.patch37
-rw-r--r--meta/recipes-devtools/m4/m4/run-ptest2
-rw-r--r--meta/recipes-devtools/m4/m4/serial-tests-config.patch11
-rw-r--r--meta/recipes-devtools/m4/m4_1.4.20.bb (renamed from meta/recipes-devtools/m4/m4_1.4.19.bb)0
-rw-r--r--meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch94
-rw-r--r--meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch81
-rw-r--r--meta/recipes-devtools/patch/patch/0001-Fix-swapping-fake-lines-in-pch_swap.patch36
-rw-r--r--meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch44
-rw-r--r--meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch33
-rw-r--r--meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch35
-rw-r--r--meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch38
-rw-r--r--meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch215
-rw-r--r--meta/recipes-devtools/patch/patch/CVE-2019-13636.patch113
-rw-r--r--meta/recipes-devtools/patch/patch/CVE-2019-20633.patch31
-rw-r--r--meta/recipes-devtools/patch/patch_2.7.6.bb25
-rw-r--r--meta/recipes-devtools/patch/patch_2.8.bb13
-rw-r--r--meta/recipes-devtools/pseudo/pseudo_git.bb7
-rw-r--r--meta/recipes-devtools/python/python3-cython/0001-Output-import-relative-paths-in-generated-C-code.-GH.patch73
-rw-r--r--meta/recipes-devtools/python/python3-cython_3.1.0.bb (renamed from meta/recipes-devtools/python/python3-cython_3.0.12.bb)3
-rw-r--r--meta/recipes-devtools/python/python3-numpy_2.2.6.bb (renamed from meta/recipes-devtools/python/python3-numpy_2.2.5.bb)2
-rw-r--r--meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch37
-rw-r--r--meta/recipes-devtools/python/python3-setuptools_80.8.0.bb (renamed from meta/recipes-devtools/python/python3-setuptools_78.1.0.bb)4
-rw-r--r--meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch14
-rw-r--r--meta/recipes-devtools/python/python3_3.13.3.bb (renamed from meta/recipes-devtools/python/python3_3.13.2.bb)2
-rw-r--r--meta/recipes-devtools/qemu/qemu_10.0.0.bb1
-rw-r--r--meta/recipes-devtools/rpm-sequoia/files/0001-Use-optional-env-vars-to-force-runtime-paths-in-test.patch35
-rw-r--r--meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.7.0.bb26
-rw-r--r--meta/recipes-devtools/rpm/rpm_4.20.0.bb4
-rw-r--r--meta/recipes-devtools/rust/files/rust-oe-selftest.patch44
-rw-r--r--meta/recipes-devtools/rust/rust_1.85.1.bb18
-rw-r--r--meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb5
-rw-r--r--meta/recipes-devtools/valgrind/valgrind/0001-Use-portable-syntax-for-pushsection-directive-in-inl.patch31
-rw-r--r--meta/recipes-devtools/valgrind/valgrind_3.25.1.bb (renamed from meta/recipes-devtools/valgrind/valgrind_3.25.0.bb)11
-rw-r--r--meta/recipes-extended/iputils/iputils/CVE-2025-47268.patch143
-rw-r--r--meta/recipes-extended/iputils/iputils_20240905.bb4
-rw-r--r--meta/recipes-extended/less/less_678.bb (renamed from meta/recipes-extended/less/less_668.bb)4
-rw-r--r--meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch42
-rw-r--r--meta/recipes-extended/ltp/ltp_20250130.bb1
-rw-r--r--meta/recipes-extended/man-pages/man-pages_6.14.bb (renamed from meta/recipes-extended/man-pages/man-pages_6.13.bb)2
-rw-r--r--meta/recipes-extended/zip/zip-3.0/0001-fileio.c-fix-a-buffer-overflow-detected-issue.patch38
-rw-r--r--meta/recipes-extended/zip/zip_3.0.bb1
-rw-r--r--meta/recipes-graphics/mesa/files/0001-clover-Don-t-include-libclc-headers.patch143
-rw-r--r--meta/recipes-graphics/mesa/files/0001-dont-build-clover-frontend.patch29
-rw-r--r--meta/recipes-graphics/mesa/files/0001-gallium-clover-Do-not-use-LLVM_LIBRARY_DIR-for-FALLB.patch34
-rw-r--r--meta/recipes-graphics/mesa/files/0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch57
-rw-r--r--meta/recipes-graphics/mesa/mesa.inc126
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch26
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples/0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch30
-rw-r--r--meta/recipes-graphics/vulkan/vulkan-samples_git.bb4
-rw-r--r--meta/recipes-graphics/xorg-lib/libxcvt_0.1.3.bb2
-rw-r--r--meta/recipes-graphics/xorg-xserver/xserver-xorg.inc4
-rw-r--r--meta/recipes-graphics/xwayland/xwayland_24.1.6.bb4
-rw-r--r--meta/recipes-kernel/cryptodev/cryptodev-linux_1.14.bb3
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools/0001-ppc-fs2dt-Match-function-signatures.patch31
-rw-r--r--meta/recipes-kernel/kexec/kexec-tools_2.0.31.bb4
-rw-r--r--meta/recipes-kernel/linux-firmware/linux-firmware_20250509.bb (renamed from meta/recipes-kernel/linux-firmware/linux-firmware_20250410.bb)9
-rw-r--r--meta/recipes-kernel/linux/cve-exclusion.inc2
-rw-r--r--meta/recipes-kernel/linux/kernel-devsrc.bb3
-rw-r--r--meta/recipes-kernel/lttng/babeltrace2/0001-Make-bt_field_blob_get_length-return-size_t-instead-.patch23
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools/0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch55
-rw-r--r--meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb1
-rw-r--r--meta/recipes-kernel/perf/perf.bb10
-rw-r--r--meta/recipes-kernel/systemtap/systemtap_git.bb3
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch26
-rw-r--r--meta/recipes-multimedia/gstreamer/gst-examples_1.26.1.bb (renamed from meta/recipes-multimedia/gstreamer/gst-examples_1.18.6.bb)8
-rw-r--r--meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch22
-rw-r--r--meta/recipes-multimedia/pulseaudio/pulseaudio.inc8
-rw-r--r--meta/recipes-multimedia/sbc/sbc_2.1.bb2
-rw-r--r--meta/recipes-sato/webkit/webkitgtk_2.48.1.bb2
-rw-r--r--meta/recipes-support/boost/boost.inc1
-rw-r--r--meta/recipes-support/ca-certificates/ca-certificates_20250419.bb3
-rw-r--r--meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch10
-rw-r--r--meta/recipes-support/libcap/libcap_2.76.bb (renamed from meta/recipes-support/libcap/libcap_2.75.bb)2
-rw-r--r--meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch8
-rw-r--r--meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch49
-rw-r--r--meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch9
-rw-r--r--meta/recipes-support/libgcrypt/files/no-bench-slope.patch10
-rw-r--r--meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch10
-rw-r--r--meta/recipes-support/libgcrypt/libgcrypt_1.11.1.bb (renamed from meta/recipes-support/libgcrypt/libgcrypt_1.11.0.bb)3
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4/0001-CVE-2025-32911.patch74
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4/0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch44
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4/0001-Fix-possibly-uninitialized-warnings.patch43
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4/0001-Remove-http-and-https-aliases-support-test.patch145
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-1.patch37
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-2.patch43
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-3.patch48
-rw-r--r--meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb66
-rw-r--r--meta/recipes-support/libunwind/libunwind_1.8.1.bb2
204 files changed, 2221 insertions, 2421 deletions
diff --git a/meta/classes-global/insane.bbclass b/meta/classes-global/insane.bbclass
index cd26bf5eb9..152bef8ad5 100644
--- a/meta/classes-global/insane.bbclass
+++ b/meta/classes-global/insane.bbclass
@@ -1332,6 +1332,13 @@ python do_qa_patch() {
1332 elif os.path.exists(os.path.join(srcdir, "Makefile.in")) and (match_line_in_files(srcdir, "**/Makefile.in", r'\s*TESTS\s*\+?=') or match_line_in_files(srcdir,"**/*.at",r'.*AT_INIT')): 1332 elif os.path.exists(os.path.join(srcdir, "Makefile.in")) and (match_line_in_files(srcdir, "**/Makefile.in", r'\s*TESTS\s*\+?=') or match_line_in_files(srcdir,"**/*.at",r'.*AT_INIT')):
1333 oe.qa.handle_error("unimplemented-ptest", "%s: autotools-based tests detected" % d.getVar('PN'), d) 1333 oe.qa.handle_error("unimplemented-ptest", "%s: autotools-based tests detected" % d.getVar('PN'), d)
1334 1334
1335 # Detect cargo-based tests
1336 elif os.path.exists(os.path.join(srcdir, "Cargo.toml")) and (
1337 match_line_in_files(srcdir, "**/*.rs", r'\s*#\s*\[\s*test\s*\]') or
1338 match_line_in_files(srcdir, "**/*.rs", r'\s*#\s*\[\s*cfg\s*\(\s*test\s*\)\s*\]')
1339 ):
1340 oe.qa.handle_error("unimplemented-ptest", "%s: cargo-based tests detected" % d.getVar('PN'), d)
1341
1335 # Last resort, detect a test directory in sources 1342 # Last resort, detect a test directory in sources
1336 elif os.path.exists(srcdir) and any(filename.lower() in ["test", "tests"] for filename in os.listdir(srcdir)): 1343 elif os.path.exists(srcdir) and any(filename.lower() in ["test", "tests"] for filename in os.listdir(srcdir)):
1337 oe.qa.handle_error("unimplemented-ptest", "%s: test subdirectory detected" % d.getVar('PN'), d) 1344 oe.qa.handle_error("unimplemented-ptest", "%s: test subdirectory detected" % d.getVar('PN'), d)
diff --git a/meta/classes-recipe/kernel-module-split.bbclass b/meta/classes-recipe/kernel-module-split.bbclass
index 9487365eb7..a2d81f18e2 100644
--- a/meta/classes-recipe/kernel-module-split.bbclass
+++ b/meta/classes-recipe/kernel-module-split.bbclass
@@ -99,9 +99,12 @@ python split_kernel_module_packages () {
99 bb.warn("module_autoload_%s was replaced by KERNEL_MODULE_AUTOLOAD for cases where basename == module name, please drop it" % basename) 99 bb.warn("module_autoload_%s was replaced by KERNEL_MODULE_AUTOLOAD for cases where basename == module name, please drop it" % basename)
100 if autoload and basename not in autoloadlist: 100 if autoload and basename not in autoloadlist:
101 bb.warn("module_autoload_%s is defined but '%s' isn't included in KERNEL_MODULE_AUTOLOAD, please add it there" % (basename, basename)) 101 bb.warn("module_autoload_%s is defined but '%s' isn't included in KERNEL_MODULE_AUTOLOAD, please add it there" % (basename, basename))
102
103 # The .conf file can either be installed by a recipe or generated from module_autoload_*
104 conf = '%s/%s.conf' % (d.getVar('modulesloaddir'), basename)
105 name = '%s%s' % (dvar, conf)
106 # If module name is in KERNEL_MODULE_AUTOLOAD, then generate the .conf file and write to `name`.
102 if basename in autoloadlist: 107 if basename in autoloadlist:
103 conf = '%s/%s.conf' % (d.getVar('modulesloaddir'), basename)
104 name = '%s%s' % (dvar, conf)
105 os.makedirs(os.path.dirname(name), exist_ok=True) 108 os.makedirs(os.path.dirname(name), exist_ok=True)
106 with open(name, 'w') as f: 109 with open(name, 'w') as f:
107 if autoload: 110 if autoload:
@@ -109,6 +112,9 @@ python split_kernel_module_packages () {
109 f.write('%s\n' % m) 112 f.write('%s\n' % m)
110 else: 113 else:
111 f.write('%s\n' % basename) 114 f.write('%s\n' % basename)
115 # If the .conf file exits, then add it to FILES:* and CONFFILES:* and add postinstall hook.
116 # It doesn't matter if it was generated from module_autoload_* or installed by the recipe.
117 if os.path.exists(name):
112 conf2append = ' %s' % conf 118 conf2append = ' %s' % conf
113 d.appendVar('FILES:%s' % pkg, conf2append) 119 d.appendVar('FILES:%s' % pkg, conf2append)
114 d.appendVar('CONFFILES:%s' % pkg, conf2append) 120 d.appendVar('CONFFILES:%s' % pkg, conf2append)
@@ -121,19 +127,24 @@ python split_kernel_module_packages () {
121 # Write out any modconf fragment 127 # Write out any modconf fragment
122 modconflist = (d.getVar("KERNEL_MODULE_PROBECONF") or "").split() 128 modconflist = (d.getVar("KERNEL_MODULE_PROBECONF") or "").split()
123 modconf = d.getVar('module_conf_%s' % basename) 129 modconf = d.getVar('module_conf_%s' % basename)
130
131 # The .conf file can either be installed by a recipe or generated from module_conf_*
132 conf = '%s/%s.conf' % (d.getVar('modprobedir'), basename)
133 name = '%s%s' % (dvar, conf)
134 # If module name is in KERNEL_MODULE_PROBECONF, then generate the .conf file and write to `name`.
124 if modconf and basename in modconflist: 135 if modconf and basename in modconflist:
125 conf = '%s/%s.conf' % (d.getVar('modprobedir'), basename)
126 name = '%s%s' % (dvar, conf)
127 os.makedirs(os.path.dirname(name), exist_ok=True) 136 os.makedirs(os.path.dirname(name), exist_ok=True)
128 with open(name, 'w') as f: 137 with open(name, 'w') as f:
129 f.write("%s\n" % modconf) 138 f.write("%s\n" % modconf)
139 elif modconf:
140 bb.error("Please ensure module %s is listed in KERNEL_MODULE_PROBECONF since module_conf_%s is set" % (basename, basename))
141 # If the .conf file exits, then add it to FILES:* and CONFFILES:*.
142 # It doesn't matter if it was generated from module_conf_* or installed by the recipe.
143 if os.path.exists(name):
130 conf2append = ' %s' % conf 144 conf2append = ' %s' % conf
131 d.appendVar('FILES:%s' % pkg, conf2append) 145 d.appendVar('FILES:%s' % pkg, conf2append)
132 d.appendVar('CONFFILES:%s' % pkg, conf2append) 146 d.appendVar('CONFFILES:%s' % pkg, conf2append)
133 147
134 elif modconf:
135 bb.error("Please ensure module %s is listed in KERNEL_MODULE_PROBECONF since module_conf_%s is set" % (basename, basename))
136
137 if "description" in vals: 148 if "description" in vals:
138 old_desc = d.getVar('DESCRIPTION:' + pkg) or "" 149 old_desc = d.getVar('DESCRIPTION:' + pkg) or ""
139 d.setVar('DESCRIPTION:' + pkg, old_desc + "; " + vals["description"]) 150 d.setVar('DESCRIPTION:' + pkg, old_desc + "; " + vals["description"])
diff --git a/meta/classes-recipe/ptest-cargo.bbclass b/meta/classes-recipe/ptest-cargo.bbclass
index 7b18d43c38..ece25ff1eb 100644
--- a/meta/classes-recipe/ptest-cargo.bbclass
+++ b/meta/classes-recipe/ptest-cargo.bbclass
@@ -77,6 +77,7 @@ python do_compile_ptest_cargo() {
77 77
78python do_install_ptest_cargo() { 78python do_install_ptest_cargo() {
79 import shutil 79 import shutil
80 import textwrap
80 81
81 dest_dir = d.getVar("D") 82 dest_dir = d.getVar("D")
82 pn = d.getVar("PN") 83 pn = d.getVar("PN")
@@ -107,7 +108,16 @@ python do_install_ptest_cargo() {
107 f.write(f"\necho \"\"\n") 108 f.write(f"\necho \"\"\n")
108 f.write(f"echo \"## starting to run rust tests ##\"\n") 109 f.write(f"echo \"## starting to run rust tests ##\"\n")
109 for test_path in test_paths: 110 for test_path in test_paths:
110 f.write(f"if ! {test_path} {rust_test_args}; then rc=1; fi\n") 111 script = textwrap.dedent(f"""\
112 if ! {test_path} {rust_test_args}
113 then
114 rc=1
115 echo "FAIL: {test_path}"
116 else
117 echo "PASS: {test_path}"
118 fi
119 """)
120 f.write(script)
111 121
112 f.write("exit $rc\n") 122 f.write("exit $rc\n")
113 123
diff --git a/meta/classes-recipe/setuptools3.bbclass b/meta/classes-recipe/setuptools3.bbclass
index f19899d42e..0adce5e2ec 100644
--- a/meta/classes-recipe/setuptools3.bbclass
+++ b/meta/classes-recipe/setuptools3.bbclass
@@ -32,7 +32,6 @@ setuptools3_do_configure() {
32 32
33setuptools3_do_compile() { 33setuptools3_do_compile() {
34 cd ${SETUPTOOLS_SETUP_PATH} 34 cd ${SETUPTOOLS_SETUP_PATH}
35 NO_FETCH_BUILD=1 \
36 STAGING_INCDIR=${STAGING_INCDIR} \ 35 STAGING_INCDIR=${STAGING_INCDIR} \
37 STAGING_LIBDIR=${STAGING_LIBDIR} \ 36 STAGING_LIBDIR=${STAGING_LIBDIR} \
38 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \ 37 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \
diff --git a/meta/classes-recipe/setuptools3_legacy.bbclass b/meta/classes-recipe/setuptools3_legacy.bbclass
index 030c3d9e0e..166808a695 100644
--- a/meta/classes-recipe/setuptools3_legacy.bbclass
+++ b/meta/classes-recipe/setuptools3_legacy.bbclass
@@ -35,7 +35,6 @@ setuptools3_legacy_do_configure() {
35 35
36setuptools3_legacy_do_compile() { 36setuptools3_legacy_do_compile() {
37 cd ${SETUPTOOLS_SETUP_PATH} 37 cd ${SETUPTOOLS_SETUP_PATH}
38 NO_FETCH_BUILD=1 \
39 STAGING_INCDIR=${STAGING_INCDIR} \ 38 STAGING_INCDIR=${STAGING_INCDIR} \
40 STAGING_LIBDIR=${STAGING_LIBDIR} \ 39 STAGING_LIBDIR=${STAGING_LIBDIR} \
41 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \ 40 ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py \
diff --git a/meta/classes-recipe/testimage.bbclass b/meta/classes-recipe/testimage.bbclass
index e090b1ef4b..847a6f18a8 100644
--- a/meta/classes-recipe/testimage.bbclass
+++ b/meta/classes-recipe/testimage.bbclass
@@ -26,7 +26,9 @@ TESTIMAGE_FAILED_QA_ARTIFACTS = "\
26 ${localstatedir}/log \ 26 ${localstatedir}/log \
27 ${localstatedir}/volatile/log \ 27 ${localstatedir}/volatile/log \
28 ${sysconfdir}/version \ 28 ${sysconfdir}/version \
29 ${sysconfdir}/os-release" 29 ${sysconfdir}/os-release \
30 ${nonarch_libdir}/os-release \
31"
30 32
31# If some ptests are run and fail, retrieve corresponding directories 33# If some ptests are run and fail, retrieve corresponding directories
32TESTIMAGE_FAILED_QA_ARTIFACTS += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${libdir}/*/ptest', '', d)}" 34TESTIMAGE_FAILED_QA_ARTIFACTS += "${@bb.utils.contains('DISTRO_FEATURES', 'ptest', '${libdir}/*/ptest', '', d)}"
diff --git a/meta/classes-recipe/uboot-sign.bbclass b/meta/classes-recipe/uboot-sign.bbclass
index 76a81546e3..796c040e8b 100644
--- a/meta/classes-recipe/uboot-sign.bbclass
+++ b/meta/classes-recipe/uboot-sign.bbclass
@@ -101,6 +101,10 @@ UBOOT_FIT_TEE_IMAGE ?= "tee-raw.bin"
101# User specific settings 101# User specific settings
102UBOOT_FIT_USER_SETTINGS ?= "" 102UBOOT_FIT_USER_SETTINGS ?= ""
103 103
104# Sets the firmware property to select the image to boot first.
105# If not set, the first entry in "loadables" is used instead.
106UBOOT_FIT_CONF_FIRMWARE ?= ""
107
104# Unit name containing a list of users additional binaries to be loaded. 108# Unit name containing a list of users additional binaries to be loaded.
105# It is a comma-separated list of strings. 109# It is a comma-separated list of strings.
106UBOOT_FIT_CONF_USER_LOADABLES ?= '' 110UBOOT_FIT_CONF_USER_LOADABLES ?= ''
@@ -113,6 +117,8 @@ python() {
113 sign = d.getVar('UBOOT_SIGN_ENABLE') == '1' 117 sign = d.getVar('UBOOT_SIGN_ENABLE') == '1'
114 if d.getVar('UBOOT_FITIMAGE_ENABLE') == '1' or sign: 118 if d.getVar('UBOOT_FITIMAGE_ENABLE') == '1' or sign:
115 d.appendVar('DEPENDS', " u-boot-tools-native dtc-native") 119 d.appendVar('DEPENDS', " u-boot-tools-native dtc-native")
120 if d.getVar('FIT_GENERATE_KEYS') == '1' and sign:
121 d.appendVarFlag('do_uboot_assemble_fitimage', 'depends', ' virtual/kernel:do_kernel_generate_rsa_keys')
116} 122}
117 123
118concat_dtb() { 124concat_dtb() {
@@ -359,6 +365,7 @@ EOF
359# we want to sign it so that the SPL can verify it 365# we want to sign it so that the SPL can verify it
360uboot_fitimage_assemble() { 366uboot_fitimage_assemble() {
361 conf_loadables="\"uboot\"" 367 conf_loadables="\"uboot\""
368 conf_firmware=""
362 rm -f ${UBOOT_ITS} ${UBOOT_FITIMAGE_BINARY} 369 rm -f ${UBOOT_ITS} ${UBOOT_FITIMAGE_BINARY}
363 370
364 # First we create the ITS script 371 # First we create the ITS script
@@ -423,13 +430,17 @@ EOF
423 fi 430 fi
424 431
425 if [ -n "${UBOOT_FIT_USER_SETTINGS}" ] ; then 432 if [ -n "${UBOOT_FIT_USER_SETTINGS}" ] ; then
426 echo -e "${UBOOT_FIT_USER_SETTINGS}" >> ${UBOOT_ITS} 433 printf "%b" "${UBOOT_FIT_USER_SETTINGS}" >> ${UBOOT_ITS}
427 fi 434 fi
428 435
429 if [ -n "${UBOOT_FIT_CONF_USER_LOADABLES}" ] ; then 436 if [ -n "${UBOOT_FIT_CONF_USER_LOADABLES}" ] ; then
430 conf_loadables="${conf_loadables}${UBOOT_FIT_CONF_USER_LOADABLES}" 437 conf_loadables="${conf_loadables}${UBOOT_FIT_CONF_USER_LOADABLES}"
431 fi 438 fi
432 439
440 if [ -n "${UBOOT_FIT_CONF_FIRMWARE}" ] ; then
441 conf_firmware="firmware = \"${UBOOT_FIT_CONF_FIRMWARE}\";"
442 fi
443
433 cat << EOF >> ${UBOOT_ITS} 444 cat << EOF >> ${UBOOT_ITS}
434 }; 445 };
435 446
@@ -437,6 +448,7 @@ EOF
437 default = "conf"; 448 default = "conf";
438 conf { 449 conf {
439 description = "Boot with signed U-Boot FIT"; 450 description = "Boot with signed U-Boot FIT";
451 ${conf_firmware}
440 loadables = ${conf_loadables}; 452 loadables = ${conf_loadables};
441 fdt = "fdt"; 453 fdt = "fdt";
442 }; 454 };
diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index ee91af8796..4f09416354 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -7,8 +7,9 @@ PREFERRED_PROVIDER_virtual/xserver-xf86 ?= "xserver-xorg"
7PREFERRED_PROVIDER_virtual/libsdl2 ?= "libsdl2" 7PREFERRED_PROVIDER_virtual/libsdl2 ?= "libsdl2"
8PREFERRED_PROVIDER_virtual/libsdl2-native ?= "libsdl2-native" 8PREFERRED_PROVIDER_virtual/libsdl2-native ?= "libsdl2-native"
9PREFERRED_PROVIDER_virtual/egl ?= "mesa" 9PREFERRED_PROVIDER_virtual/egl ?= "mesa"
10PREFERRED_PROVIDER_virtual/libegl-icd ?= "mesa"
10PREFERRED_PROVIDER_virtual/libgl ?= "mesa" 11PREFERRED_PROVIDER_virtual/libgl ?= "mesa"
11PREFERRED_PROVIDER_virtual/libglx ?= "mesa" 12PREFERRED_PROVIDER_virtual/libglx-icd ?= "mesa"
12PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-native" 13PREFERRED_PROVIDER_virtual/libgl-native ?= "mesa-native"
13PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "nativesdk-mesa" 14PREFERRED_PROVIDER_virtual/nativesdk-libgl ?= "nativesdk-mesa"
14PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa" 15PREFERRED_PROVIDER_virtual/libgles1 ?= "mesa"
diff --git a/meta/conf/distro/include/distro_alias.inc b/meta/conf/distro/include/distro_alias.inc
index a938c007e8..8052464f1d 100644
--- a/meta/conf/distro/include/distro_alias.inc
+++ b/meta/conf/distro/include/distro_alias.inc
@@ -157,7 +157,6 @@ DISTRO_PN_ALIAS:pn-libpod-plainer-perl = "OSPDT"
157DISTRO_PN_ALIAS:pn-libsamplerate0 = "Meego=libsamplerate Fedora=libsamplerate OpenSuSE=libsamplerate Ubuntu=libsamplerate Mandriva=libsamplerate Debian=libsamplerate" 157DISTRO_PN_ALIAS:pn-libsamplerate0 = "Meego=libsamplerate Fedora=libsamplerate OpenSuSE=libsamplerate Ubuntu=libsamplerate Mandriva=libsamplerate Debian=libsamplerate"
158DISTRO_PN_ALIAS:pn-libsdl2 = "Fedora=sdl2 Opensuse=libsdl2 Ubuntu=libsdl2 Debian=libsdl2" 158DISTRO_PN_ALIAS:pn-libsdl2 = "Fedora=sdl2 Opensuse=libsdl2 Ubuntu=libsdl2 Debian=libsdl2"
159DISTRO_PN_ALIAS:pn-libsndfile1 = "Meego=libsndfile Fedora=libsndfile OpenSuSE=libsndfile Ubuntu=libsndfile Mandriva=libsndfile Debian=libsndfile" 159DISTRO_PN_ALIAS:pn-libsndfile1 = "Meego=libsndfile Fedora=libsndfile OpenSuSE=libsndfile Ubuntu=libsndfile Mandriva=libsndfile Debian=libsndfile"
160DISTRO_PN_ALIAS:pn-libsoup-2.4 = "Meego=libsoup Fedora=libsoup OpenSuSE=libsoup Ubuntu=libsoup2.4 Mandriva=libsoup Debian=libsoup2.4"
161DISTRO_PN_ALIAS:pn-libtelepathy = "Debian=libtelepathy2 Ubuntu=libtelepathy2" 160DISTRO_PN_ALIAS:pn-libtelepathy = "Debian=libtelepathy2 Ubuntu=libtelepathy2"
162DISTRO_PN_ALIAS:pn-libtimedate-perl = "Debian=libtimedate-perl Ubuntu=libtimedate-perl" 161DISTRO_PN_ALIAS:pn-libtimedate-perl = "Debian=libtimedate-perl Ubuntu=libtimedate-perl"
163DISTRO_PN_ALIAS:pn-liburcu = "Fedora=userspace-rcu Ubuntu=liburcu0" 162DISTRO_PN_ALIAS:pn-liburcu = "Fedora=userspace-rcu Ubuntu=liburcu0"
diff --git a/meta/conf/distro/include/maintainers.inc b/meta/conf/distro/include/maintainers.inc
index 69f6a2d284..8627f72ce7 100644
--- a/meta/conf/distro/include/maintainers.inc
+++ b/meta/conf/distro/include/maintainers.inc
@@ -400,7 +400,6 @@ RECIPE_MAINTAINER:pn-libsm = "Unassigned <unassigned@yoctoproject.org>"
400RECIPE_MAINTAINER:pn-libsndfile1 = "Unassigned <unassigned@yoctoproject.org>" 400RECIPE_MAINTAINER:pn-libsndfile1 = "Unassigned <unassigned@yoctoproject.org>"
401RECIPE_MAINTAINER:pn-libsolv = "Anuj Mittal <anuj.mittal@intel.com>" 401RECIPE_MAINTAINER:pn-libsolv = "Anuj Mittal <anuj.mittal@intel.com>"
402RECIPE_MAINTAINER:pn-libsoup = "Anuj Mittal <anuj.mittal@intel.com>" 402RECIPE_MAINTAINER:pn-libsoup = "Anuj Mittal <anuj.mittal@intel.com>"
403RECIPE_MAINTAINER:pn-libsoup-2.4 = "Anuj Mittal <anuj.mittal@intel.com>"
404RECIPE_MAINTAINER:pn-libssh2 = "Unassigned <unassigned@yoctoproject.org>" 403RECIPE_MAINTAINER:pn-libssh2 = "Unassigned <unassigned@yoctoproject.org>"
405RECIPE_MAINTAINER:pn-libssp-nonshared = "Khem Raj <raj.khem@gmail.com>" 404RECIPE_MAINTAINER:pn-libssp-nonshared = "Khem Raj <raj.khem@gmail.com>"
406RECIPE_MAINTAINER:pn-libtasn1 = "Anuj Mittal <anuj.mittal@intel.com>" 405RECIPE_MAINTAINER:pn-libtasn1 = "Anuj Mittal <anuj.mittal@intel.com>"
@@ -478,7 +477,7 @@ RECIPE_MAINTAINER:pn-linux-yocto = "Bruce Ashfield <bruce.ashfield@gmail.com>"
478RECIPE_MAINTAINER:pn-linux-yocto-dev = "Bruce Ashfield <bruce.ashfield@gmail.com>" 477RECIPE_MAINTAINER:pn-linux-yocto-dev = "Bruce Ashfield <bruce.ashfield@gmail.com>"
479RECIPE_MAINTAINER:pn-linux-yocto-rt = "Bruce Ashfield <bruce.ashfield@gmail.com>" 478RECIPE_MAINTAINER:pn-linux-yocto-rt = "Bruce Ashfield <bruce.ashfield@gmail.com>"
480RECIPE_MAINTAINER:pn-linux-yocto-tiny = "Bruce Ashfield <bruce.ashfield@gmail.com>" 479RECIPE_MAINTAINER:pn-linux-yocto-tiny = "Bruce Ashfield <bruce.ashfield@gmail.com>"
481RECIPE_MAINTAINER:pn-llvm-project-source-20.1.4 = "Khem Raj <raj.khem@gmail.com>" 480RECIPE_MAINTAINER:pn-llvm-project-source-20.1.5 = "Khem Raj <raj.khem@gmail.com>"
482RECIPE_MAINTAINER:pn-logrotate = "Yi Zhao <yi.zhao@windriver.com>" 481RECIPE_MAINTAINER:pn-logrotate = "Yi Zhao <yi.zhao@windriver.com>"
483RECIPE_MAINTAINER:pn-log4cplus = "Unassigned <unassigned@yoctoproject.org>" 482RECIPE_MAINTAINER:pn-log4cplus = "Unassigned <unassigned@yoctoproject.org>"
484RECIPE_MAINTAINER:pn-lrzsz = "Anuj Mittal <anuj.mittal@intel.com>" 483RECIPE_MAINTAINER:pn-lrzsz = "Anuj Mittal <anuj.mittal@intel.com>"
diff --git a/meta/conf/distro/include/ptest-packagelists.inc b/meta/conf/distro/include/ptest-packagelists.inc
index 710f2a8ab8..9cd7928154 100644
--- a/meta/conf/distro/include/ptest-packagelists.inc
+++ b/meta/conf/distro/include/ptest-packagelists.inc
@@ -80,6 +80,7 @@ PTESTS_FAST = "\
80 python3-webcolors \ 80 python3-webcolors \
81 qemu \ 81 qemu \
82 quilt \ 82 quilt \
83 rpm-sequoia \
83 sed \ 84 sed \
84 slang \ 85 slang \
85 wayland \ 86 wayland \
@@ -134,6 +135,10 @@ PTESTS_SLOW:remove:riscv32 = "lttng-tools strace "
134PTESTS_PROBLEMS:append:riscv32 = " lttng-tools strace" 135PTESTS_PROBLEMS:append:riscv32 = " lttng-tools strace"
135PTESTS_SLOW:append:libc-musl = " libc-test" 136PTESTS_SLOW:append:libc-musl = " libc-test"
136 137
138# These tests don't yet pass for riscv64
139PTESTS_SLOW:remove:riscv64 = "tcl tcl8 python3-cffi strace lttng-tools python3-numpy perl"
140PTESTS_PROBLEMS:append:riscv64 = " tcl tcl8 python3-cffi strace lttng-tools python3-numpy perl"
141
137# ruby \ # Timeout 142# ruby \ # Timeout
138# rt-tests \ # Needs to be checked whether it runs at all 143# rt-tests \ # Needs to be checked whether it runs at all
139# bash \ # Test outcomes are non-deterministic by design 144# bash \ # Test outcomes are non-deterministic by design
diff --git a/meta/conf/toolchain/clang.inc b/meta/conf/toolchain/clang.inc
index 0e5f0769f8..2bd4a07a86 100644
--- a/meta/conf/toolchain/clang.inc
+++ b/meta/conf/toolchain/clang.inc
@@ -23,3 +23,10 @@ PREFERRED_PROVIDER_virtual/cross-c++:class-nativesdk = "gcc-crosssdk-${SDK_SYS}"
23PREFERRED_PROVIDER_virtual/nativesdk-cross-cc = "gcc-crosssdk-${SDK_SYS}" 23PREFERRED_PROVIDER_virtual/nativesdk-cross-cc = "gcc-crosssdk-${SDK_SYS}"
24PREFERRED_PROVIDER_virtual/nativesdk-cross-c++ = "gcc-crosssdk-${SDK_SYS}" 24PREFERRED_PROVIDER_virtual/nativesdk-cross-c++ = "gcc-crosssdk-${SDK_SYS}"
25PREFERRED_PROVIDER_virtual/nativesdk-compilerlibs = "nativesdk-gcc-runtime" 25PREFERRED_PROVIDER_virtual/nativesdk-compilerlibs = "nativesdk-gcc-runtime"
26
27BASE_DEFAULT_DEPS:append:class-target = " compiler-rt"
28
29TUNE_CCARGS += "${@bb.utils.contains("DISTRO_FEATURES", "usrmerge", " --dyld-prefix=/usr", "", d)}"
30
31LDFLAGS:append:class-nativesdk:x86-64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-x86-64.so.2"
32LDFLAGS:append:class-nativesdk:aarch64 = " -Wl,-dynamic-linker,${base_libdir}/ld-linux-aarch64.so.1"
diff --git a/meta/lib/oe/rootfs.py b/meta/lib/oe/rootfs.py
index 6b56adaf03..14befac8fa 100644
--- a/meta/lib/oe/rootfs.py
+++ b/meta/lib/oe/rootfs.py
@@ -362,11 +362,12 @@ class Rootfs(object, metaclass=ABCMeta):
362 362
363 versioned_modules_dir = os.path.join(self.image_rootfs, modules_dir, kernel_ver) 363 versioned_modules_dir = os.path.join(self.image_rootfs, modules_dir, kernel_ver)
364 364
365 bb.utils.mkdirhier(versioned_modules_dir) 365 if os.path.exists(versioned_modules_dir):
366 366 bb.note("Running depmodwrapper for %s ..." % versioned_modules_dir)
367 bb.note("Running depmodwrapper for %s ..." % versioned_modules_dir) 367 if self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs, kernel_ver, kernel_package_name]):
368 if self._exec_shell_cmd(['depmodwrapper', '-a', '-b', self.image_rootfs, kernel_ver, kernel_package_name]): 368 bb.fatal("Kernel modules dependency generation failed")
369 bb.fatal("Kernel modules dependency generation failed") 369 else:
370 bb.note("Not running depmodwrapper for %s since directory does not exist" % versioned_modules_dir)
370 371
371 """ 372 """
372 Create devfs: 373 Create devfs:
diff --git a/meta/lib/oeqa/selftest/cases/reproducible.py b/meta/lib/oeqa/selftest/cases/reproducible.py
index 1e094892e9..f06027cb03 100644
--- a/meta/lib/oeqa/selftest/cases/reproducible.py
+++ b/meta/lib/oeqa/selftest/cases/reproducible.py
@@ -97,8 +97,10 @@ def compare_file(reference, test, diffutils_sysroot):
97 result.status = SAME 97 result.status = SAME
98 return result 98 return result
99 99
100def run_diffoscope(a_dir, b_dir, html_dir, max_report_size=0, **kwargs): 100def run_diffoscope(a_dir, b_dir, html_dir, max_report_size=0, max_diff_block_lines=1024, max_diff_block_lines_saved=0, **kwargs):
101 return runCmd(['diffoscope', '--no-default-limits', '--max-report-size', str(max_report_size), 101 return runCmd(['diffoscope', '--no-default-limits', '--max-report-size', str(max_report_size),
102 '--max-diff-block-lines-saved', str(max_diff_block_lines_saved),
103 '--max-diff-block-lines', str(max_diff_block_lines),
102 '--exclude-directory-metadata', 'yes', '--html-dir', html_dir, a_dir, b_dir], 104 '--exclude-directory-metadata', 'yes', '--html-dir', html_dir, a_dir, b_dir],
103 **kwargs) 105 **kwargs)
104 106
@@ -132,6 +134,11 @@ class ReproducibleTests(OESelftestTestCase):
132 # Maximum report size, in bytes 134 # Maximum report size, in bytes
133 max_report_size = 250 * 1024 * 1024 135 max_report_size = 250 * 1024 * 1024
134 136
137 # Maximum diff blocks size, in lines
138 max_diff_block_lines = 1024
139 # Maximum diff blocks size (saved in memory), in lines
140 max_diff_block_lines_saved = max_diff_block_lines
141
135 # targets are the things we want to test the reproducibility of 142 # targets are the things we want to test the reproducibility of
136 # Have to add the virtual targets manually for now as builds may or may not include them as they're exclude from world 143 # Have to add the virtual targets manually for now as builds may or may not include them as they're exclude from world
137 targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'core-image-weston', 'world', 'virtual/librpc', 'virtual/libsdl2', 'virtual/crypt'] 144 targets = ['core-image-minimal', 'core-image-sato', 'core-image-full-cmdline', 'core-image-weston', 'world', 'virtual/librpc', 'virtual/libsdl2', 'virtual/crypt']
@@ -391,6 +398,8 @@ class ReproducibleTests(OESelftestTestCase):
391 self.copy_file(os.path.join(jquery_sysroot, 'usr/share/javascript/jquery/jquery.min.js'), os.path.join(package_html_dir, 'jquery.js')) 398 self.copy_file(os.path.join(jquery_sysroot, 'usr/share/javascript/jquery/jquery.min.js'), os.path.join(package_html_dir, 'jquery.js'))
392 399
393 run_diffoscope('reproducibleA', 'reproducibleB-extended', package_html_dir, max_report_size=self.max_report_size, 400 run_diffoscope('reproducibleA', 'reproducibleB-extended', package_html_dir, max_report_size=self.max_report_size,
401 max_diff_block_lines_saved=self.max_diff_block_lines_saved,
402 max_diff_block_lines=self.max_diff_block_lines,
394 native_sysroot=diffoscope_sysroot, ignore_status=True, cwd=package_dir) 403 native_sysroot=diffoscope_sysroot, ignore_status=True, cwd=package_dir)
395 404
396 if fails: 405 if fails:
diff --git a/meta/lib/oeqa/selftest/cases/rust.py b/meta/lib/oeqa/selftest/cases/rust.py
index 1098e902fc..806ddf6982 100644
--- a/meta/lib/oeqa/selftest/cases/rust.py
+++ b/meta/lib/oeqa/selftest/cases/rust.py
@@ -86,6 +86,7 @@ class RustSelfTestSystemEmulated(OESelftestTestCase, OEPTestResultTestCase):
86 'tests/ui/abi/stack-probes-lto.rs', 86 'tests/ui/abi/stack-probes-lto.rs',
87 'tests/ui/abi/stack-probes.rs', 87 'tests/ui/abi/stack-probes.rs',
88 'tests/ui/codegen/mismatched-data-layouts.rs', 88 'tests/ui/codegen/mismatched-data-layouts.rs',
89 'tests/codegen/rust-abi-arch-specific-adjustment.rs',
89 'tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs', 90 'tests/ui/debuginfo/debuginfo-emit-llvm-ir-and-split-debuginfo.rs',
90 'tests/ui/feature-gates/version_check.rs', 91 'tests/ui/feature-gates/version_check.rs',
91 'tests/ui-fulldeps/', 92 'tests/ui-fulldeps/',
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi/0002-Do-not-treat-warnings-as-errors.patch b/meta/recipes-bsp/gnu-efi/gnu-efi/0001-Do-not-treat-warnings-as-errors.patch
index 84966c484e..0c10e66a12 100644
--- a/meta/recipes-bsp/gnu-efi/gnu-efi/0002-Do-not-treat-warnings-as-errors.patch
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi/0001-Do-not-treat-warnings-as-errors.patch
@@ -1,4 +1,4 @@
1From 89218bb3c5eb7b97987769cb4f7bf8323d35ca7e Mon Sep 17 00:00:00 2001 1From 80e17bcdf45dcf40b8f356cf68389612407b9f7b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 16 May 2024 21:38:32 +0800 3Date: Thu, 16 May 2024 21:38:32 +0800
4Subject: [PATCH] Do not treat warnings as errors 4Subject: [PATCH] Do not treat warnings as errors
@@ -15,11 +15,15 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
15 1 file changed, 1 insertion(+), 1 deletion(-) 15 1 file changed, 1 insertion(+), 1 deletion(-)
16 16
17diff --git a/Make.defaults b/Make.defaults 17diff --git a/Make.defaults b/Make.defaults
18index 1347aca..1834d1c 100755 18index 6d3cf51..23b9383 100755
19--- a/Make.defaults 19--- a/Make.defaults
20+++ b/Make.defaults 20+++ b/Make.defaults
21@@ -262,3 +262,3 @@ CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \ 21@@ -267,7 +267,7 @@ CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
22 -fno-strict-aliasing \
23 -ffreestanding -fno-stack-protector
22 else 24 else
23-CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign -Werror \ 25-CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Werror \
24+CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra -Wno-pointer-sign \ 26+CFLAGS += $(ARCH3264) -g -O2 -Wall -Wextra \
25 -fno-strict-aliasing \ 27 -fno-strict-aliasing \
28 -ffreestanding -fno-stack-protector \
29 $(if $(findstring 0,$(USING_CLANG)),-fno-merge-all-constants,)
diff --git a/meta/recipes-bsp/gnu-efi/gnu-efi_4.0.0.bb b/meta/recipes-bsp/gnu-efi/gnu-efi_4.0.1.bb
index 29d9e695a9..c93e06b96c 100644
--- a/meta/recipes-bsp/gnu-efi/gnu-efi_4.0.0.bb
+++ b/meta/recipes-bsp/gnu-efi/gnu-efi_4.0.1.bb
@@ -16,12 +16,16 @@ COMPATIBLE_HOST = "(x86_64.*|i.86.*|aarch64.*|arm.*|riscv64.*)-linux"
16COMPATIBLE_HOST:armv4 = 'null' 16COMPATIBLE_HOST:armv4 = 'null'
17 17
18SRC_URI = "git://github.com/ncroxon/gnu-efi;protocol=https;branch=master \ 18SRC_URI = "git://github.com/ncroxon/gnu-efi;protocol=https;branch=master \
19 file://0002-Do-not-treat-warnings-as-errors.patch \ 19 file://0001-Do-not-treat-warnings-as-errors.patch \
20 " 20 "
21SRCREV = "5ea320f0f01c8de8f9dd4e4e38a245608f0287dd" 21SRCREV = "00cdfa66e923ab2f6683bb52cab0d0d1a9083b16"
22 22
23S = "${WORKDIR}/git" 23S = "${WORKDIR}/git"
24 24
25# llvm-objcopy fails
26# arm-poky-linux-gnueabi-llvm-objcopy: error: 't8.so': section '.dynstr' cannot be removed because it is referenced by the section '.dynamic'
27OBJCOPY:toolchain-clang = "${HOST_PREFIX}objcopy"
28
25inherit github-releases 29inherit github-releases
26 30
27do_configure:linux-gnux32:prepend() { 31do_configure:linux-gnux32:prepend() {
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 1fe39a59d2..ffa04e415d 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -106,3 +106,7 @@ do_configure:prepend() {
106 FROM_BOOTSTRAP=1 ${S}/autogen.sh 106 FROM_BOOTSTRAP=1 ${S}/autogen.sh
107 cd ${B} 107 cd ${B}
108} 108}
109
110# | aarch64-poky-linux-clang: error: invalid argument '-mcmodel=large' only allowed with '-fno-pic'
111# see - https://bugs.gentoo.org/942843
112TOOLCHAIN:aarch64 = "gcc"
diff --git a/meta/recipes-bsp/opensbi/opensbi/0001-Makefile-Add-flag-for-reprodubility-compiler-flags.patch b/meta/recipes-bsp/opensbi/opensbi/0001-Makefile-Add-flag-for-reprodubility-compiler-flags.patch
new file mode 100644
index 0000000000..e650476f50
--- /dev/null
+++ b/meta/recipes-bsp/opensbi/opensbi/0001-Makefile-Add-flag-for-reprodubility-compiler-flags.patch
@@ -0,0 +1,49 @@
1From f4c440219f42d74bd3d6688132ea876f3f51e601 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 14 May 2025 19:50:24 -0700
4Subject: [PATCH] Makefile: Add flag for reprodubility compiler flags
5
6Provides mechanism to remove absolute paths from binaries using
7-ffile-prefix-map
8
9It will help distros (e.g. yocto based ones ) which want to ship
10the .elf files but need to scrub absolute paths in objects
11
12Upstream-Status: Submitted [https://lists.infradead.org/pipermail/opensbi/2025-May/008458.html]
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 Makefile | 7 +++++++
16 1 file changed, 7 insertions(+)
17
18diff --git a/Makefile b/Makefile
19index e90836c7..22d4ecff 100644
20--- a/Makefile
21+++ b/Makefile
22@@ -174,6 +174,11 @@ else
23 USE_LD_FLAG = -fuse-ld=bfd
24 endif
25
26+REPRODUCIBLE ?= n
27+ifeq ($(REPRODUCIBLE),y)
28+REPRODUCIBLE_FLAGS += -ffile-prefix-map=$(src_dir)=
29+endif
30+
31 # Check whether the linker supports creating PIEs
32 OPENSBI_LD_PIE := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) $(USE_LD_FLAG) -fPIE -nostdlib -Wl,-pie -x c /dev/null -o /dev/null >/dev/null 2>&1 && echo y || echo n)
33
34@@ -362,6 +367,7 @@ GENFLAGS += $(firmware-genflags-y)
35
36 CFLAGS = -g -Wall -Werror -ffreestanding -nostdlib -fno-stack-protector -fno-strict-aliasing -ffunction-sections -fdata-sections
37 CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
38+CFLAGS += $(REPRODUCIBLE_FLAGS)
39 # Optionally supported flags
40 ifeq ($(CC_SUPPORT_VECTOR),y)
41 CFLAGS += -DOPENSBI_CC_SUPPORT_VECTOR
42@@ -387,6 +393,7 @@ CPPFLAGS += $(firmware-cppflags-y)
43 ASFLAGS = -g -Wall -nostdlib
44 ASFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls
45 ASFLAGS += -fPIE
46+ASFLAGS += $(REPRODUCIBLE_FLAGS)
47 # Optionally supported flags
48 ifeq ($(CC_SUPPORT_SAVE_RESTORE),y)
49 ASFLAGS += -mno-save-restore
diff --git a/meta/recipes-bsp/opensbi/opensbi_1.6.bb b/meta/recipes-bsp/opensbi/opensbi_1.6.bb
index ed1a70d01a..c9dfcfbe4f 100644
--- a/meta/recipes-bsp/opensbi/opensbi_1.6.bb
+++ b/meta/recipes-bsp/opensbi/opensbi_1.6.bb
@@ -9,8 +9,9 @@ require opensbi-payloads.inc
9inherit deploy 9inherit deploy
10 10
11SRCREV = "bd613dd92113f683052acfb23d9dc8ba60029e0a" 11SRCREV = "bd613dd92113f683052acfb23d9dc8ba60029e0a"
12SRC_URI = "git://github.com/riscv/opensbi.git;branch=master;protocol=https" 12SRC_URI = "git://github.com/riscv/opensbi.git;branch=master;protocol=https \
13 13 file://0001-Makefile-Add-flag-for-reprodubility-compiler-flags.patch \
14"
14S = "${WORKDIR}/git" 15S = "${WORKDIR}/git"
15 16
16TARGET_DBGSRC_DIR = "/share/opensbi/*/generic/firmware/" 17TARGET_DBGSRC_DIR = "/share/opensbi/*/generic/firmware/"
@@ -18,7 +19,8 @@ TARGET_DBGSRC_DIR = "/share/opensbi/*/generic/firmware/"
18TARGET_CC_ARCH += "${LDFLAGS}" 19TARGET_CC_ARCH += "${LDFLAGS}"
19 20
20RISCV_SBI_FW_TEXT_START ??= "0x80000000" 21RISCV_SBI_FW_TEXT_START ??= "0x80000000"
21EXTRA_OEMAKE += "PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_TEXT_START=${RISCV_SBI_FW_TEXT_START}" 22EXTRA_OEMAKE += "REPRODUCIBLE=y CROSS_COMPILE=${HOST_PREFIX} ELFFLAGS="${LDFLAGS}" PLATFORM=${RISCV_SBI_PLAT} I=${D} FW_TEXT_START=${RISCV_SBI_FW_TEXT_START}"
23EXTRA_OEMAKE:append:toolchain-clang = " LLVM=y"
22# If RISCV_SBI_PAYLOAD is set then include it as a payload 24# If RISCV_SBI_PAYLOAD is set then include it as a payload
23EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_image(d)}" 25EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_image(d)}"
24EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_fdt(d)}" 26EXTRA_OEMAKE:append = " ${@riscv_get_extra_oemake_fdt(d)}"
diff --git a/meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch b/meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch
new file mode 100644
index 0000000000..62f07e707a
--- /dev/null
+++ b/meta/recipes-connectivity/connman/connman/CVE-2025-32366.patch
@@ -0,0 +1,41 @@
1From 8d3be0285f1d4667bfe85dba555c663eb3d704b4 Mon Sep 17 00:00:00 2001
2From: Yoonje Shin <ioerts@kookmin.ac.kr>
3Date: Mon, 12 May 2025 10:48:18 +0200
4Subject: [PATCH] dnsproxy: Address CVE-2025-32366 vulnerability
5
6In Connman parse_rr in dnsproxy.c has a memcpy length
7that depends on an RR RDLENGTH value (i.e., *rdlen=ntohs(rr->rdlen)
8and memcpy(response+offset,*end,*rdlen)). Here, rdlen may be larger
9than the amount of remaining packet data in the current state of
10parsing. As a result, values of stack memory locations may be sent
11over the network in a response.
12
13This patch adds a check to ensure that (*end + *rdlen) does not exceed
14the valid range. If the condition is violated, the function returns
15-EINVAL.
16
17CVE: CVE-2025-32366
18
19Upstream-Status: Backport [https://git.kernel.org/pub/scm/network/connman/connman.git/commit/?id=8d3be0285f1d4667bfe85dba555c663eb3d704b4]
20
21Signed-off-by: Praveen Kumar <praveen.kumar@windriver.com>
22---
23 src/dnsproxy.c | 3 +++
24 1 file changed, 3 insertions(+)
25
26diff --git a/src/dnsproxy.c b/src/dnsproxy.c
27index 7ee26d9..1dd2f7f 100644
28--- a/src/dnsproxy.c
29+++ b/src/dnsproxy.c
30@@ -998,6 +998,9 @@ static int parse_rr(const unsigned char *buf, const unsigned char *start,
31 if ((offset + *rdlen) > *response_size)
32 return -ENOBUFS;
33
34+ if ((*end + *rdlen) > max)
35+ return -EINVAL;
36+
37 memcpy(response + offset, *end, *rdlen);
38
39 *end += *rdlen;
40--
412.40.0
diff --git a/meta/recipes-connectivity/connman/connman_1.44.bb b/meta/recipes-connectivity/connman/connman_1.44.bb
index b25a435577..02c5be929e 100644
--- a/meta/recipes-connectivity/connman/connman_1.44.bb
+++ b/meta/recipes-connectivity/connman/connman_1.44.bb
@@ -22,6 +22,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/network/${BPN}/${BP}.tar.xz \
22 file://connman \ 22 file://connman \
23 file://0002-resolve-musl-does-not-implement-res_ninit.patch \ 23 file://0002-resolve-musl-does-not-implement-res_ninit.patch \
24 file://CVE-2025-32743.patch \ 24 file://CVE-2025-32743.patch \
25 file://CVE-2025-32366.patch \
25 " 26 "
26 27
27SRC_URI[sha256sum] = "2be2b00321632b775f9eff713acd04ef21e31fbf388f6ebf45512ff4289574ff" 28SRC_URI[sha256sum] = "2be2b00321632b775f9eff713acd04ef21e31fbf388f6ebf45512ff4289574ff"
diff --git a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
index cb6c1b4d08..99ec280b35 100644
--- a/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
+++ b/meta/recipes-connectivity/nfs-utils/nfs-utils/nfsserver
@@ -89,34 +89,14 @@ start_nfsd(){
89 start-stop-daemon --start --exec "$NFS_NFSD" -- "$@" 89 start-stop-daemon --start --exec "$NFS_NFSD" -- "$@"
90 echo done 90 echo done
91} 91}
92delay_nfsd(){
93 for delay in 0 1 2 3 4 5 6 7 8 9
94 do
95 if pidof nfsd >/dev/null
96 then
97 echo -n .
98 sleep 1
99 else
100 return 0
101 fi
102 done
103 return 1
104}
105stop_nfsd(){ 92stop_nfsd(){
106 # WARNING: this kills any process with the executable
107 # name 'nfsd'.
108 echo -n 'stopping nfsd: ' 93 echo -n 'stopping nfsd: '
109 start-stop-daemon --stop --quiet --signal 1 --name nfsd 94 $NFS_NFSD 0
110 if delay_nfsd || { 95 if pidof nfsd
111 echo failed
112 echo ' using signal 9: '
113 start-stop-daemon --stop --quiet --signal 9 --name nfsd
114 delay_nfsd
115 }
116 then 96 then
117 echo done
118 else
119 echo failed 97 echo failed
98 else
99 echo done
120 fi 100 fi
121} 101}
122 102
diff --git a/meta/recipes-connectivity/openssh/openssh/0001-regress-test-exec-use-the-absolute-path-in-the-SSH-e.patch b/meta/recipes-connectivity/openssh/openssh/0001-regress-test-exec-use-the-absolute-path-in-the-SSH-e.patch
index b90cd2e69d..360b62af34 100644
--- a/meta/recipes-connectivity/openssh/openssh/0001-regress-test-exec-use-the-absolute-path-in-the-SSH-e.patch
+++ b/meta/recipes-connectivity/openssh/openssh/0001-regress-test-exec-use-the-absolute-path-in-the-SSH-e.patch
@@ -1,4 +1,4 @@
1From fb762172fb678fe29327b667f8fe7380962a4540 Mon Sep 17 00:00:00 2001 1From 9dcccafe44ea17e972e7cddea205bbe9fe71d8d6 Mon Sep 17 00:00:00 2001
2From: Jose Quaresma <jose.quaresma@foundries.io> 2From: Jose Quaresma <jose.quaresma@foundries.io>
3Date: Mon, 15 Jul 2024 18:43:08 +0100 3Date: Mon, 15 Jul 2024 18:43:08 +0100
4Subject: [PATCH] regress/test-exec: use the absolute path in the SSH env 4Subject: [PATCH] regress/test-exec: use the absolute path in the SSH env
@@ -18,10 +18,10 @@ Signed-off-by: Jose Quaresma <jose.quaresma@foundries.io>
18 1 file changed, 5 insertions(+) 18 1 file changed, 5 insertions(+)
19 19
20diff --git a/regress/test-exec.sh b/regress/test-exec.sh 20diff --git a/regress/test-exec.sh b/regress/test-exec.sh
21index 7afc2807..175f554b 100644 21index 8a00c72..2891f27 100644
22--- a/regress/test-exec.sh 22--- a/regress/test-exec.sh
23+++ b/regress/test-exec.sh 23+++ b/regress/test-exec.sh
24@@ -175,6 +175,11 @@ if [ "x$TEST_SSH_OPENSSL" != "x" ]; then 24@@ -179,6 +179,11 @@ if [ "x$TEST_SSH_OPENSSL" != "x" ]; then
25 fi 25 fi
26 26
27 # Path to sshd must be absolute for rexec 27 # Path to sshd must be absolute for rexec
diff --git a/meta/recipes-connectivity/openssh/openssh_9.9p2.bb b/meta/recipes-connectivity/openssh/openssh_10.0p1.bb
index 5191725796..a044aec063 100644
--- a/meta/recipes-connectivity/openssh/openssh_9.9p2.bb
+++ b/meta/recipes-connectivity/openssh/openssh_10.0p1.bb
@@ -26,7 +26,7 @@ SRC_URI = "https://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/openssh-${PV}.ta
26 file://0001-regress-banner.sh-log-input-and-output-files-on-erro.patch \ 26 file://0001-regress-banner.sh-log-input-and-output-files-on-erro.patch \
27 file://0001-regress-test-exec-use-the-absolute-path-in-the-SSH-e.patch \ 27 file://0001-regress-test-exec-use-the-absolute-path-in-the-SSH-e.patch \
28 " 28 "
29SRC_URI[sha256sum] = "91aadb603e08cc285eddf965e1199d02585fa94d994d6cae5b41e1721e215673" 29SRC_URI[sha256sum] = "021a2e709a0edf4250b1256bd5a9e500411a90dddabea830ed59cef90eb9d85c"
30 30
31CVE_STATUS[CVE-2007-2768] = "not-applicable-config: This CVE is specific to OpenSSH with the pam opie which we don't build/use here." 31CVE_STATUS[CVE-2007-2768] = "not-applicable-config: This CVE is specific to OpenSSH with the pam opie which we don't build/use here."
32 32
@@ -197,7 +197,7 @@ FILES:${PN}-scp = "${bindir}/scp.${BPN}"
197FILES:${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config" 197FILES:${PN}-ssh = "${bindir}/ssh.${BPN} ${sysconfdir}/ssh/ssh_config"
198FILES:${PN}-sshd = "${sbindir}/sshd ${libexecdir}/sshd-session ${sysconfdir}/init.d/sshd ${systemd_system_unitdir}" 198FILES:${PN}-sshd = "${sbindir}/sshd ${libexecdir}/sshd-session ${sysconfdir}/init.d/sshd ${systemd_system_unitdir}"
199FILES:${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd" 199FILES:${PN}-sshd += "${sysconfdir}/ssh/moduli ${sysconfdir}/ssh/sshd_config ${sysconfdir}/ssh/sshd_config_readonly ${sysconfdir}/default/volatiles/99_sshd ${sysconfdir}/pam.d/sshd"
200FILES:${PN}-sshd += "${libexecdir}/${BPN}/sshd_check_keys" 200FILES:${PN}-sshd += "${libexecdir}/${BPN}/sshd_check_keys ${libexecdir}/sshd-auth"
201FILES:${PN}-sftp = "${bindir}/sftp" 201FILES:${PN}-sftp = "${bindir}/sftp"
202FILES:${PN}-sftp-server = "${libexecdir}/sftp-server" 202FILES:${PN}-sftp-server = "${libexecdir}/sftp-server"
203FILES:${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*" 203FILES:${PN}-misc = "${bindir}/ssh* ${libexecdir}/ssh*"
diff --git a/meta/recipes-connectivity/openssl/openssl_3.5.0.bb b/meta/recipes-connectivity/openssl/openssl_3.5.0.bb
index 865e04deb2..0f5c28dafa 100644
--- a/meta/recipes-connectivity/openssl/openssl_3.5.0.bb
+++ b/meta/recipes-connectivity/openssl/openssl_3.5.0.bb
@@ -31,6 +31,7 @@ PACKAGECONFIG[cryptodev-linux] = "enable-devcryptoeng,disable-devcryptoeng,crypt
31PACKAGECONFIG[no-tls1] = "no-tls1" 31PACKAGECONFIG[no-tls1] = "no-tls1"
32PACKAGECONFIG[no-tls1_1] = "no-tls1_1" 32PACKAGECONFIG[no-tls1_1] = "no-tls1_1"
33PACKAGECONFIG[manpages] = "" 33PACKAGECONFIG[manpages] = ""
34PACKAGECONFIG[fips] = "enable-fips"
34 35
35B = "${WORKDIR}/build" 36B = "${WORKDIR}/build"
36do_configure[cleandirs] = "${B}" 37do_configure[cleandirs] = "${B}"
@@ -52,6 +53,9 @@ EXTRA_OECONF:append:class-nativesdk = " --with-rand-seed=os,devrandom"
52EXTRA_OEMAKE:append:task-compile:class-native = ' OPENSSLDIR="/not/builtin" ENGINESDIR="/not/builtin" MODULESDIR="/not/builtin"' 53EXTRA_OEMAKE:append:task-compile:class-native = ' OPENSSLDIR="/not/builtin" ENGINESDIR="/not/builtin" MODULESDIR="/not/builtin"'
53EXTRA_OEMAKE:append:task-compile:class-nativesdk = ' OPENSSLDIR="/not/builtin" ENGINESDIR="/not/builtin" MODULESDIR="/not/builtin"' 54EXTRA_OEMAKE:append:task-compile:class-nativesdk = ' OPENSSLDIR="/not/builtin" ENGINESDIR="/not/builtin" MODULESDIR="/not/builtin"'
54 55
56#| threads_pthread.c:(.text+0x372): undefined reference to `__atomic_is_lock_free'
57EXTRA_OECONF:append:toolchain-clang:x86 = " -latomic"
58
55# This allows disabling deprecated or undesirable crypto algorithms. 59# This allows disabling deprecated or undesirable crypto algorithms.
56# The default is to trust upstream choices. 60# The default is to trust upstream choices.
57DEPRECATED_CRYPTO_FLAGS ?= "" 61DEPRECATED_CRYPTO_FLAGS ?= ""
@@ -154,7 +158,9 @@ do_compile:append () {
154} 158}
155 159
156do_install () { 160do_install () {
157 oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install_sw install_ssldirs ${@bb.utils.contains('PACKAGECONFIG', 'manpages', 'install_docs', '', d)} 161 oe_runmake DESTDIR="${D}" MANDIR="${mandir}" MANSUFFIX=ssl install_sw install_ssldirs \
162 ${@bb.utils.contains('PACKAGECONFIG', 'manpages', 'install_docs', '', d)} \
163 ${@bb.utils.contains('PACKAGECONFIG', 'fips', 'install_fips', '', d)}
158 164
159 oe_multilib_header openssl/opensslconf.h 165 oe_multilib_header openssl/opensslconf.h
160 oe_multilib_header openssl/configuration.h 166 oe_multilib_header openssl/configuration.h
@@ -172,6 +178,11 @@ do_install () {
172 ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-3/certs 178 ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/certs')} ${D}${libdir}/ssl-3/certs
173 ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-3/private 179 ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/private')} ${D}${libdir}/ssl-3/private
174 ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-3/openssl.cnf 180 ln -sf ${@oe.path.relative('${libdir}/ssl-3', '${sysconfdir}/ssl/openssl.cnf')} ${D}${libdir}/ssl-3/openssl.cnf
181
182 # Generate fipsmodule.cnf in pkg_postinst_ontarget
183 if ${@bb.utils.contains('PACKAGECONFIG', 'fips', 'true', 'false', d)}; then
184 rm -f ${D}${libdir}/ssl-3/fipsmodule.cnf
185 fi
175} 186}
176 187
177do_install:append:class-native () { 188do_install:append:class-native () {
@@ -229,12 +240,18 @@ do_install_ptest() {
229 ln -s ${libdir}/ossl-modules/ ${D}${PTEST_PATH}/providers 240 ln -s ${libdir}/ossl-modules/ ${D}${PTEST_PATH}/providers
230} 241}
231 242
243pkg_postinst_ontarget:${PN}-ossl-module-fips () {
244 if test -f ${libdir}/ossl-modules/fips.so; then
245 ${bindir}/openssl fipsinstall -out ${libdir}/ssl-3/fipsmodule.cnf -module ${libdir}/ossl-modules/fips.so
246 fi
247}
248
232# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto 249# Add the openssl.cnf file to the openssl-conf package. Make the libcrypto
233# package RRECOMMENDS on this package. This will enable the configuration 250# package RRECOMMENDS on this package. This will enable the configuration
234# file to be installed for both the openssl-bin package and the libcrypto 251# file to be installed for both the openssl-bin package and the libcrypto
235# package since the openssl-bin package depends on the libcrypto package. 252# package since the openssl-bin package depends on the libcrypto package.
236 253
237PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc ${PN}-ossl-module-legacy" 254PACKAGES =+ "libcrypto libssl openssl-conf ${PN}-engines ${PN}-misc ${PN}-ossl-module-legacy ${PN}-ossl-module-fips"
238 255
239FILES:libcrypto = "${libdir}/libcrypto${SOLIBS}" 256FILES:libcrypto = "${libdir}/libcrypto${SOLIBS}"
240FILES:libssl = "${libdir}/libssl${SOLIBS}" 257FILES:libssl = "${libdir}/libssl${SOLIBS}"
@@ -246,6 +263,7 @@ FILES:${PN}-engines = "${libdir}/engines-3"
246FILES:${PN}-engines:append:mingw32:class-nativesdk = " ${prefix}${libdir}/engines-3" 263FILES:${PN}-engines:append:mingw32:class-nativesdk = " ${prefix}${libdir}/engines-3"
247FILES:${PN}-misc = "${libdir}/ssl-3/misc ${bindir}/c_rehash" 264FILES:${PN}-misc = "${libdir}/ssl-3/misc ${bindir}/c_rehash"
248FILES:${PN}-ossl-module-legacy = "${libdir}/ossl-modules/legacy.so" 265FILES:${PN}-ossl-module-legacy = "${libdir}/ossl-modules/legacy.so"
266FILES:${PN}-ossl-module-fips = "${libdir}/ossl-modules/fips.so"
249FILES:${PN} =+ "${libdir}/ssl-3/* ${libdir}/ossl-modules/" 267FILES:${PN} =+ "${libdir}/ssl-3/* ${libdir}/ossl-modules/"
250FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh" 268FILES:${PN}:append:class-nativesdk = " ${SDKPATHNATIVE}/environment-setup.d/openssl.sh"
251 269
diff --git a/meta/recipes-core/base-files/base-files/0001-add-nss-resolve-to-nsswitch.patch b/meta/recipes-core/base-files/base-files/0001-add-nss-resolve-to-nsswitch.patch
deleted file mode 100644
index a6e39e0956..0000000000
--- a/meta/recipes-core/base-files/base-files/0001-add-nss-resolve-to-nsswitch.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 830abe652428d9d31780c3ace121635ad7b64274 Mon Sep 17 00:00:00 2001
2From: Eero Aaltonen <eero.aaltonen@vaisala.com>
3Date: Wed Sep 27 15:50:48 2023 +0300
4Subject: [PATCH] Add nss-resolve to the Name Service Switch (NSS)
5
6Add `nss-resolve` so that `systemd-resolved` is used for name
7resolution with glibc `gethostbyname` calls.
8
9Upstream-Status: Inappropriate [no upstream, configuration].
10
11Signed-off-by: Eero Aaltonen <eero.aaltonen@vaisala.com>
12---
13 nsswitch.conf | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/nsswitch.conf b/nsswitch.conf
17index 06f03d2..34b165c 100644
18--- a/nsswitch.conf
19+++ b/nsswitch.conf
20@@ -8,7 +8,7 @@ passwd: compat
21 group: compat
22 shadow: compat
23
24-hosts: files dns
25+hosts: resolve [!UNAVAIL=return] files dns
26 networks: files
27
28 protocols: db files
29--
302.25.1
31
diff --git a/meta/recipes-core/base-files/base-files/nsswitch-resolved.conf b/meta/recipes-core/base-files/base-files/nsswitch-resolved.conf
new file mode 100644
index 0000000000..ec6ce156b5
--- /dev/null
+++ b/meta/recipes-core/base-files/base-files/nsswitch-resolved.conf
@@ -0,0 +1,20 @@
1# /etc/nsswitch.conf
2#
3# Example configuration of GNU Name Service Switch functionality.
4# If you have the `glibc-doc' and `info' packages installed, try:
5# `info libc "Name Service Switch"' for information about this file.
6
7passwd: compat
8group: compat
9shadow: compat
10gshadow: files
11
12hosts: resolve [!UNAVAIL=return] files dns
13networks: files
14
15protocols: db files
16services: db files
17ethers: db files
18rpc: db files
19
20netgroup: nis
diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb b/meta/recipes-core/base-files/base-files_3.0.14.bb
index 60253fcd42..59b084d141 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -11,6 +11,7 @@ LIC_FILES_CHKSUM = "file://licenses/GPL-2;md5=94d55d512a9ba36caa9b7df079bae19f"
11 11
12SRC_URI = "file://rotation \ 12SRC_URI = "file://rotation \
13 file://nsswitch.conf \ 13 file://nsswitch.conf \
14 file://nsswitch-resolved.conf \
14 file://motd \ 15 file://motd \
15 file://hosts \ 16 file://hosts \
16 file://host.conf \ 17 file://host.conf \
@@ -23,7 +24,6 @@ SRC_URI = "file://rotation \
23 file://share/dot.profile \ 24 file://share/dot.profile \
24 file://licenses/GPL-2 \ 25 file://licenses/GPL-2 \
25 " 26 "
26SRC_URI:append:libc-glibc = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd systemd-resolved', ' file://0001-add-nss-resolve-to-nsswitch.patch', '', d)}"
27 27
28S = "${WORKDIR}/sources" 28S = "${WORKDIR}/sources"
29UNPACKDIR = "${S}" 29UNPACKDIR = "${S}"
@@ -124,7 +124,7 @@ do_install () {
124} 124}
125 125
126do_install:append:libc-glibc () { 126do_install:append:libc-glibc () {
127 install -m 0644 ${S}/nsswitch.conf ${D}${sysconfdir}/nsswitch.conf 127 install -m 0644 ${S}/${@bb.utils.contains('DISTRO_FEATURES', 'systemd systemd-resolved', 'nsswitch-resolved.conf', 'nsswitch.conf', d)} ${D}${sysconfdir}/nsswitch.conf
128} 128}
129 129
130DISTRO_VERSION[vardepsexclude] += "DATE" 130DISTRO_VERSION[vardepsexclude] += "DATE"
diff --git a/meta/recipes-core/busybox/busybox/0001-hwclock-Check-for-SYS_settimeofday-before-calling-sy.patch b/meta/recipes-core/busybox/busybox/0001-hwclock-Check-for-SYS_settimeofday-before-calling-sy.patch
new file mode 100644
index 0000000000..11ef2b6824
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox/0001-hwclock-Check-for-SYS_settimeofday-before-calling-sy.patch
@@ -0,0 +1,52 @@
1From 4e1eafc6e0de3e58cac9f62e57b552eddb50ca8e Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 7 Mar 2021 17:30:24 -0800
4Subject: [PATCH] hwclock: Check for SYS_settimeofday before calling syscall
5
6Some newer architectures e.g. RISCV32 have 64bit time_t from get go and
7thusly do not have gettimeofday_time64/settimeofday_time64 implemented
8therefore check for SYS_settimeofday definition before making the
9syscall. Fixes build for riscv32 and it will bail out at runtime.
10
11This issue has been discussed on the musl mailing list, and
12the musl developers' opinion is that Busybox is wrong:
13
14https://www.openwall.com/lists/musl/2024/03/03/2
15https://www.openwall.com/lists/musl/2024/04/07/2
16
17The correct fix isn't clear, and in the mean time, the patch
18turns the build issue into a runtime error only on the problematic
19architecture (riscv32), which seems like a reasonable trade-off
20
21Upstream-Status: Submitted [http://lists.busybox.net/pipermail/busybox/2021-March/088583.html]]
22Signed-off-by: Khem Raj <raj.khem@gmail.com>
23---
24 util-linux/hwclock.c | 7 +++++--
25 1 file changed, 5 insertions(+), 2 deletions(-)
26
27diff --git a/util-linux/hwclock.c b/util-linux/hwclock.c
28index c3fd0eb57..dea9c9a55 100644
29--- a/util-linux/hwclock.c
30+++ b/util-linux/hwclock.c
31@@ -132,6 +132,7 @@ static void show_clock(const char **pp_rtcname, int utc)
32
33 static void set_kernel_tz(const struct timezone *tz)
34 {
35+ int ret = 1;
36 #if LIBC_IS_MUSL
37 /* musl libc does not pass tz argument to syscall
38 * because "it's deprecated by POSIX, therefore it's fine
39@@ -140,9 +141,11 @@ static void set_kernel_tz(const struct timezone *tz)
40 #if !defined(SYS_settimeofday) && defined(SYS_settimeofday_time32)
41 # define SYS_settimeofday SYS_settimeofday_time32
42 #endif
43- int ret = syscall(SYS_settimeofday, NULL, tz);
44+#if defined(SYS_settimeofday)
45+ ret = syscall(SYS_settimeofday, NULL, tz);
46+#endif
47 #else
48- int ret = settimeofday(NULL, tz);
49+ ret = settimeofday(NULL, tz);
50 #endif
51 if (ret)
52 bb_simple_perror_msg_and_die("settimeofday");
diff --git a/meta/recipes-core/busybox/busybox_1.37.0.bb b/meta/recipes-core/busybox/busybox_1.37.0.bb
index 85f22ada53..9f7ded3354 100644
--- a/meta/recipes-core/busybox/busybox_1.37.0.bb
+++ b/meta/recipes-core/busybox/busybox_1.37.0.bb
@@ -54,6 +54,7 @@ SRC_URI = "https://busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
54 file://0002-start-stop-daemon-fix-tests.patch \ 54 file://0002-start-stop-daemon-fix-tests.patch \
55 file://0003-start-stop-false.patch \ 55 file://0003-start-stop-false.patch \
56 file://0001-archival-disallow-path-traversals-CVE-2023-39810.patch \ 56 file://0001-archival-disallow-path-traversals-CVE-2023-39810.patch \
57 file://0001-hwclock-Check-for-SYS_settimeofday-before-calling-sy.patch \
57 " 58 "
58SRC_URI:append:libc-musl = " file://musl.cfg" 59SRC_URI:append:libc-musl = " file://musl.cfg"
59SRC_URI:append:x86-64 = " file://sha_accel.cfg" 60SRC_URI:append:x86-64 = " file://sha_accel.cfg"
diff --git a/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch b/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch
deleted file mode 100644
index 97a6357ab9..0000000000
--- a/meta/recipes-core/coreutils/coreutils/0001-local.mk-fix-cross-compiling-problem.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From 7cb2d20cfa2a27191255031d231cd41917dcffe8 Mon Sep 17 00:00:00 2001
2From: Chen Qi <Qi.Chen@windriver.com>
3Date: Mon, 26 Dec 2016 16:10:35 +0800
4Subject: [PATCH] local.mk: fix cross compiling problem
5
6We meet the following error when cross compiling.
7| Makefile:3418: *** Recursive variable 'INSTALL' references itself (eventually). Stop.
8This patch fixes this problem.
9
10Upstream-Status: Pending
11
12Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
13---
14 src/local.mk | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
16
17diff --git a/src/local.mk b/src/local.mk
18index 96ee941..cdd47d6 100644
19--- a/src/local.mk
20+++ b/src/local.mk
21@@ -704,4 +704,4 @@ cu_install_program = @INSTALL@
22 else
23 cu_install_program = src/ginstall
24 endif
25-INSTALL = $(cu_install_program) -c
26+INSTALL_PROGRAM = $(cu_install_program)
diff --git a/meta/recipes-core/coreutils/coreutils_9.6.bb b/meta/recipes-core/coreutils/coreutils_9.6.bb
index 6e1867f3e4..a966c4b448 100644
--- a/meta/recipes-core/coreutils/coreutils_9.6.bb
+++ b/meta/recipes-core/coreutils/coreutils_9.6.bb
@@ -15,7 +15,6 @@ inherit autotools gettext texinfo
15 15
16SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \ 16SRC_URI = "${GNU_MIRROR}/coreutils/${BP}.tar.xz \
17 file://remove-usr-local-lib-from-m4.patch \ 17 file://remove-usr-local-lib-from-m4.patch \
18 file://0001-local.mk-fix-cross-compiling-problem.patch \
19 file://intermittent-testfailure.patch \ 18 file://intermittent-testfailure.patch \
20 file://0001-ls-fix-crash-with-context.patch \ 19 file://0001-ls-fix-crash-with-context.patch \
21 file://0001-cksum-port-to-32-bit-uint_fast32_t.patch \ 20 file://0001-cksum-port-to-32-bit-uint_fast32_t.patch \
@@ -184,7 +183,6 @@ RRECOMMENDS:${PN}-dev += "${DEVDEPS}"
184do_install_ptest () { 183do_install_ptest () {
185 install -d ${D}${PTEST_PATH}/tests 184 install -d ${D}${PTEST_PATH}/tests
186 cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests 185 cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests
187 sed -i 's/ginstall/install/g' `grep -R ginstall ${D}${PTEST_PATH}/tests | awk -F: '{print $1}' | uniq`
188 install -d ${D}${PTEST_PATH}/build-aux 186 install -d ${D}${PTEST_PATH}/build-aux
189 install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/ 187 install ${S}/build-aux/test-driver ${D}${PTEST_PATH}/build-aux/
190 install -Dm 0644 ${B}/lib/config.h ${D}${PTEST_PATH}/lib/config.h 188 install -Dm 0644 ${B}/lib/config.h ${D}${PTEST_PATH}/lib/config.h
@@ -198,7 +196,6 @@ do_install_ptest () {
198 sed -i '/^abs_srcdir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile 196 sed -i '/^abs_srcdir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile
199 sed -i '/^abs_top_builddir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile 197 sed -i '/^abs_top_builddir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile
200 sed -i '/^abs_top_srcdir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile 198 sed -i '/^abs_top_srcdir/s/= .*$/= \$\{PWD\}/g' ${D}${PTEST_PATH}/Makefile
201 sed -i '/^built_programs/s/ginstall/install/g' ${D}${PTEST_PATH}/Makefile
202 sed -i '/^CC =/s/ --sysroot=.*recipe-sysroot/ /g' ${D}${PTEST_PATH}/Makefile 199 sed -i '/^CC =/s/ --sysroot=.*recipe-sysroot/ /g' ${D}${PTEST_PATH}/Makefile
203 sed -i '/^BUILD_LDFLAGS =/d' ${D}${PTEST_PATH}/Makefile 200 sed -i '/^BUILD_LDFLAGS =/d' ${D}${PTEST_PATH}/Makefile
204 chmod -R 777 ${D}${PTEST_PATH} 201 chmod -R 777 ${D}${PTEST_PATH}
@@ -211,7 +208,14 @@ do_install_ptest () {
211 208
212 # Tweak test d_type-check to use python3 instead of python 209 # Tweak test d_type-check to use python3 instead of python
213 sed -i "1s@.*@#!/usr/bin/python3@" ${D}${PTEST_PATH}/tests/d_type-check 210 sed -i "1s@.*@#!/usr/bin/python3@" ${D}${PTEST_PATH}/tests/d_type-check
214 211
212 # Fix for single-binary
213 for prog in ${D}${PTEST_PATH}/src/*; do
214 if [ -f $prog ]; then
215 sed -i "1s@#!.*/src/coreutils @#!${bindir}/coreutils @" $prog
216 fi
217 done
218
215 # handle multilib 219 # handle multilib
216 sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest 220 sed -i s:@libdir@:${libdir}:g ${D}${PTEST_PATH}/run-ptest
217} 221}
diff --git a/meta/recipes-core/dropbear/dropbear/0001-Fix-proxycmd-without-netcat.patch b/meta/recipes-core/dropbear/dropbear/0001-Fix-proxycmd-without-netcat.patch
new file mode 100644
index 0000000000..967b66322f
--- /dev/null
+++ b/meta/recipes-core/dropbear/dropbear/0001-Fix-proxycmd-without-netcat.patch
@@ -0,0 +1,74 @@
1From 5cc0127000db5f7567b54d0495fb91a8e452fe09 Mon Sep 17 00:00:00 2001
2From: Konstantin Demin <rockdrilla@gmail.com>
3Date: Fri, 9 May 2025 22:39:35 +0300
4Subject: [PATCH] Fix proxycmd without netcat
5
6fixes e5a0ef27c2 "Execute multihop commands directly, no shell"
7
8Signed-off-by: Konstantin Demin <rockdrilla@gmail.com>
9
10Upstream-Status: Backport [https://github.com/mkj/dropbear/commit/5cc0127000db5f7567b54d0495fb91a8e452fe09]
11Signed-off-by: Peter Marko <peter.marko@siemens.com>
12---
13 src/cli-main.c | 12 +++++++++++-
14 1 file changed, 11 insertions(+), 1 deletion(-)
15
16diff --git a/src/cli-main.c b/src/cli-main.c
17index 2fafa88..0a052a3 100644
18--- a/src/cli-main.c
19+++ b/src/cli-main.c
20@@ -77,7 +77,11 @@ int main(int argc, char ** argv) {
21 }
22
23 #if DROPBEAR_CLI_PROXYCMD
24- if (cli_opts.proxycmd || cli_opts.proxyexec) {
25+ if (cli_opts.proxycmd
26+#if DROPBEAR_CLI_MULTIHOP
27+ || cli_opts.proxyexec
28+#endif
29+ ) {
30 cli_proxy_cmd(&sock_in, &sock_out, &proxy_cmd_pid);
31 if (signal(SIGINT, kill_proxy_sighandler) == SIG_ERR ||
32 signal(SIGTERM, kill_proxy_sighandler) == SIG_ERR ||
33@@ -110,11 +114,13 @@ static void shell_proxy_cmd(const void *user_data_cmd) {
34 dropbear_exit("Failed to run '%s'\n", cmd);
35 }
36
37+#if DROPBEAR_CLI_MULTIHOP
38 static void exec_proxy_cmd(const void *unused) {
39 (void)unused;
40 run_command(cli_opts.proxyexec[0], cli_opts.proxyexec, ses.maxfd);
41 dropbear_exit("Failed to run '%s'\n", cli_opts.proxyexec[0]);
42 }
43+#endif
44
45 static void cli_proxy_cmd(int *sock_in, int *sock_out, pid_t *pid_out) {
46 char * cmd_arg = NULL;
47@@ -145,9 +151,11 @@ static void cli_proxy_cmd(int *sock_in, int *sock_out, pid_t *pid_out) {
48 cmd_arg = m_malloc(shell_cmdlen);
49 snprintf(cmd_arg, shell_cmdlen, "exec %s", cli_opts.proxycmd);
50 exec_fn = shell_proxy_cmd;
51+#if DROPBEAR_CLI_MULTIHOP
52 } else {
53 /* No shell */
54 exec_fn = exec_proxy_cmd;
55+#endif
56 }
57
58 ret = spawn_command(exec_fn, cmd_arg, sock_out, sock_in, NULL, pid_out);
59@@ -159,6 +167,7 @@ static void cli_proxy_cmd(int *sock_in, int *sock_out, pid_t *pid_out) {
60 cleanup:
61 m_free(cli_opts.proxycmd);
62 m_free(cmd_arg);
63+#if DROPBEAR_CLI_MULTIHOP
64 if (cli_opts.proxyexec) {
65 char **a = NULL;
66 for (a = cli_opts.proxyexec; *a; a++) {
67@@ -166,6 +175,7 @@ cleanup:
68 }
69 m_free(cli_opts.proxyexec);
70 }
71+#endif
72 }
73
74 static void kill_proxy_sighandler(int UNUSED(signo)) {
diff --git a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
index 9c1dd3f606..0687e5dab1 100644
--- a/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
+++ b/meta/recipes-core/dropbear/dropbear/0001-urandom-xauth-changes-to-options.h.patch
@@ -12,7 +12,7 @@ diff --git a/src/default_options.h b/src/default_options.h
12index 6e970bb..ccc8b47 100644 12index 6e970bb..ccc8b47 100644
13--- a/src/default_options.h 13--- a/src/default_options.h
14+++ b/src/default_options.h 14+++ b/src/default_options.h
15@@ -311,7 +311,7 @@ group1 in Dropbear server too */ 15@@ -317,7 +317,7 @@ group1 in Dropbear server too */
16 16
17 /* The command to invoke for xauth when using X11 forwarding. 17 /* The command to invoke for xauth when using X11 forwarding.
18 * "-q" for quiet */ 18 * "-q" for quiet */
diff --git a/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch b/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch
deleted file mode 100644
index a20781d31d..0000000000
--- a/meta/recipes-core/dropbear/dropbear/dropbear-disable-weak-ciphers.patch
+++ /dev/null
@@ -1,28 +0,0 @@
1From c8a0c8e87b772576f3a431c3b4cacaf5aa001dcc Mon Sep 17 00:00:00 2001
2From: Joseph Reynolds <joseph.reynolds1@ibm.com>
3Date: Thu, 20 Jun 2019 16:29:15 -0500
4Subject: [PATCH] dropbear: new feature: disable-weak-ciphers
5
6This feature disables all CBC, SHA1, and diffie-hellman group1 ciphers
7in the dropbear ssh server and client since they're considered weak ciphers
8and we want to support the stong algorithms.
9
10Upstream-Status: Inappropriate [configuration]
11Signed-off-by: Joseph Reynolds <joseph.reynolds1@ibm.com>
12---
13 src/default_options.h | 2 +-
14 1 file changed, 1 insertion(+), 1 deletion(-)
15
16diff --git a/src/default_options.h b/src/default_options.h
17index 12768d1..2b07497 100644
18--- a/src/default_options.h
19+++ b/src/default_options.h
20@@ -197,7 +197,7 @@ IMPORTANT: Some options will require "make clean" after changes */
21 * Small systems should generally include either curve25519 or ecdh for performance.
22 * curve25519 is less widely supported but is faster
23 */
24-#define DROPBEAR_DH_GROUP14_SHA1 1
25+#define DROPBEAR_DH_GROUP14_SHA1 0
26 #define DROPBEAR_DH_GROUP14_SHA256 1
27 #define DROPBEAR_DH_GROUP16 0
28 #define DROPBEAR_CURVE25519 1
diff --git a/meta/recipes-core/dropbear/dropbear_2024.86.bb b/meta/recipes-core/dropbear/dropbear_2025.88.bb
index be246a0ccd..f203763b17 100644
--- a/meta/recipes-core/dropbear/dropbear_2024.86.bb
+++ b/meta/recipes-core/dropbear/dropbear_2025.88.bb
@@ -19,11 +19,12 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
19 file://dropbear@.service \ 19 file://dropbear@.service \
20 file://dropbear.socket \ 20 file://dropbear.socket \
21 file://dropbear.default \ 21 file://dropbear.default \
22 file://0001-Fix-proxycmd-without-netcat.patch \
22 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \ 23 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', '${PAM_SRC_URI}', '', d)} \
23 ${@bb.utils.contains('PACKAGECONFIG', 'disable-weak-ciphers', 'file://dropbear-disable-weak-ciphers.patch', '', d)} \
24 " 24 "
25 25
26SRC_URI[sha256sum] = "e78936dffc395f2e0db099321d6be659190966b99712b55c530dd0a1822e0a5e" 26SRC_URI[sha256sum] = "783f50ea27b17c16da89578fafdb6decfa44bb8f6590e5698a4e4d3672dc53d4"
27MIRRORS += "http://matt.ucc.asn.au/dropbear/releases/ https://dropbear.nl/mirror/releases/"
27 28
28PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \ 29PAM_SRC_URI = "file://0005-dropbear-enable-pam.patch \
29 file://0006-dropbear-configuration-file.patch \ 30 file://0006-dropbear-configuration-file.patch \
@@ -47,10 +48,9 @@ SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
47BINCOMMANDS = "dbclient ssh scp" 48BINCOMMANDS = "dbclient ssh scp"
48EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"' 49EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
49 50
50PACKAGECONFIG ?= "disable-weak-ciphers ${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}" 51PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)}"
51PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam,${PAM_PLUGINS}" 52PACKAGECONFIG[pam] = "--enable-pam,--disable-pam,libpam,${PAM_PLUGINS}"
52PACKAGECONFIG[system-libtom] = "--disable-bundled-libtom,--enable-bundled-libtom,libtommath libtomcrypt" 53PACKAGECONFIG[system-libtom] = "--disable-bundled-libtom,--enable-bundled-libtom,libtommath libtomcrypt"
53PACKAGECONFIG[disable-weak-ciphers] = ""
54PACKAGECONFIG[enable-x11-forwarding] = "" 54PACKAGECONFIG[enable-x11-forwarding] = ""
55 55
56# This option appends to CFLAGS and LDFLAGS from OE 56# This option appends to CFLAGS and LDFLAGS from OE
diff --git a/meta/recipes-core/glib-2.0/glib-2.0-initial_2.84.1.bb b/meta/recipes-core/glib-2.0/glib-2.0-initial_2.84.2.bb
index acec7e9676..acec7e9676 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0-initial_2.84.1.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0-initial_2.84.2.bb
diff --git a/meta/recipes-core/glib-2.0/glib-2.0_2.84.1.bb b/meta/recipes-core/glib-2.0/glib-2.0_2.84.2.bb
index ef80cc47cf..ef80cc47cf 100644
--- a/meta/recipes-core/glib-2.0/glib-2.0_2.84.1.bb
+++ b/meta/recipes-core/glib-2.0/glib-2.0_2.84.2.bb
diff --git a/meta/recipes-core/glib-2.0/glib.inc b/meta/recipes-core/glib-2.0/glib.inc
index d00bfe4c65..38e75aab61 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -234,7 +234,7 @@ SRC_URI:append:class-native = " file://relocate-modules.patch \
234 file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \ 234 file://0001-meson.build-do-not-enable-pidfd-features-on-native-g.patch \
235 " 235 "
236 236
237SRC_URI[sha256sum] = "2b4bc2ec49611a5fc35f86aca855f2ed0196e69e53092bab6bb73396bf30789a" 237SRC_URI[sha256sum] = "88e960dd937057407d61fcb3b45a860704b25923c37ae2478b85f2ecb5a4021f"
238 238
239# Find any meson cross files in FILESPATH that are relevant for the current 239# Find any meson cross files in FILESPATH that are relevant for the current
240# build (using siteinfo) and add them to EXTRA_OEMESON. 240# build (using siteinfo) and add them to EXTRA_OEMESON.
diff --git a/meta/recipes-core/glibc/glibc-common.inc b/meta/recipes-core/glibc/glibc-common.inc
index e048f75c5d..fb62a4af94 100644
--- a/meta/recipes-core/glibc/glibc-common.inc
+++ b/meta/recipes-core/glibc/glibc-common.inc
@@ -23,3 +23,5 @@ ARM_INSTRUCTION_SET:armv6 = "arm"
23COMPATIBLE_HOST:libc-musl:class-target = "null" 23COMPATIBLE_HOST:libc-musl:class-target = "null"
24 24
25PV = "2.41+git" 25PV = "2.41+git"
26
27TOOLCHAIN = "gcc"
diff --git a/meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch b/meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch
new file mode 100644
index 0000000000..6ea5adafa2
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch
@@ -0,0 +1,81 @@
1From 55ed199fdb55a1a600616ba14ad0feedcf828d86 Mon Sep 17 00:00:00 2001
2From: Peter Marko <peter.marko@siemens.com>
3Date: Mon, 26 May 2025 21:11:14 +0200
4Subject: [PATCH] Revert "cmake: Fix installation directories in
5 libxml2-config.cmake"
6
7This reverts commit 75dde50b20215a2a3a445b62f36a67c8ed337cab.
8
9Upstream-Status: Inappropriate [upstream ticket https://gitlab.gnome.org/GNOME/libxml2/-/issues/898#note_2452864]
10Signed-off-by: Peter Marko <peter.marko@siemens.com>
11---
12 configure.ac | 11 -----------
13 libxml2-config.cmake.in | 11 +++++++----
14 meson.build | 3 ---
15 3 files changed, 7 insertions(+), 18 deletions(-)
16
17diff --git a/configure.ac b/configure.ac
18index 40e75151..d21ebfe5 100644
19--- a/configure.ac
20+++ b/configure.ac
21@@ -1061,17 +1061,6 @@ AC_SUBST(XML_PRIVATE_LIBS)
22 AC_SUBST(XML_PRIVATE_CFLAGS)
23 AC_SUBST(XML_INCLUDEDIR)
24
25-# for libxml2-config.cmake.in
26-AX_RECURSIVE_EVAL(["$bindir"], [INSTALL_BINDIR])
27-AX_RECURSIVE_EVAL(["$includedir"], [INSTALL_INCLUDEDIR])
28-AX_RECURSIVE_EVAL(["$libdir"], [INSTALL_LIBDIR])
29-AC_SUBST(INSTALL_BINDIR)
30-AC_SUBST(INSTALL_INCLUDEDIR)
31-AC_SUBST(INSTALL_LIBDIR)
32-AM_SUBST_NOTMAKE(INSTALL_BINDIR)
33-AM_SUBST_NOTMAKE(INSTALL_INCLUDEDIR)
34-AM_SUBST_NOTMAKE(INSTALL_LIBDIR)
35-
36 AX_RECURSIVE_EVAL(["$sysconfdir"], [XML_SYSCONFDIR])
37 AC_DEFINE_UNQUOTED([XML_SYSCONFDIR], ["$XML_SYSCONFDIR"],
38 [System configuration directory (/etc)])
39diff --git a/libxml2-config.cmake.in b/libxml2-config.cmake.in
40index 4945dda4..31036805 100644
41--- a/libxml2-config.cmake.in
42+++ b/libxml2-config.cmake.in
43@@ -24,17 +24,20 @@
44 # LibXml2::LibXml2 - the LibXml2 library
45 # LibXml2::xmllint - the xmllint command-line executable
46
47+get_filename_component(_libxml2_rootdir ${CMAKE_CURRENT_LIST_DIR}/../../../ ABSOLUTE)
48+
49 set(LIBXML2_VERSION_MAJOR @LIBXML_MAJOR_VERSION@)
50 set(LIBXML2_VERSION_MINOR @LIBXML_MINOR_VERSION@)
51 set(LIBXML2_VERSION_MICRO @LIBXML_MICRO_VERSION@)
52 set(LIBXML2_VERSION_STRING "@VERSION@")
53 set(LIBXML2_DEFINITIONS "@XML_CFLAGS@")
54-set(LIBXML2_INCLUDE_DIR @INSTALL_INCLUDEDIR@/libxml2)
55-set(LIBXML2_LIBRARY_DIR @INSTALL_LIBDIR@)
56+set(LIBXML2_INSTALL_PREFIX ${_libxml2_rootdir})
57+set(LIBXML2_INCLUDE_DIR ${_libxml2_rootdir}/include/libxml2)
58+set(LIBXML2_LIBRARY_DIR ${_libxml2_rootdir}/lib)
59
60 find_library(LIBXML2_LIBRARY NAMES xml2 HINTS ${LIBXML2_LIBRARY_DIR} NO_DEFAULT_PATH)
61-find_program(LIBXML2_XMLCATALOG_EXECUTABLE NAMES xmlcatalog HINTS @INSTALL_BINDIR@ NO_DEFAULT_PATH)
62-find_program(LIBXML2_XMLLINT_EXECUTABLE NAMES xmllint HINTS @INSTALL_BINDIR@ NO_DEFAULT_PATH)
63+find_program(LIBXML2_XMLCATALOG_EXECUTABLE NAMES xmlcatalog HINTS ${_libxml2_rootdir}/bin NO_DEFAULT_PATH)
64+find_program(LIBXML2_XMLLINT_EXECUTABLE NAMES xmllint HINTS ${_libxml2_rootdir}/bin NO_DEFAULT_PATH)
65
66 set(LIBXML2_LIBRARIES ${LIBXML2_LIBRARY})
67 set(LIBXML2_INCLUDE_DIRS ${LIBXML2_INCLUDE_DIR})
68diff --git a/meson.build b/meson.build
69index 4c59211d..3e5f25d3 100644
70--- a/meson.build
71+++ b/meson.build
72@@ -599,9 +599,6 @@ config_cmake = configuration_data()
73 config_cmake.set('LIBXML_MAJOR_VERSION', v_maj)
74 config_cmake.set('LIBXML_MINOR_VERSION', v_min)
75 config_cmake.set('LIBXML_MICRO_VERSION', v_mic)
76-config_cmake.set('INSTALL_BINDIR', dir_bin)
77-config_cmake.set('INSTALL_INCLUDEDIR', dir_include)
78-config_cmake.set('INSTALL_LIBDIR', dir_lib)
79 config_cmake.set('VERSION', meson.project_version())
80 config_cmake.set('WITH_HTTP', want_http.to_int().to_string())
81 config_cmake.set('WITH_ICONV', want_iconv.to_int().to_string())
diff --git a/meta/recipes-core/libxml/libxml2/install-tests.patch b/meta/recipes-core/libxml/libxml2/install-tests.patch
index 1c8c13ab5c..789aeca119 100644
--- a/meta/recipes-core/libxml/libxml2/install-tests.patch
+++ b/meta/recipes-core/libxml/libxml2/install-tests.patch
@@ -15,7 +15,7 @@ diff --git a/Makefile.am b/Makefile.am
15index 4cb9a5c..8adcd7e 100644 15index 4cb9a5c..8adcd7e 100644
16--- a/Makefile.am 16--- a/Makefile.am
17+++ b/Makefile.am 17+++ b/Makefile.am
18@@ -27,6 +27,16 @@ check_PROGRAMS = \ 18@@ -26,6 +26,16 @@ check_PROGRAMS = \
19 testparser \ 19 testparser \
20 testrecurse 20 testrecurse
21 21
@@ -29,6 +29,6 @@ index 4cb9a5c..8adcd7e 100644
29+ cp -r $(srcdir)/result $(DESTDIR)$(ptestdir) 29+ cp -r $(srcdir)/result $(DESTDIR)$(ptestdir)
30+ cp -r $(srcdir)/python/tests $(DESTDIR)$(ptestdir)/python 30+ cp -r $(srcdir)/python/tests $(DESTDIR)$(ptestdir)/python
31+ 31+
32 bin_PROGRAMS = xmllint xmlcatalog 32 bin_PROGRAMS = xmllint
33 33
34 bin_SCRIPTS = xml2-config 34 bin_SCRIPTS = xml2-config
diff --git a/meta/recipes-core/libxml/libxml2/run-ptest b/meta/recipes-core/libxml/libxml2/run-ptest
index f252a78f17..cbbdd5592f 100755
--- a/meta/recipes-core/libxml/libxml2/run-ptest
+++ b/meta/recipes-core/libxml/libxml2/run-ptest
@@ -5,7 +5,7 @@ set -e
5export LC_ALL=en_US.UTF-8 5export LC_ALL=en_US.UTF-8
6 6
7# testModule isn't that useful and hard-codes buildtree, so we don't run that 7# testModule isn't that useful and hard-codes buildtree, so we don't run that
8TESTS="runtest runsuite testrecurse testchar testdict testThreads runxmlconf testapi" 8TESTS="runtest runsuite testrecurse testchar testdict runxmlconf testapi testlimits testparser"
9 9
10for T in $TESTS; do 10for T in $TESTS; do
11 echo Running $T 11 echo Running $T
diff --git a/meta/recipes-core/libxml/libxml2_2.13.8.bb b/meta/recipes-core/libxml/libxml2_2.14.3.bb
index e82e0e8ec3..da75cbe450 100644
--- a/meta/recipes-core/libxml/libxml2_2.13.8.bb
+++ b/meta/recipes-core/libxml/libxml2_2.14.3.bb
@@ -4,7 +4,7 @@ HOMEPAGE = "https://gitlab.gnome.org/GNOME/libxml2"
4BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2" 4BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
5SECTION = "libs" 5SECTION = "libs"
6LICENSE = "MIT" 6LICENSE = "MIT"
7LIC_FILES_CHKSUM = "file://Copyright;md5=f437ed9058e8e5135e47c01e973376ba \ 7LIC_FILES_CHKSUM = "file://Copyright;md5=5873615e8a9ecbf5c8857c4312ee05d6 \
8 file://dict.c;beginline=6;endline=15;md5=2b4b7b827d2d8b080372433c4c9c85b6 \ 8 file://dict.c;beginline=6;endline=15;md5=2b4b7b827d2d8b080372433c4c9c85b6 \
9 file://list.c;beginline=4;endline=13;md5=b9c25b021ccaf287e50060602d20f3a7 \ 9 file://list.c;beginline=4;endline=13;md5=b9c25b021ccaf287e50060602d20f3a7 \
10 " 10 "
@@ -17,9 +17,10 @@ inherit gnomebase
17SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testtar \ 17SRC_URI += "http://www.w3.org/XML/Test/xmlts20130923.tar;subdir=${BP};name=testtar \
18 file://run-ptest \ 18 file://run-ptest \
19 file://install-tests.patch \ 19 file://install-tests.patch \
20 file://0001-Revert-cmake-Fix-installation-directories-in-libxml2.patch \
20 " 21 "
21 22
22SRC_URI[archive.sha256sum] = "277294cb33119ab71b2bc81f2f445e9bc9435b893ad15bb2cd2b0e859a0ee84a" 23SRC_URI[archive.sha256sum] = "6de55cacc8c2bc758f2ef6f93c313cb30e4dd5d84ac5d3c7ccbd9344d8cc6833"
23SRC_URI[testtar.sha256sum] = "c6b2d42ee50b8b236e711a97d68e6c4b5c8d83e69a2be4722379f08702ea7273" 24SRC_URI[testtar.sha256sum] = "c6b2d42ee50b8b236e711a97d68e6c4b5c8d83e69a2be4722379f08702ea7273"
24 25
25# Disputed as a security issue, but fixed in d39f780 26# Disputed as a security issue, but fixed in d39f780
@@ -27,11 +28,8 @@ CVE_STATUS[CVE-2023-45322] = "disputed: issue requires memory allocation to fail
27 28
28BINCONFIG = "${bindir}/xml2-config" 29BINCONFIG = "${bindir}/xml2-config"
29 30
30PACKAGECONFIG ??= "python \ 31PACKAGECONFIG ??= "python"
31 ${@bb.utils.filter('DISTRO_FEATURES', 'ipv6', d)} \
32"
33PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3" 32PACKAGECONFIG[python] = "--with-python=${PYTHON},--without-python,python3"
34PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6,"
35 33
36inherit autotools pkgconfig binconfig-disabled ptest 34inherit autotools pkgconfig binconfig-disabled ptest
37 35
diff --git a/meta/recipes-core/newlib/libgloss_git.bb b/meta/recipes-core/newlib/libgloss_git.bb
index 3c97a7f296..92bb81050b 100644
--- a/meta/recipes-core/newlib/libgloss_git.bb
+++ b/meta/recipes-core/newlib/libgloss_git.bb
@@ -21,8 +21,12 @@ do_install:append() {
21 install -d ${D}${libdir} 21 install -d ${D}${libdir}
22 mv -v ${D}${prefix}/${TARGET_SYS}/lib/* ${D}${libdir} 22 mv -v ${D}${prefix}/${TARGET_SYS}/lib/* ${D}${libdir}
23 23
24 # Remove original directory 24 # Remove original directory
25 rmdir -p --ignore-fail-on-non-empty ${D}${prefix}/${TARGET_SYS}/lib 25 rmdir -p --ignore-fail-on-non-empty ${D}${prefix}/${TARGET_SYS}/lib
26 # Remove empty include dir
27 rmdir ${D}/${prefix}/${TARGET_SYS}/include
28 rmdir ${D}/${prefix}/${TARGET_SYS}/
29
26} 30}
27 31
28# Split packages correctly 32# Split packages correctly
diff --git a/meta/recipes-core/newlib/newlib.inc b/meta/recipes-core/newlib/newlib.inc
index 50113ba433..5b5025148e 100644
--- a/meta/recipes-core/newlib/newlib.inc
+++ b/meta/recipes-core/newlib/newlib.inc
@@ -8,16 +8,16 @@ LIC_FILES_CHKSUM = " \
8 file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \ 8 file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
9 file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \ 9 file://COPYING3.LIB;md5=6a6a8e020838b23406c81b19c1d46df6 \
10 file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \ 10 file://COPYING3;md5=d32239bcb673463ab874e80d47fae504 \
11 file://COPYING.LIBGLOSS;md5=c0469b6ebb847a75781066be515f032d \ 11 file://COPYING.LIBGLOSS;md5=faa6f6ad545714df2a7d1276ed899f15 \
12 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \ 12 file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1 \
13 file://COPYING.NEWLIB;md5=4f1a15846ffee91e352418563e1bce27 \ 13 file://COPYING.NEWLIB;md5=61255563bbcda142f581b94591b6a589 \
14 file://newlib/libc/posix/COPYRIGHT;md5=103468ff1982be840fdf4ee9f8b51bbf \ 14 file://newlib/libc/posix/COPYRIGHT;md5=103468ff1982be840fdf4ee9f8b51bbf \
15 " 15 "
16 16
17BASEVER = "4.4.0" 17BASEVER = "4.5.0"
18PV = "${BASEVER}+git" 18PV = "${BASEVER}+git"
19SRC_URI = "git://sourceware.org/git/newlib-cygwin.git;protocol=https;branch=main" 19SRC_URI = "git://sourceware.org/git/newlib-cygwin.git;protocol=https;branch=main"
20SRCREV = "ad11e2587f83d61357a32c61c36d72ea4f39315e" 20SRCREV = "5e5e51f1dc56a99eb4648c28e00d73b6ea44a8b0"
21 21
22INHIBIT_DEFAULT_DEPS = "1" 22INHIBIT_DEFAULT_DEPS = "1"
23DEPENDS = "virtual/cross-cc" 23DEPENDS = "virtual/cross-cc"
diff --git a/meta/recipes-core/ovmf/ovmf/0003-debug-prefix-map.patch b/meta/recipes-core/ovmf/ovmf/0003-debug-prefix-map.patch
index 73910535a7..4a20548c61 100644
--- a/meta/recipes-core/ovmf/ovmf/0003-debug-prefix-map.patch
+++ b/meta/recipes-core/ovmf/ovmf/0003-debug-prefix-map.patch
@@ -21,11 +21,9 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
21 BaseTools/Conf/tools_def.template | 18 +++++++++--------- 21 BaseTools/Conf/tools_def.template | 18 +++++++++---------
22 1 file changed, 9 insertions(+), 9 deletions(-) 22 1 file changed, 9 insertions(+), 9 deletions(-)
23 23
24diff --git a/BaseTools/Conf/tools_def.template b/BaseTools/Conf/tools_def.template
25index 14f3b643c4..4987488e88 100755
26--- a/BaseTools/Conf/tools_def.template 24--- a/BaseTools/Conf/tools_def.template
27+++ b/BaseTools/Conf/tools_def.template 25+++ b/BaseTools/Conf/tools_def.template
28@@ -896,7 +896,7 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --add-gnu-debuglink="$(DEBUG_DIR)/$(MODULE_ 26@@ -920,7 +920,7 @@ NOOPT_*_*_OBJCOPY_ADDDEBUGFLAG = --a
29 *_*_*_DTC_PATH = DEF(DTC_BIN) 27 *_*_*_DTC_PATH = DEF(DTC_BIN)
30 28
31 # All supported GCC archs except LOONGARCH64 support -mstack-protector-guard=global, so set that on everything except LOONGARCH64 29 # All supported GCC archs except LOONGARCH64 support -mstack-protector-guard=global, so set that on everything except LOONGARCH64
@@ -34,7 +32,7 @@ index 14f3b643c4..4987488e88 100755
34 DEFINE GCC_IA32_X64_CC_FLAGS = -mstack-protector-guard=global 32 DEFINE GCC_IA32_X64_CC_FLAGS = -mstack-protector-guard=global
35 DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -fno-pic -fno-pie -mstack-protector-guard=global 33 DEFINE GCC_ARM_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mlittle-endian -mabi=aapcs -fno-short-enums -funsigned-char -ffunction-sections -fdata-sections -fomit-frame-pointer -Wno-address -mthumb -fno-pic -fno-pie -mstack-protector-guard=global
36 DEFINE GCC_LOONGARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mabi=lp64d -fno-asynchronous-unwind-tables -Wno-address -fno-short-enums -fsigned-char -ffunction-sections -fdata-sections 34 DEFINE GCC_LOONGARCH64_CC_FLAGS = DEF(GCC_ALL_CC_FLAGS) -mabi=lp64d -fno-asynchronous-unwind-tables -Wno-address -fno-short-enums -fsigned-char -ffunction-sections -fdata-sections
37@@ -918,8 +918,8 @@ DEFINE GCC_ARM_ASLDLINK_FLAGS = DEF(GCC_ARM_DLINK_FLAGS) -Wl,--entry,Refere 35@@ -941,8 +941,8 @@ DEFINE GCC_ARM_ASLDLINK_FLAGS = DEF
38 DEFINE GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS) 36 DEFINE GCC_AARCH64_ASLDLINK_FLAGS = DEF(GCC_AARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) DEF(GCC_ARM_AARCH64_ASLDLINK_FLAGS)
39 DEFINE GCC_LOONGARCH64_ASLDLINK_FLAGS = DEF(GCC_LOONGARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT) 37 DEFINE GCC_LOONGARCH64_ASLDLINK_FLAGS = DEF(GCC_LOONGARCH64_DLINK_FLAGS) -Wl,--entry,ReferenceAcpiTable -u $(IMAGE_ENTRY_POINT)
40 DEFINE GCC_IA32_X64_DLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map 38 DEFINE GCC_IA32_X64_DLINK_FLAGS = DEF(GCC_IA32_X64_DLINK_COMMON) --entry _$(IMAGE_ENTRY_POINT) --file-alignment 0x20 --section-alignment 0x20 -Map $(DEST_DIR_DEBUG)/$(BASE_NAME).map
@@ -45,7 +43,7 @@ index 14f3b643c4..4987488e88 100755
45 DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h 43 DEFINE GCC_VFRPP_FLAGS = -x c -E -P -DVFRCOMPILE --include $(MODULE_NAME)StrDefs.h
46 DEFINE GCC_ASLPP_FLAGS = -x c -E -include AutoGen.h 44 DEFINE GCC_ASLPP_FLAGS = -x c -E -include AutoGen.h
47 DEFINE GCC_ASLCC_FLAGS = -x c 45 DEFINE GCC_ASLCC_FLAGS = -x c
48@@ -1072,7 +1072,7 @@ DEFINE GCC5_LOONGARCH64_PP_FLAGS = -mabi=lp64d -march=loongarch64 DEF( 46@@ -1095,7 +1095,7 @@ DEFINE GCC5_LOONGARCH64_PP_FLAGS
49 *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS) 47 *_GCC48_IA32_DLINK2_FLAGS = DEF(GCC48_IA32_DLINK2_FLAGS)
50 *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS) 48 *_GCC48_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
51 *_GCC48_IA32_OBJCOPY_FLAGS = 49 *_GCC48_IA32_OBJCOPY_FLAGS =
@@ -54,7 +52,7 @@ index 14f3b643c4..4987488e88 100755
54 52
55 DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) 53 DEBUG_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS)
56 RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Wno-unused-but-set-variable 54 RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Wno-unused-but-set-variable
57@@ -1100,7 +1100,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(GCC48_IA32_CC_FLAGS) -Wno-unused-but-set 55@@ -1123,7 +1123,7 @@ RELEASE_GCC48_IA32_CC_FLAGS = DEF(
58 *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS) 56 *_GCC48_X64_DLINK2_FLAGS = DEF(GCC48_X64_DLINK2_FLAGS)
59 *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS) 57 *_GCC48_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
60 *_GCC48_X64_OBJCOPY_FLAGS = 58 *_GCC48_X64_OBJCOPY_FLAGS =
@@ -63,7 +61,7 @@ index 14f3b643c4..4987488e88 100755
63 61
64 DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) 62 DEBUG_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS)
65 RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Wno-unused-but-set-variable 63 RELEASE_GCC48_X64_CC_FLAGS = DEF(GCC48_X64_CC_FLAGS) -Wno-unused-but-set-variable
66@@ -1209,7 +1209,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(GCC48_AARCH64_CC_FLAGS) -Wno-unused-but-s 64@@ -1232,7 +1232,7 @@ RELEASE_GCC48_AARCH64_CC_FLAGS = DEF(G
67 *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS) 65 *_GCC49_IA32_DLINK2_FLAGS = DEF(GCC49_IA32_DLINK2_FLAGS)
68 *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS) 66 *_GCC49_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
69 *_GCC49_IA32_OBJCOPY_FLAGS = 67 *_GCC49_IA32_OBJCOPY_FLAGS =
@@ -72,7 +70,7 @@ index 14f3b643c4..4987488e88 100755
72 70
73 DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) 71 DEBUG_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS)
74 RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable 72 RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
75@@ -1237,7 +1237,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(GCC49_IA32_CC_FLAGS) -Wno-unused-but-set 73@@ -1260,7 +1260,7 @@ RELEASE_GCC49_IA32_CC_FLAGS = DEF(
76 *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS) 74 *_GCC49_X64_DLINK2_FLAGS = DEF(GCC49_X64_DLINK2_FLAGS)
77 *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS) 75 *_GCC49_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
78 *_GCC49_X64_OBJCOPY_FLAGS = 76 *_GCC49_X64_OBJCOPY_FLAGS =
@@ -81,7 +79,7 @@ index 14f3b643c4..4987488e88 100755
81 79
82 DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) 80 DEBUG_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS)
83 RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable 81 RELEASE_GCC49_X64_CC_FLAGS = DEF(GCC49_X64_CC_FLAGS) -Wno-unused-but-set-variable -Wno-unused-const-variable
84@@ -1496,7 +1496,7 @@ RELEASE_GCCNOLTO_AARCH64_DLINK_XIPFLAGS = -z common-page-size=0x20 82@@ -1519,7 +1519,7 @@ RELEASE_GCCNOLTO_AARCH64_DLINK_XIPFLAGS
85 *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie 83 *_GCC5_IA32_DLINK2_FLAGS = DEF(GCC5_IA32_DLINK2_FLAGS) -no-pie
86 *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS) 84 *_GCC5_IA32_RC_FLAGS = DEF(GCC_IA32_RC_FLAGS)
87 *_GCC5_IA32_OBJCOPY_FLAGS = 85 *_GCC5_IA32_OBJCOPY_FLAGS =
@@ -90,7 +88,7 @@ index 14f3b643c4..4987488e88 100755
90 88
91 DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto 89 DEBUG_GCC5_IA32_CC_FLAGS = DEF(GCC5_IA32_CC_FLAGS) -flto
92 DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386 90 DEBUG_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl,-m,elf_i386,--oformat=elf32-i386
93@@ -1528,7 +1528,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(GCC5_IA32_X64_DLINK_FLAGS) -flto -Os -Wl, 91@@ -1551,7 +1551,7 @@ RELEASE_GCC5_IA32_DLINK_FLAGS = DEF(G
94 *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS) 92 *_GCC5_X64_DLINK2_FLAGS = DEF(GCC5_X64_DLINK2_FLAGS)
95 *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS) 93 *_GCC5_X64_RC_FLAGS = DEF(GCC_X64_RC_FLAGS)
96 *_GCC5_X64_OBJCOPY_FLAGS = 94 *_GCC5_X64_OBJCOPY_FLAGS =
@@ -99,6 +97,3 @@ index 14f3b643c4..4987488e88 100755
99 97
100 DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO 98 DEBUG_GCC5_X64_CC_FLAGS = DEF(GCC5_X64_CC_FLAGS) -flto -DUSING_LTO
101 DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os 99 DEBUG_GCC5_X64_DLINK_FLAGS = DEF(GCC5_X64_DLINK_FLAGS) -flto -Os
102--
1032.39.5
104
diff --git a/meta/recipes-core/ovmf/ovmf/0004-reproducible.patch b/meta/recipes-core/ovmf/ovmf/0004-reproducible.patch
index ae0ca0c15c..0ddb86f530 100644
--- a/meta/recipes-core/ovmf/ovmf/0004-reproducible.patch
+++ b/meta/recipes-core/ovmf/ovmf/0004-reproducible.patch
@@ -34,20 +34,18 @@ Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
34 .../Source/Python/AutoGen/ModuleAutoGen.py | 5 +++- 34 .../Source/Python/AutoGen/ModuleAutoGen.py | 5 +++-
35 4 files changed, 24 insertions(+), 16 deletions(-) 35 4 files changed, 24 insertions(+), 16 deletions(-)
36 36
37diff --git a/BaseTools/Source/C/GenFw/Elf64Convert.c b/BaseTools/Source/C/GenFw/Elf64Convert.c
38index 897045b2be..a66003f44a 100644
39--- a/BaseTools/Source/C/GenFw/Elf64Convert.c 37--- a/BaseTools/Source/C/GenFw/Elf64Convert.c
40+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c 38+++ b/BaseTools/Source/C/GenFw/Elf64Convert.c
41@@ -13,6 +13,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent 39@@ -15,6 +15,8 @@ SPDX-License-Identifier: BSD-2-Clause-Pa
42 #ifndef __GNUC__
43 #include <windows.h> 40 #include <windows.h>
41 #undef RUNTIME_FUNCTION
44 #include <io.h> 42 #include <io.h>
45+#else 43+#else
46+#define _GNU_SOURCE 44+#define _GNU_SOURCE
47 #endif 45 #endif
48 #include <assert.h> 46 #include <assert.h>
49 #include <stdio.h> 47 #include <stdio.h>
50@@ -988,7 +990,7 @@ ScanSections64 ( 48@@ -990,7 +992,7 @@ ScanSections64 (
51 } 49 }
52 mCoffOffset = mDebugOffset + sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY) + 50 mCoffOffset = mDebugOffset + sizeof(EFI_IMAGE_DEBUG_DIRECTORY_ENTRY) +
53 sizeof(EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY) + 51 sizeof(EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY) +
@@ -56,7 +54,7 @@ index 897045b2be..a66003f44a 100644
56 54
57 // 55 //
58 // Add more space in the .debug data region for the DllCharacteristicsEx 56 // Add more space in the .debug data region for the DllCharacteristicsEx
59@@ -2308,7 +2310,7 @@ WriteDebug64 ( 57@@ -2310,7 +2312,7 @@ WriteDebug64 (
60 EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY *Nb10; 58 EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY *Nb10;
61 EFI_IMAGE_DEBUG_EX_DLLCHARACTERISTICS_ENTRY *DllEntry; 59 EFI_IMAGE_DEBUG_EX_DLLCHARACTERISTICS_ENTRY *DllEntry;
62 60
@@ -65,7 +63,7 @@ index 897045b2be..a66003f44a 100644
65 63
66 NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(mCoffFile + mNtHdrOffset); 64 NtHdr = (EFI_IMAGE_OPTIONAL_HEADER_UNION *)(mCoffFile + mNtHdrOffset);
67 DataDir = &NtHdr->Pe32Plus.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG]; 65 DataDir = &NtHdr->Pe32Plus.OptionalHeader.DataDirectory[EFI_IMAGE_DIRECTORY_ENTRY_DEBUG];
68@@ -2341,7 +2343,7 @@ WriteDebug64 ( 66@@ -2343,7 +2345,7 @@ WriteDebug64 (
69 67
70 Nb10 = (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY*)(Dir + 1); 68 Nb10 = (EFI_IMAGE_DEBUG_CODEVIEW_NB10_ENTRY*)(Dir + 1);
71 Nb10->Signature = CODEVIEW_SIGNATURE_NB10; 69 Nb10->Signature = CODEVIEW_SIGNATURE_NB10;
@@ -74,8 +72,6 @@ index 897045b2be..a66003f44a 100644
74 } 72 }
75 73
76 STATIC 74 STATIC
77diff --git a/BaseTools/Source/Python/AutoGen/BuildEngine.py b/BaseTools/Source/Python/AutoGen/BuildEngine.py
78index 45b39d7878..3fed7d1736 100644
79--- a/BaseTools/Source/Python/AutoGen/BuildEngine.py 75--- a/BaseTools/Source/Python/AutoGen/BuildEngine.py
80+++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py 76+++ b/BaseTools/Source/Python/AutoGen/BuildEngine.py
81@@ -70,6 +70,9 @@ class TargetDescBlock(object): 77@@ -70,6 +70,9 @@ class TargetDescBlock(object):
@@ -88,8 +84,6 @@ index 45b39d7878..3fed7d1736 100644
88 def AddInput(self, Input): 84 def AddInput(self, Input):
89 if Input not in self.Inputs: 85 if Input not in self.Inputs:
90 self.Inputs.append(Input) 86 self.Inputs.append(Input)
91diff --git a/BaseTools/Source/Python/AutoGen/GenMake.py b/BaseTools/Source/Python/AutoGen/GenMake.py
92index 6d9c60b702..83ac267647 100755
93--- a/BaseTools/Source/Python/AutoGen/GenMake.py 87--- a/BaseTools/Source/Python/AutoGen/GenMake.py
94+++ b/BaseTools/Source/Python/AutoGen/GenMake.py 88+++ b/BaseTools/Source/Python/AutoGen/GenMake.py
95@@ -576,7 +576,7 @@ cleanlib: 89@@ -576,7 +576,7 @@ cleanlib:
@@ -140,7 +134,7 @@ index 6d9c60b702..83ac267647 100755
140 } 134 }
141 135
142 RespDict = {} 136 RespDict = {}
143@@ -1008,9 +1008,9 @@ cleanlib: 137@@ -1019,9 +1019,9 @@ cleanlib:
144 if not self.ObjTargetDict.get(T.Target.SubDir): 138 if not self.ObjTargetDict.get(T.Target.SubDir):
145 self.ObjTargetDict[T.Target.SubDir] = set() 139 self.ObjTargetDict[T.Target.SubDir] = set()
146 self.ObjTargetDict[T.Target.SubDir].add(NewFile) 140 self.ObjTargetDict[T.Target.SubDir].add(NewFile)
@@ -152,8 +146,6 @@ index 6d9c60b702..83ac267647 100755
152 # Generate related macros if needed 146 # Generate related macros if needed
153 if T.GenFileListMacro and T.FileListMacro not in self.FileListMacros: 147 if T.GenFileListMacro and T.FileListMacro not in self.FileListMacros:
154 self.FileListMacros[T.FileListMacro] = [] 148 self.FileListMacros[T.FileListMacro] = []
155diff --git a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
156index 65a2176ca9..318b9611ce 100755
157--- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py 149--- a/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
158+++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py 150+++ b/BaseTools/Source/Python/AutoGen/ModuleAutoGen.py
159@@ -1474,6 +1474,9 @@ class ModuleAutoGen(AutoGen): 151@@ -1474,6 +1474,9 @@ class ModuleAutoGen(AutoGen):
@@ -175,6 +167,3 @@ index 65a2176ca9..318b9611ce 100755
175 167
176 # Ignore generating makefile when it is a binary module 168 # Ignore generating makefile when it is a binary module
177 if self.IsBinaryModule: 169 if self.IsBinaryModule:
178--
1792.39.5
180
diff --git a/meta/recipes-core/ovmf/ovmf_git.bb b/meta/recipes-core/ovmf/ovmf_git.bb
index 41ab85b703..aa7de3af2b 100644
--- a/meta/recipes-core/ovmf/ovmf_git.bb
+++ b/meta/recipes-core/ovmf/ovmf_git.bb
@@ -29,8 +29,8 @@ SRC_URI = "gitsm://github.com/tianocore/edk2.git;branch=master;protocol=https \
29 file://CVE-2025-2295.patch \ 29 file://CVE-2025-2295.patch \
30 " 30 "
31 31
32PV = "edk2-stable202411" 32PV = "edk2-stable202502"
33SRCREV = "0f3867fa6ef0553e26c42f7d71ff6bdb98429742" 33SRCREV = "fbe0805b2091393406952e84724188f8c1941837"
34UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>edk2-stable.*)" 34UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>edk2-stable.*)"
35 35
36CVE_PRODUCT = "edk2" 36CVE_PRODUCT = "edk2"
diff --git a/meta/recipes-core/psplash/files/psplash-init b/meta/recipes-core/psplash/files/psplash-init
index e0f80bcdc0..e0f80bcdc0 100755..100644
--- a/meta/recipes-core/psplash/files/psplash-init
+++ b/meta/recipes-core/psplash/files/psplash-init
diff --git a/meta/recipes-core/psplash/psplash_git.bb b/meta/recipes-core/psplash/psplash_git.bb
index 712fff7bd0..f3647d389d 100644
--- a/meta/recipes-core/psplash/psplash_git.bb
+++ b/meta/recipes-core/psplash/psplash_git.bb
@@ -6,7 +6,7 @@ LICENSE = "GPL-2.0-or-later"
6LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=8;md5=8f232c1e95929eacab37f00900580224" 6LIC_FILES_CHKSUM = "file://psplash.h;beginline=1;endline=8;md5=8f232c1e95929eacab37f00900580224"
7DEPENDS = "gdk-pixbuf-native" 7DEPENDS = "gdk-pixbuf-native"
8 8
9SRCREV = "1f64c654129fdb6a1b75d8c16e3bcdd986468083" 9SRCREV = "53ae74a36bf17675228552abb927d2f981940a6a"
10PV = "0.1+git" 10PV = "0.1+git"
11 11
12SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master;protocol=https \ 12SRC_URI = "git://git.yoctoproject.org/${BPN};branch=master;protocol=https \
diff --git a/meta/recipes-core/systemd/systemd-boot_257.5.bb b/meta/recipes-core/systemd/systemd-boot_257.5.bb
index 6a50ac05aa..151e4a9537 100644
--- a/meta/recipes-core/systemd/systemd-boot_257.5.bb
+++ b/meta/recipes-core/systemd/systemd-boot_257.5.bb
@@ -47,6 +47,11 @@ FILES:${PN} = "${EFI_FILES_PATH}/${SYSTEMD_BOOT_IMAGE}"
47 47
48RDEPENDS:${PN} += "virtual-systemd-bootconf" 48RDEPENDS:${PN} += "virtual-systemd-bootconf"
49 49
50# efi portions use -mgeneral-regs-only option which conflicts with SSE
51# especially clang throws errors about it
52# error: the 'sse' unit is not supported with this instruction set
53TUNE_CCARGS:remove = "-mfpmath=sse"
54
50CFLAGS:append:libc-musl = " -D__DEFINED_wchar_t" 55CFLAGS:append:libc-musl = " -D__DEFINED_wchar_t"
51 56
52COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*|riscv.*)-linux" 57COMPATIBLE_HOST = "(aarch64.*|arm.*|x86_64.*|i.86.*|riscv.*)-linux"
diff --git a/meta/recipes-devtools/binutils/binutils-2.44.inc b/meta/recipes-devtools/binutils/binutils-2.44.inc
index 6bc65a0fea..40a9a53310 100644
--- a/meta/recipes-devtools/binutils/binutils-2.44.inc
+++ b/meta/recipes-devtools/binutils/binutils-2.44.inc
@@ -35,5 +35,7 @@ SRC_URI = "\
35 file://0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \ 35 file://0012-Only-generate-an-RPATH-entry-if-LD_RUN_PATH-is-not-e.patch \
36 file://0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \ 36 file://0013-Define-alignof-using-_Alignof-when-using-C11-or-newe.patch \
37 file://0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \ 37 file://0014-Remove-duplicate-pe-dll.o-entry-deom-targ_extra_ofil.patch \
38 file://0015-CVE-2025-1178.patch \
39 file://CVE-2025-1180.patch \
38" 40"
39S = "${WORKDIR}/git" 41S = "${WORKDIR}/git"
diff --git a/meta/recipes-devtools/binutils/binutils/0015-CVE-2025-1178.patch b/meta/recipes-devtools/binutils/binutils/0015-CVE-2025-1178.patch
new file mode 100644
index 0000000000..c39f43fba4
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/0015-CVE-2025-1178.patch
@@ -0,0 +1,33 @@
1From 75086e9de1707281172cc77f178e7949a4414ed0 Mon Sep 17 00:00:00 2001
2From: Nick Clifton <nickc@redhat.com>
3Date: Wed, 5 Feb 2025 13:26:51 +0000
4Subject: [PATCH] Prevent an abort in the bfd linker when attempting to
5 generate dynamic relocs for a corrupt input file.
6
7PR 32638
8
9Upstream-Status: Backport [https://sourceware.org/git/?p=binutils-gdb.git;a=patch;h=75086e9de1707281172cc77f178e7949a4414ed0]
10CVE: CVE-2025-1178
11
12Signed-off-by: Deepesh Varatharajan <Deepesh.Varatharajan@windriver.com>
13
14diff --git a/bfd/elf64-x86-64.c b/bfd/elf64-x86-64.c
15index cb32732e..a08e9c97 100644
16--- a/bfd/elf64-x86-64.c
17+++ b/bfd/elf64-x86-64.c
18@@ -5031,6 +5031,15 @@ elf_x86_64_finish_dynamic_symbol (bfd *output_bfd,
19
20 if (generate_dynamic_reloc)
21 {
22+ /* If the relgot section has not been created, then
23+ generate an error instead of a reloc. cf PR 32638. */
24+ if (relgot == NULL || relgot->size == 0)
25+ {
26+ info->callbacks->einfo (_("%F%pB: Unable to generate dynamic relocs because a suitable section does not exist\n"),
27+ output_bfd);
28+ return false;
29+ }
30+
31 if (relative_reloc_name != NULL
32 && htab->params->report_relative_reloc)
33 _bfd_x86_elf_link_report_relative_reloc
diff --git a/meta/recipes-devtools/binutils/binutils/CVE-2025-1180.patch b/meta/recipes-devtools/binutils/binutils/CVE-2025-1180.patch
new file mode 100644
index 0000000000..073361cf19
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/CVE-2025-1180.patch
@@ -0,0 +1,165 @@
1From 509c5afcd71afd36cd6496f8c84733b11bd5e9e5 Mon Sep 17 00:00:00 2001
2From: Nick Clifton <nickc@redhat.com>
3Date: Thu, 22 May 2025 01:56:17 -0700
4Subject: [PATCH] Backport fix for PR 32642(CVE-2025-1180)
5
6Backporting the fix from PR 32636 to fix PR 32642 (ld SEGV (illegal read access)
7in _bfd_elf_write_section_eh_frame (bfd/elf-eh-frame.c:2234:29) with
8 --gc-sections --gc-keep-exported option)
9
10https://nvd.nist.gov/vuln/detail/CVE-2025-1180 is associated with
11PR32642 which will get fixed with commit from PR 32636.
12
13(cherry picked from commit: f9978defb6fab0bd8583942d97c112b0932ac814)
14Upstream-Status: Submitted [https://sourceware.org/pipermail/binutils/2025-May/141351.html]
15CVE: CVE-2025-1180
16
17Signed-off-by: Harish Sadineni <Harish.Sadineni@windriver.com>
18---
19 bfd/elflink.c | 88 +++++++++++++++++++++++++--------------------------
20 1 file changed, 44 insertions(+), 44 deletions(-)
21
22diff --git a/bfd/elflink.c b/bfd/elflink.c
23index 6346d7e2b4b..d765b688801 100644
24--- a/bfd/elflink.c
25+++ b/bfd/elflink.c
26@@ -96,22 +96,37 @@ _bfd_elf_link_keep_memory (struct bfd_link_info *info)
27 return true;
28 }
29
30-asection *
31-_bfd_elf_section_for_symbol (struct elf_reloc_cookie *cookie,
32- unsigned long r_symndx,
33- bool discard)
34+static struct elf_link_hash_entry *
35+get_ext_sym_hash (struct elf_reloc_cookie *cookie, unsigned long r_symndx)
36 {
37- if (r_symndx >= cookie->locsymcount
38- || ELF_ST_BIND (cookie->locsyms[r_symndx].st_info) != STB_LOCAL)
39- {
40- struct elf_link_hash_entry *h;
41+ struct elf_link_hash_entry *h = NULL;
42
43+ if ((r_symndx >= cookie->locsymcount
44+ || ELF_ST_BIND (cookie->locsyms[r_symndx].st_info) != STB_LOCAL)
45+ /* Guard against corrupt input. See PR 32636 for an example. */
46+ && r_symndx >= cookie->extsymoff)
47+ {
48 h = cookie->sym_hashes[r_symndx - cookie->extsymoff];
49
50 while (h->root.type == bfd_link_hash_indirect
51 || h->root.type == bfd_link_hash_warning)
52 h = (struct elf_link_hash_entry *) h->root.u.i.link;
53+ }
54+
55+ return h;
56+}
57
58+asection *
59+_bfd_elf_section_for_symbol (struct elf_reloc_cookie *cookie,
60+ unsigned long r_symndx,
61+ bool discard)
62+{
63+ struct elf_link_hash_entry *h;
64+
65+ h = get_ext_sym_hash (cookie, r_symndx);
66+
67+ if (h != NULL)
68+ {
69 if ((h->root.type == bfd_link_hash_defined
70 || h->root.type == bfd_link_hash_defweak)
71 && discarded_section (h->root.u.def.section))
72@@ -119,21 +134,20 @@ _bfd_elf_section_for_symbol (struct elf_reloc_cookie *cookie,
73 else
74 return NULL;
75 }
76- else
77- {
78- /* It's not a relocation against a global symbol,
79- but it could be a relocation against a local
80- symbol for a discarded section. */
81- asection *isec;
82- Elf_Internal_Sym *isym;
83
84- /* Need to: get the symbol; get the section. */
85- isym = &cookie->locsyms[r_symndx];
86- isec = bfd_section_from_elf_index (cookie->abfd, isym->st_shndx);
87- if (isec != NULL
88- && discard ? discarded_section (isec) : 1)
89- return isec;
90- }
91+ /* It's not a relocation against a global symbol,
92+ but it could be a relocation against a local
93+ symbol for a discarded section. */
94+ asection *isec;
95+ Elf_Internal_Sym *isym;
96+
97+ /* Need to: get the symbol; get the section. */
98+ isym = &cookie->locsyms[r_symndx];
99+ isec = bfd_section_from_elf_index (cookie->abfd, isym->st_shndx);
100+ if (isec != NULL
101+ && discard ? discarded_section (isec) : 1)
102+ return isec;
103+
104 return NULL;
105 }
106
107@@ -13994,22 +14008,12 @@ _bfd_elf_gc_mark_rsec (struct bfd_link_info *info, asection *sec,
108 if (r_symndx == STN_UNDEF)
109 return NULL;
110
111- if (r_symndx >= cookie->locsymcount
112- || ELF_ST_BIND (cookie->locsyms[r_symndx].st_info) != STB_LOCAL)
113+ h = get_ext_sym_hash (cookie, r_symndx);
114+
115+ if (h != NULL)
116 {
117 bool was_marked;
118
119- h = cookie->sym_hashes[r_symndx - cookie->extsymoff];
120- if (h == NULL)
121- {
122- info->callbacks->fatal (_("%F%P: corrupt input: %pB\n"),
123- sec->owner);
124- return NULL;
125- }
126- while (h->root.type == bfd_link_hash_indirect
127- || h->root.type == bfd_link_hash_warning)
128- h = (struct elf_link_hash_entry *) h->root.u.i.link;
129-
130 was_marked = h->mark;
131 h->mark = 1;
132 /* Keep all aliases of the symbol too. If an object symbol
133@@ -15064,17 +15068,12 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie)
134 if (r_symndx == STN_UNDEF)
135 return true;
136
137- if (r_symndx >= rcookie->locsymcount
138- || ELF_ST_BIND (rcookie->locsyms[r_symndx].st_info) != STB_LOCAL)
139- {
140- struct elf_link_hash_entry *h;
141-
142- h = rcookie->sym_hashes[r_symndx - rcookie->extsymoff];
143+ struct elf_link_hash_entry *h;
144
145- while (h->root.type == bfd_link_hash_indirect
146- || h->root.type == bfd_link_hash_warning)
147- h = (struct elf_link_hash_entry *) h->root.u.i.link;
148+ h = get_ext_sym_hash (rcookie, r_symndx);
149
150+ if (h != NULL)
151+ {
152 if ((h->root.type == bfd_link_hash_defined
153 || h->root.type == bfd_link_hash_defweak)
154 && (h->root.u.def.section->owner != rcookie->abfd
155@@ -15098,6 +15097,7 @@ bfd_elf_reloc_symbol_deleted_p (bfd_vma offset, void *cookie)
156 || discarded_section (isec)))
157 return true;
158 }
159+
160 return false;
161 }
162 return false;
163--
1642.49.0
165
diff --git a/meta/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch b/meta/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch
index 21b033b498..3853d7648b 100644
--- a/meta/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch
+++ b/meta/recipes-devtools/clang/clang/0001-libcxxabi-Find-libunwind-headers-when-LIBCXXABI_LIBU.patch
@@ -1,4 +1,4 @@
1From ec9babfa91931042e7aa771915e2f1d4dc8d15e0 Mon Sep 17 00:00:00 2001 1From 1fa8ec110c67714cff009b481c430e3d004bfaad Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 27 Aug 2017 10:37:49 -0700 3Date: Sun, 27 Aug 2017 10:37:49 -0700
4Subject: [PATCH] libcxxabi: Find libunwind headers when 4Subject: [PATCH] libcxxabi: Find libunwind headers when
diff --git a/meta/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch b/meta/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch
index 88cef402da..d5d6a2c6d7 100644
--- a/meta/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch
+++ b/meta/recipes-devtools/clang/clang/0002-compiler-rt-support-a-new-embedded-linux-target.patch
@@ -1,4 +1,4 @@
1From 8cdfcfb9102c4008758bb844856e553d4fe4ae79 Mon Sep 17 00:00:00 2001 1From 6e8c6c53281fdd3b11d29d706905a3fe959afd11 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 19 Apr 2015 15:16:23 -0700 3Date: Sun, 19 Apr 2015 15:16:23 -0700
4Subject: [PATCH] compiler-rt: support a new embedded linux target 4Subject: [PATCH] compiler-rt: support a new embedded linux target
diff --git a/meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch b/meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch
index a153624860..0ee7090290 100644
--- a/meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch
+++ b/meta/recipes-devtools/clang/clang/0003-compiler-rt-Simplify-cross-compilation.-Don-t-use-na.patch
@@ -1,4 +1,4 @@
1From c105a2efab08776d1f4df6b9b8d26d0f89d14b41 Mon Sep 17 00:00:00 2001 1From 419855642e4a48d09e7b3b1e02593b6d9a506089 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 May 2016 23:11:45 -0700 3Date: Thu, 19 May 2016 23:11:45 -0700
4Subject: [PATCH] compiler-rt: Simplify cross-compilation. Don't use 4Subject: [PATCH] compiler-rt: Simplify cross-compilation. Don't use
diff --git a/meta/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch b/meta/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
index c70f740222..60b5360057 100644
--- a/meta/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
+++ b/meta/recipes-devtools/clang/clang/0004-llvm-TargetLibraryInfo-Undefine-libc-functions-if-th.patch
@@ -1,4 +1,4 @@
1From 388a70b4a8f828b7c58a0fb7bc3ee18001bc5f9b Mon Sep 17 00:00:00 2001 1From 2603da5f1fce88f6c7f6134faf7757f17b7e14f5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 21 May 2016 00:33:20 +0000 3Date: Sat, 21 May 2016 00:33:20 +0000
4Subject: [PATCH] llvm: TargetLibraryInfo: Undefine libc functions if they are 4Subject: [PATCH] llvm: TargetLibraryInfo: Undefine libc functions if they are
diff --git a/meta/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch b/meta/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch
index 6d3f5293aa..7aea73e611 100644
--- a/meta/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch
+++ b/meta/recipes-devtools/clang/clang/0005-llvm-allow-env-override-of-exe-and-libdir-path.patch
@@ -1,4 +1,4 @@
1From 0b344231c49d8c145bc3ad882d259d36fb19e827 Mon Sep 17 00:00:00 2001 1From 13a9ce5a34060abaa6d5da5176eb1dab271dac4e Mon Sep 17 00:00:00 2001
2From: Martin Kelly <mkelly@xevo.com> 2From: Martin Kelly <mkelly@xevo.com>
3Date: Fri, 19 May 2017 00:22:57 -0700 3Date: Fri, 19 May 2017 00:22:57 -0700
4Subject: [PATCH] llvm: allow env override of exe and libdir path 4Subject: [PATCH] llvm: allow env override of exe and libdir path
diff --git a/meta/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch b/meta/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch
index 0258687820..44fa980ab8 100644
--- a/meta/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch
+++ b/meta/recipes-devtools/clang/clang/0006-clang-driver-Check-sysroot-for-ldso-path.patch
@@ -1,4 +1,4 @@
1From 80cacc04e4c0d34f79ee2f112b302c4fbb797d72 Mon Sep 17 00:00:00 2001 1From a804903ed85707d9a06c7e01aef536b3042790d0 Mon Sep 17 00:00:00 2001
2From: Dan McGregor <dan.mcgregor@usask.ca> 2From: Dan McGregor <dan.mcgregor@usask.ca>
3Date: Wed, 26 Apr 2017 20:29:41 -0600 3Date: Wed, 26 Apr 2017 20:29:41 -0600
4Subject: [PATCH] clang: driver: Check sysroot for ldso path 4Subject: [PATCH] clang: driver: Check sysroot for ldso path
diff --git a/meta/recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch b/meta/recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch
index 1681080ece..6374ec7bf5 100644
--- a/meta/recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch
+++ b/meta/recipes-devtools/clang/clang/0007-clang-Driver-tools.cpp-Add-lssp_nonshared-on-musl.patch
@@ -1,4 +1,4 @@
1From 47dfdd42687c403c044fdb830472d7bedc1b3d39 Mon Sep 17 00:00:00 2001 1From 703e5acbeaad6eeb316740dd8b92b34db99bb1b3 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 19 May 2016 21:11:06 -0700 3Date: Thu, 19 May 2016 21:11:06 -0700
4Subject: [PATCH] clang: Driver/tools.cpp: Add -lssp_nonshared on musl 4Subject: [PATCH] clang: Driver/tools.cpp: Add -lssp_nonshared on musl
diff --git a/meta/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch b/meta/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch
index 12f670034e..16d8c9bae5 100644
--- a/meta/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch
+++ b/meta/recipes-devtools/clang/clang/0008-clang-Prepend-trailing-to-sysroot.patch
@@ -1,4 +1,4 @@
1From 4b64a243ce69f782964d4841d1079689a62ebdc1 Mon Sep 17 00:00:00 2001 1From b1d4a42b6078502530924cd0d15052671c760eb6 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 16 Mar 2017 09:02:13 -0700 3Date: Thu, 16 Mar 2017 09:02:13 -0700
4Subject: [PATCH] clang: Prepend trailing '/' to sysroot 4Subject: [PATCH] clang: Prepend trailing '/' to sysroot
diff --git a/meta/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch b/meta/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch
index 5d7a292fcf..2ad1130355 100644
--- a/meta/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch
+++ b/meta/recipes-devtools/clang/clang/0009-clang-Look-inside-the-target-sysroot-for-compiler-ru.patch
@@ -1,4 +1,4 @@
1From edc111019281ed898add2c3f86ebfd54b0fa46d9 Mon Sep 17 00:00:00 2001 1From 3edfe16c0d8bb3d135465038cb07c8122baac698 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 16 Mar 2017 19:06:26 -0700 3Date: Thu, 16 Mar 2017 19:06:26 -0700
4Subject: [PATCH] clang: Look inside the target sysroot for compiler runtime 4Subject: [PATCH] clang: Look inside the target sysroot for compiler runtime
diff --git a/meta/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch b/meta/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch
index c4fbaee956..346a4fcbb0 100644
--- a/meta/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch
+++ b/meta/recipes-devtools/clang/clang/0010-clang-Define-releative-gcc-installation-dir.patch
@@ -1,4 +1,4 @@
1From e79d44241dfd0f4b4ec25547e6a65e61d2a0b4b2 Mon Sep 17 00:00:00 2001 1From dc2de98d70a763f30347df2d76df1c70cc464b87 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 20 Mar 2021 16:09:16 -0700 3Date: Sat, 20 Mar 2021 16:09:16 -0700
4Subject: [PATCH] clang: Define / releative gcc installation dir 4Subject: [PATCH] clang: Define / releative gcc installation dir
diff --git a/meta/recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch b/meta/recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch
index e50e3bf026..25dade4389 100644
--- a/meta/recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch
+++ b/meta/recipes-devtools/clang/clang/0011-clang-Add-lpthread-and-ldl-along-with-lunwind-for-st.patch
@@ -1,4 +1,4 @@
1From 42dc7f1fd3e7bc549f87b9c28fb3024a3970e96d Mon Sep 17 00:00:00 2001 1From 0712b0f0fa8c9cf27016e8b1ef8391f6c9cfa4ff Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 31 Jul 2019 22:51:39 -0700 3Date: Wed, 31 Jul 2019 22:51:39 -0700
4Subject: [PATCH] clang: Add -lpthread and -ldl along with -lunwind for static 4Subject: [PATCH] clang: Add -lpthread and -ldl along with -lunwind for static
diff --git a/meta/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch b/meta/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch
index 0f386cd1a6..b55740e0d6 100644
--- a/meta/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch
+++ b/meta/recipes-devtools/clang/clang/0012-Pass-PYTHON_EXECUTABLE-when-cross-compiling-for-nati.patch
@@ -1,4 +1,4 @@
1From 0e60706bcddbb9a97ab28df6fba39bf6bd49ab27 Mon Sep 17 00:00:00 2001 1From a6055a858f6e54cac2b427101fb43c83599b9072 Mon Sep 17 00:00:00 2001
2From: Anuj Mittal <anuj.mittal@intel.com> 2From: Anuj Mittal <anuj.mittal@intel.com>
3Date: Thu, 26 Dec 2019 12:56:16 -0800 3Date: Thu, 26 Dec 2019 12:56:16 -0800
4Subject: [PATCH] Pass PYTHON_EXECUTABLE when cross compiling for native build 4Subject: [PATCH] Pass PYTHON_EXECUTABLE when cross compiling for native build
diff --git a/meta/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch b/meta/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch
index 3a6713a2de..99952fe182 100644
--- a/meta/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch
+++ b/meta/recipes-devtools/clang/clang/0013-Check-for-atomic-double-intrinsics.patch
@@ -1,4 +1,4 @@
1From f7ef28286dd0adfd384ef55c9039022b4f92f99c Mon Sep 17 00:00:00 2001 1From c9e8942cace57d9d222e8f005408631e1cd06c5c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 18 Nov 2019 17:00:29 -0800 3Date: Mon, 18 Nov 2019 17:00:29 -0800
4Subject: [PATCH] Check for atomic<double> intrinsics 4Subject: [PATCH] Check for atomic<double> intrinsics
diff --git a/meta/recipes-devtools/clang/clang/0014-cmake-Fix-configure-for-packages-using-find_package.patch b/meta/recipes-devtools/clang/clang/0014-cmake-Fix-configure-for-packages-using-find_package.patch
index 033f9e6d7c..f6df85538d 100644
--- a/meta/recipes-devtools/clang/clang/0014-cmake-Fix-configure-for-packages-using-find_package.patch
+++ b/meta/recipes-devtools/clang/clang/0014-cmake-Fix-configure-for-packages-using-find_package.patch
@@ -1,4 +1,4 @@
1From aae87f7ce9d07ba1c401de8f2981b046321fba3b Mon Sep 17 00:00:00 2001 1From a6bf17d7eb64bd7beabc73b5fe319b7a375bbcce Mon Sep 17 00:00:00 2001
2From: Ovidiu Panait <ovidiu.panait@windriver.com> 2From: Ovidiu Panait <ovidiu.panait@windriver.com>
3Date: Fri, 31 Jan 2020 10:56:11 +0200 3Date: Fri, 31 Jan 2020 10:56:11 +0200
4Subject: [PATCH] cmake: Fix configure for packages using find_package() 4Subject: [PATCH] cmake: Fix configure for packages using find_package()
diff --git a/meta/recipes-devtools/clang/clang/0015-clang-Fix-resource-dir-location-for-cross-toolchains.patch b/meta/recipes-devtools/clang/clang/0015-clang-Fix-resource-dir-location-for-cross-toolchains.patch
index 479cc01004..4841d6c1bc 100644
--- a/meta/recipes-devtools/clang/clang/0015-clang-Fix-resource-dir-location-for-cross-toolchains.patch
+++ b/meta/recipes-devtools/clang/clang/0015-clang-Fix-resource-dir-location-for-cross-toolchains.patch
@@ -1,4 +1,4 @@
1From e374b21872c382d0450a5813184c72fdaabcac11 Mon Sep 17 00:00:00 2001 1From f3c6f924525179ca190fecce2889997250ca8705 Mon Sep 17 00:00:00 2001
2From: Jim Broadus <jbroadus@xevo.com> 2From: Jim Broadus <jbroadus@xevo.com>
3Date: Thu, 26 Mar 2020 16:05:53 -0700 3Date: Thu, 26 Mar 2020 16:05:53 -0700
4Subject: [PATCH] clang: Fix resource dir location for cross toolchains 4Subject: [PATCH] clang: Fix resource dir location for cross toolchains
diff --git a/meta/recipes-devtools/clang/clang/0016-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch b/meta/recipes-devtools/clang/clang/0016-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch
index 3803603355..6bbbb5a259 100644
--- a/meta/recipes-devtools/clang/clang/0016-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch
+++ b/meta/recipes-devtools/clang/clang/0016-clang-driver-Add-dyld-prefix-when-checking-sysroot-f.patch
@@ -1,4 +1,4 @@
1From 3acdfa74ce633bfebf1c3982d86b4931b8b606c8 Mon Sep 17 00:00:00 2001 1From 7c70f891fb94f2d8c88bc6af4514d8dcd6488658 Mon Sep 17 00:00:00 2001
2From: Oleksandr Ocheretnyi <oocheret@cisco.com> 2From: Oleksandr Ocheretnyi <oocheret@cisco.com>
3Date: Wed, 15 Apr 2020 00:08:39 +0300 3Date: Wed, 15 Apr 2020 00:08:39 +0300
4Subject: [PATCH] clang: driver: Add dyld-prefix when checking sysroot for ldso 4Subject: [PATCH] clang: driver: Add dyld-prefix when checking sysroot for ldso
diff --git a/meta/recipes-devtools/clang/clang/0017-clang-Use-python3-in-python-scripts.patch b/meta/recipes-devtools/clang/clang/0017-clang-Use-python3-in-python-scripts.patch
index 329cd8b023..8677c5ca13 100644
--- a/meta/recipes-devtools/clang/clang/0017-clang-Use-python3-in-python-scripts.patch
+++ b/meta/recipes-devtools/clang/clang/0017-clang-Use-python3-in-python-scripts.patch
@@ -1,4 +1,4 @@
1From 02ce42db3325d5fab553627dfc73750270c0b665 Mon Sep 17 00:00:00 2001 1From f06bb3e20e47ab5a76efa76f50f0bbef682cd263 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 14 Oct 2020 22:19:57 -0700 3Date: Wed, 14 Oct 2020 22:19:57 -0700
4Subject: [PATCH] clang: Use python3 in python scripts 4Subject: [PATCH] clang: Use python3 in python scripts
diff --git a/meta/recipes-devtools/clang/clang/0018-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch b/meta/recipes-devtools/clang/clang/0018-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch
index bf46b22f36..7ae88b870d 100644
--- a/meta/recipes-devtools/clang/clang/0018-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch
+++ b/meta/recipes-devtools/clang/clang/0018-llvm-clang-Insert-anchor-for-adding-OE-distro-vendor.patch
@@ -1,4 +1,4 @@
1From aec307904022e138d1004ceb44b9600deaa7fbdb Mon Sep 17 00:00:00 2001 1From cfe5ec616f1bbbe7d20409b552428e43e282f115 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Mon, 25 Jan 2021 16:14:35 +0800 3Date: Mon, 25 Jan 2021 16:14:35 +0800
4Subject: [PATCH] llvm/clang: Insert anchor for adding OE distro vendor names 4Subject: [PATCH] llvm/clang: Insert anchor for adding OE distro vendor names
@@ -97,10 +97,10 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
97 5 files changed, 6 insertions(+), 1 deletion(-) 97 5 files changed, 6 insertions(+), 1 deletion(-)
98 98
99diff --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h 99diff --git a/clang/include/clang/Driver/Distro.h b/clang/include/clang/Driver/Distro.h
100index b4d485dac8a2..ac0bf25b7c63 100644 100index c544a8c00219..3cd687ede458 100644
101--- a/clang/include/clang/Driver/Distro.h 101--- a/clang/include/clang/Driver/Distro.h
102+++ b/clang/include/clang/Driver/Distro.h 102+++ b/clang/include/clang/Driver/Distro.h
103@@ -45,6 +45,7 @@ public: 103@@ -47,6 +47,7 @@ public:
104 RHEL7, 104 RHEL7,
105 Fedora, 105 Fedora,
106 Gentoo, 106 Gentoo,
@@ -108,7 +108,7 @@ index b4d485dac8a2..ac0bf25b7c63 100644
108 OpenSUSE, 108 OpenSUSE,
109 UbuntuHardy, 109 UbuntuHardy,
110 UbuntuIntrepid, 110 UbuntuIntrepid,
111@@ -139,6 +140,7 @@ public: 111@@ -141,6 +142,7 @@ public:
112 112
113 bool IsGentoo() const { return DistroVal == Gentoo; } 113 bool IsGentoo() const { return DistroVal == Gentoo; }
114 114
@@ -117,7 +117,7 @@ index b4d485dac8a2..ac0bf25b7c63 100644
117 }; 117 };
118 118
119diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp 119diff --git a/clang/lib/Driver/Distro.cpp b/clang/lib/Driver/Distro.cpp
120index 3cc79535de8d..595656179bdc 100644 120index 71ba71fa1837..f64d0abddf6d 100644
121--- a/clang/lib/Driver/Distro.cpp 121--- a/clang/lib/Driver/Distro.cpp
122+++ b/clang/lib/Driver/Distro.cpp 122+++ b/clang/lib/Driver/Distro.cpp
123@@ -43,6 +43,7 @@ static Distro::DistroType DetectOsRelease(llvm::vfs::FileSystem &VFS) { 123@@ -43,6 +43,7 @@ static Distro::DistroType DetectOsRelease(llvm::vfs::FileSystem &VFS) {
diff --git a/meta/recipes-devtools/clang/clang/0019-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch b/meta/recipes-devtools/clang/clang/0019-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch
index 9518716c00..05937b06c1 100644
--- a/meta/recipes-devtools/clang/clang/0019-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch
+++ b/meta/recipes-devtools/clang/clang/0019-compiler-rt-Do-not-use-backtrace-APIs-on-non-glibc-l.patch
@@ -1,4 +1,4 @@
1From d0f40e9309a3f5734fa76c00994c5ebb70570c6c Mon Sep 17 00:00:00 2001 1From 4a23e833e66896f40bb36c3c13b4a4bb1b79162f Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 19 May 2021 17:32:13 -0700 3Date: Wed, 19 May 2021 17:32:13 -0700
4Subject: [PATCH] compiler-rt: Do not use backtrace APIs on non-glibc linux 4Subject: [PATCH] compiler-rt: Do not use backtrace APIs on non-glibc linux
diff --git a/meta/recipes-devtools/clang/clang/0020-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch b/meta/recipes-devtools/clang/clang/0020-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch
index fd2b434fe2..7ce60e0efd 100644
--- a/meta/recipes-devtools/clang/clang/0020-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch
+++ b/meta/recipes-devtools/clang/clang/0020-clang-Fix-x86-triple-for-non-debian-multiarch-linux-.patch
@@ -1,4 +1,4 @@
1From 1ef38e252a55d2cdb00c3b29154387fce02e9911 Mon Sep 17 00:00:00 2001 1From 739e65a126178e4c4d8452297ac13c119ae79403 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 19 May 2021 17:56:03 -0700 3Date: Wed, 19 May 2021 17:56:03 -0700
4Subject: [PATCH] clang: Fix x86 triple for non-debian multiarch linux distros 4Subject: [PATCH] clang: Fix x86 triple for non-debian multiarch linux distros
diff --git a/meta/recipes-devtools/clang/clang/0021-libunwind-Added-unw_backtrace-method.patch b/meta/recipes-devtools/clang/clang/0021-libunwind-Added-unw_backtrace-method.patch
index 2f0479bdd4..fe7157df47 100644
--- a/meta/recipes-devtools/clang/clang/0021-libunwind-Added-unw_backtrace-method.patch
+++ b/meta/recipes-devtools/clang/clang/0021-libunwind-Added-unw_backtrace-method.patch
@@ -1,4 +1,4 @@
1From 5782e495684d6c056175ea16be83cfe788742d0a Mon Sep 17 00:00:00 2001 1From f60c6ade92826cea1c3d63d70f1168f4048a624b Mon Sep 17 00:00:00 2001
2From: Maksim Kita <maksim-kita@yandex-team.ru> 2From: Maksim Kita <maksim-kita@yandex-team.ru>
3Date: Sun, 23 May 2021 10:27:29 +0000 3Date: Sun, 23 May 2021 10:27:29 +0000
4Subject: [PATCH] libunwind: Added unw_backtrace method 4Subject: [PATCH] libunwind: Added unw_backtrace method
diff --git a/meta/recipes-devtools/clang/clang/0022-lldb-Link-with-libatomic-on-x86.patch b/meta/recipes-devtools/clang/clang/0022-lldb-Link-with-libatomic-on-x86.patch
index 4996bc1c87..128666b8fb 100644
--- a/meta/recipes-devtools/clang/clang/0022-lldb-Link-with-libatomic-on-x86.patch
+++ b/meta/recipes-devtools/clang/clang/0022-lldb-Link-with-libatomic-on-x86.patch
@@ -1,4 +1,4 @@
1From f4f9b07a41449a0acbe5ea1717bb0e2ceabbfaab Mon Sep 17 00:00:00 2001 1From 45d44576a0dbaf843a9795519cafa944801c4679 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 8 Feb 2022 01:31:26 -0800 3Date: Tue, 8 Feb 2022 01:31:26 -0800
4Subject: [PATCH] lldb: Link with libatomic on x86 4Subject: [PATCH] lldb: Link with libatomic on x86
diff --git a/meta/recipes-devtools/clang/clang/0023-compiler-rt-Enable-__int128-for-ppc32.patch b/meta/recipes-devtools/clang/clang/0023-compiler-rt-Enable-__int128-for-ppc32.patch
index eeaca43ae0..861064f4f4 100644
--- a/meta/recipes-devtools/clang/clang/0023-compiler-rt-Enable-__int128-for-ppc32.patch
+++ b/meta/recipes-devtools/clang/clang/0023-compiler-rt-Enable-__int128-for-ppc32.patch
@@ -1,4 +1,4 @@
1From a63acbeb8db17aa113dc2b2058540c61c2a16ac6 Mon Sep 17 00:00:00 2001 1From b676d7d93fa35e095595fc1f967e4c6a3b58414b Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 9 Mar 2022 16:28:16 -0800 3Date: Wed, 9 Mar 2022 16:28:16 -0800
4Subject: [PATCH] compiler-rt: Enable __int128 for ppc32 4Subject: [PATCH] compiler-rt: Enable __int128 for ppc32
diff --git a/meta/recipes-devtools/clang/clang/0024-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch b/meta/recipes-devtools/clang/clang/0024-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch
index 831e3e7d3a..d49af8aeb9 100644
--- a/meta/recipes-devtools/clang/clang/0024-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch
+++ b/meta/recipes-devtools/clang/clang/0024-llvm-Do-not-use-cmake-infra-to-detect-libzstd.patch
@@ -1,4 +1,4 @@
1From abe955ac96370a16258fba1348edb938f3649096 Mon Sep 17 00:00:00 2001 1From 9cf5cc6d4378ad7918f338aa65ce79178d8a84f2 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 12 Aug 2022 11:50:57 -0700 3Date: Fri, 12 Aug 2022 11:50:57 -0700
4Subject: [PATCH] llvm: Do not use cmake infra to detect libzstd 4Subject: [PATCH] llvm: Do not use cmake infra to detect libzstd
diff --git a/meta/recipes-devtools/clang/clang/0025-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch b/meta/recipes-devtools/clang/clang/0025-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch
index 4b8a915837..bca28cd7db 100644
--- a/meta/recipes-devtools/clang/clang/0025-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch
+++ b/meta/recipes-devtools/clang/clang/0025-compiler-rt-Fix-stat-struct-s-size-for-O32-ABI.patch
@@ -1,4 +1,4 @@
1From 7cafe5615d91a429048c8baa824769cdf34aafd1 Mon Sep 17 00:00:00 2001 1From 744dbb6cf6925796e2bc5c028af08c40445bbb1c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 3 Jan 2023 18:44:34 -0800 3Date: Tue, 3 Jan 2023 18:44:34 -0800
4Subject: [PATCH] compiler-rt: Fix stat struct's size for O32 ABI 4Subject: [PATCH] compiler-rt: Fix stat struct's size for O32 ABI
diff --git a/meta/recipes-devtools/clang/clang/0026-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch b/meta/recipes-devtools/clang/clang/0026-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch
index 0e67129705..e129aa245d 100644
--- a/meta/recipes-devtools/clang/clang/0026-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch
+++ b/meta/recipes-devtools/clang/clang/0026-compiler-rt-Undef-_TIME_BITS-along-with-_FILE_OFFSET.patch
@@ -1,4 +1,4 @@
1From 92bf97247bb0df984410a6c1ee6b0d2577e82013 Mon Sep 17 00:00:00 2001 1From 6b6a518bc7686af7680f45fcdea7c414a22a2f53 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 21 Feb 2023 12:46:10 -0800 3Date: Tue, 21 Feb 2023 12:46:10 -0800
4Subject: [PATCH] compiler-rt: Undef _TIME_BITS along with _FILE_OFFSET_BITS in 4Subject: [PATCH] compiler-rt: Undef _TIME_BITS along with _FILE_OFFSET_BITS in
diff --git a/meta/recipes-devtools/clang/clang/0027-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch b/meta/recipes-devtools/clang/clang/0027-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch
index 8362acf8d4..b6852a124d 100644
--- a/meta/recipes-devtools/clang/clang/0027-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch
+++ b/meta/recipes-devtools/clang/clang/0027-ToolChains-Gnu.cpp-ARMLibDirs-search-also-in-lib32.patch
@@ -1,4 +1,4 @@
1From 86a5a81c556e27cd097493a040580362d0217721 Mon Sep 17 00:00:00 2001 1From a83b407a9c1b04d95e6cda74059744fe815fde17 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <Martin.Jansa@gmail.com> 2From: Martin Jansa <Martin.Jansa@gmail.com>
3Date: Thu, 31 Aug 2023 18:14:47 +0200 3Date: Thu, 31 Aug 2023 18:14:47 +0200
4Subject: [PATCH] ToolChains/Gnu.cpp: ARMLibDirs search also in lib32 4Subject: [PATCH] ToolChains/Gnu.cpp: ARMLibDirs search also in lib32
diff --git a/meta/recipes-devtools/clang/clang/0028-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch b/meta/recipes-devtools/clang/clang/0028-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch
index a919a983c3..0136039358 100644
--- a/meta/recipes-devtools/clang/clang/0028-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch
+++ b/meta/recipes-devtools/clang/clang/0028-clang-llvm-Add-OE-specific-ABI-triple-for-N32-ABI.patch
@@ -1,4 +1,4 @@
1From 721b7868a57fe3943557c405dd88365526d3728f Mon Sep 17 00:00:00 2001 1From 3572a4425844ef77131fd2635ea570eafc1df958 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 3 Feb 2024 16:47:10 -0800 3Date: Sat, 3 Feb 2024 16:47:10 -0800
4Subject: [PATCH] clang/llvm: Add OE specific ABI triple for N32 ABI 4Subject: [PATCH] clang/llvm: Add OE specific ABI triple for N32 ABI
diff --git a/meta/recipes-devtools/clang/clang/0029-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch b/meta/recipes-devtools/clang/clang/0029-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch
index 8eda4fb205..a42ac2484d 100644
--- a/meta/recipes-devtools/clang/clang/0029-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch
+++ b/meta/recipes-devtools/clang/clang/0029-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch
@@ -1,4 +1,4 @@
1From cc2fb22ae8e64f65fd726b476c3bf85b4d31906d Mon Sep 17 00:00:00 2001 1From e5223f6013c7c70a7f6e35ecec046cfdc0c15c2a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Tue, 14 May 2024 22:04:43 -0700 3Date: Tue, 14 May 2024 22:04:43 -0700
4Subject: [PATCH] llvm: Add libunwind.pc.in and llvm-config scripts 4Subject: [PATCH] llvm: Add libunwind.pc.in and llvm-config scripts
diff --git a/meta/recipes-devtools/clang/clang/0030-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch b/meta/recipes-devtools/clang/clang/0030-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch
index 01d054512f..85d3ce9ed3 100644
--- a/meta/recipes-devtools/clang/clang/0030-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch
+++ b/meta/recipes-devtools/clang/clang/0030-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch
@@ -1,4 +1,4 @@
1From e468c9f5b5cf85583c0435ad934affd5b900caec Mon Sep 17 00:00:00 2001 1From 3f03bd4a5a16f2b5525f4dc32c7b196840b96856 Mon Sep 17 00:00:00 2001
2From: Martin Jansa <martin.jansa@gmail.com> 2From: Martin Jansa <martin.jansa@gmail.com>
3Date: Fri, 13 Sep 2024 13:38:08 +0200 3Date: Fri, 13 Sep 2024 13:38:08 +0200
4Subject: [PATCH] scan-build-py: respect LLVM_LIBDIR_SUFFIX like other tools do 4Subject: [PATCH] scan-build-py: respect LLVM_LIBDIR_SUFFIX like other tools do
diff --git a/meta/recipes-devtools/clang/clang/0031-compiler-rt-Do-not-pass-target-to-clang-compiler.patch b/meta/recipes-devtools/clang/clang/0031-compiler-rt-Do-not-pass-target-to-clang-compiler.patch
index 01fcc0689d..621c3653f0 100644
--- a/meta/recipes-devtools/clang/clang/0031-compiler-rt-Do-not-pass-target-to-clang-compiler.patch
+++ b/meta/recipes-devtools/clang/clang/0031-compiler-rt-Do-not-pass-target-to-clang-compiler.patch
@@ -1,4 +1,4 @@
1From cbb5bca513714f539c899a123bf5dc17651c9737 Mon Sep 17 00:00:00 2001 1From 518c0025921b0bd21e69bf4c38f369778032f4e0 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 13 Mar 2025 00:30:38 -0700 3Date: Thu, 13 Mar 2025 00:30:38 -0700
4Subject: [PATCH] compiler-rt: Do not pass --target to clang compiler 4Subject: [PATCH] compiler-rt: Do not pass --target to clang compiler
diff --git a/meta/recipes-devtools/clang/clang/0032-Fix-build-on-ppc64-musl.patch b/meta/recipes-devtools/clang/clang/0032-Fix-build-on-ppc64-musl.patch
deleted file mode 100644
index e1fcb3a203..0000000000
--- a/meta/recipes-devtools/clang/clang/0032-Fix-build-on-ppc64-musl.patch
+++ /dev/null
@@ -1,97 +0,0 @@
1From bb99b65d884185a2eb1d4601e5135da582cbd8a9 Mon Sep 17 00:00:00 2001
2From: mojyack <mojyack@gmail.com>
3Date: Mon, 16 Dec 2024 13:42:04 +0900
4Subject: [PATCH] Fix build on ppc64+musl
5
6In powerpc64-unknown-linux-musl, signal.h does not include asm/ptrace.h,
7which causes "member access into incomplete type 'struct pt_regs'" errors.
8Include the header explicitly to fix this.
9
10Also in sanitizer_linux_libcdep.cpp, there is a usage of
11TlsPreTcbSize which is not defined in such a platform.
12Guard the branch with macro.
13
14Upstream-Status: Backport [https://github.com/llvm/llvm-project/pull/120036]
15Signed-off-by: Khem Raj <raj.khem@gmail.com>
16---
17 .../lib/sanitizer_common/sanitizer_linux.cpp | 4 ++++
18 .../sanitizer_common/sanitizer_linux_libcdep.cpp | 13 +++++++------
19 .../sanitizer_platform_limits_posix.cpp | 2 +-
20 .../sanitizer_stoptheworld_linux_libcdep.cpp | 3 ++-
21 4 files changed, 14 insertions(+), 8 deletions(-)
22
23diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
24index 7aa48d29d2d5..a4d526b4466c 100644
25--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
26+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux.cpp
27@@ -86,6 +86,10 @@
28 # include <sys/sysmacros.h>
29 # endif
30
31+# if SANITIZER_LINUX && defined(__powerpc64__)
32+# include <asm/ptrace.h>
33+# endif
34+
35 # if SANITIZER_FREEBSD
36 # include <machine/atomic.h>
37 # include <sys/exec.h>
38diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
39index e11eff13cd32..331e1c7d8d15 100644
40--- a/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
41+++ b/compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cpp
42@@ -619,21 +619,22 @@ static void GetTls(uptr *addr, uptr *size) {
43 *addr = tp - RoundUpTo(*size, align);
44 *size = tp - *addr + ThreadDescriptorSize();
45 # else
46- if (SANITIZER_GLIBC)
47- *size += 1664;
48- else if (SANITIZER_FREEBSD)
49- *size += 128; // RTLD_STATIC_TLS_EXTRA
50-# if defined(__mips__) || defined(__powerpc64__) || SANITIZER_RISCV64
51+# if SANITIZER_GLIBC
52+ *size += 1664;
53+# elif SANITIZER_FREEBSD
54+ *size += 128; // RTLD_STATIC_TLS_EXTRA
55+# if defined(__mips__) || defined(__powerpc64__) || SANITIZER_RISCV64
56 const uptr pre_tcb_size = TlsPreTcbSize();
57 *addr -= pre_tcb_size;
58 *size += pre_tcb_size;
59-# else
60+# else
61 // arm and aarch64 reserve two words at TP, so this underestimates the range.
62 // However, this is sufficient for the purpose of finding the pointers to
63 // thread-specific data keys.
64 const uptr tcb_size = ThreadDescriptorSize();
65 *addr -= tcb_size;
66 *size += tcb_size;
67+# endif
68 # endif
69 # endif
70 # elif SANITIZER_NETBSD
71diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
72index a5311d266b0c..ec5f2edab6a6 100644
73--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
74+++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp
75@@ -96,7 +96,7 @@
76 # include <sys/ptrace.h>
77 # if defined(__mips64) || defined(__aarch64__) || defined(__arm__) || \
78 defined(__hexagon__) || defined(__loongarch__) || SANITIZER_RISCV64 || \
79- defined(__sparc__)
80+ defined(__sparc__) || defined(__powerpc64__)
81 # include <asm/ptrace.h>
82 # ifdef __arm__
83 typedef struct user_fpregs elf_fpregset_t;
84diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
85index 945da99d41f4..58d17d90c343 100644
86--- a/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
87+++ b/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux_libcdep.cpp
88@@ -31,7 +31,8 @@
89 #include <sys/types.h> // for pid_t
90 #include <sys/uio.h> // for iovec
91 #include <elf.h> // for NT_PRSTATUS
92-#if (defined(__aarch64__) || SANITIZER_RISCV64 || SANITIZER_LOONGARCH64) && \
93+#if (defined(__aarch64__) || defined(__powerpc64__) || \
94+ SANITIZER_RISCV64 || SANITIZER_LOONGARCH64) && \
95 !SANITIZER_ANDROID
96 // GLIBC 2.20+ sys/user does not include asm/ptrace.h
97 # include <asm/ptrace.h>
diff --git a/meta/recipes-devtools/clang/clang/0033-clangd-Add-a-build-option-to-disable-building-dexp.patch b/meta/recipes-devtools/clang/clang/0032-clangd-Add-a-build-option-to-disable-building-dexp.patch
index 198989cd42..3e0603477e 100644
--- a/meta/recipes-devtools/clang/clang/0033-clangd-Add-a-build-option-to-disable-building-dexp.patch
+++ b/meta/recipes-devtools/clang/clang/0032-clangd-Add-a-build-option-to-disable-building-dexp.patch
@@ -1,4 +1,4 @@
1From 49fbbb928d5cafba3d367e3750d402b53425943a Mon Sep 17 00:00:00 2001 1From 12abcd058e2aa468054708b0ca7a06f2638eabab Mon Sep 17 00:00:00 2001
2From: Yoann Congal <yoann.congal@smile.fr> 2From: Yoann Congal <yoann.congal@smile.fr>
3Date: Tue, 25 Mar 2025 22:25:55 +0100 3Date: Tue, 25 Mar 2025 22:25:55 +0100
4Subject: [PATCH] clangd: Add a build option to disable building dexp 4Subject: [PATCH] clangd: Add a build option to disable building dexp
diff --git a/meta/recipes-devtools/clang/clang/0034-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch b/meta/recipes-devtools/clang/clang/0033-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch
index 7545ba365b..1901efeae4 100644
--- a/meta/recipes-devtools/clang/clang/0034-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch
+++ b/meta/recipes-devtools/clang/clang/0033-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch
@@ -1,4 +1,4 @@
1From 59921cb127dcfb2c655b357e8deb95004f3da41f Mon Sep 17 00:00:00 2001 1From 9e389e1dc73a2f5601cfbab34249aedffd053235 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Fri, 27 Nov 2020 10:11:08 +0000 3Date: Fri, 27 Nov 2020 10:11:08 +0000
4Subject: [PATCH] AsmMatcherEmitter: sort ClassInfo lists by name as well 4Subject: [PATCH] AsmMatcherEmitter: sort ClassInfo lists by name as well
diff --git a/meta/recipes-devtools/clang/clang/0035-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch b/meta/recipes-devtools/clang/clang/0034-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch
index 81820eeaca..2618f5ac40 100644
--- a/meta/recipes-devtools/clang/clang/0035-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch
+++ b/meta/recipes-devtools/clang/clang/0034-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch
@@ -1,4 +1,4 @@
1From e414f6489e055c981970b7210b941c2a41cc322b Mon Sep 17 00:00:00 2001 1From 81db296472e146995c3c5728981cdc0cc065ab9c Mon Sep 17 00:00:00 2001
2From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> 2From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
3Date: Wed, 2 Apr 2025 17:05:17 +0300 3Date: Wed, 2 Apr 2025 17:05:17 +0300
4Subject: [PATCH] llvm-config: remove LLVM_LDFLAGS from --ldflags output 4Subject: [PATCH] llvm-config: remove LLVM_LDFLAGS from --ldflags output
diff --git a/meta/recipes-devtools/clang/clang/0036-openmp-Do-not-emit-date-and-time-into-generate-files.patch b/meta/recipes-devtools/clang/clang/0035-openmp-Do-not-emit-date-and-time-into-generate-files.patch
index 91c718e2a4..f33d8851ea 100644
--- a/meta/recipes-devtools/clang/clang/0036-openmp-Do-not-emit-date-and-time-into-generate-files.patch
+++ b/meta/recipes-devtools/clang/clang/0035-openmp-Do-not-emit-date-and-time-into-generate-files.patch
@@ -1,4 +1,4 @@
1From f79ebc5bc696e8747c79a2277ffcf8d91bdadfd5 Mon Sep 17 00:00:00 2001 1From c439de272b3f983c6d97b8f6fec0135323e3363c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 23 Apr 2025 11:52:48 -0700 3Date: Wed, 23 Apr 2025 11:52:48 -0700
4Subject: [PATCH] openmp: Do not emit date and time into generate files 4Subject: [PATCH] openmp: Do not emit date and time into generate files
diff --git a/meta/recipes-devtools/clang/clang/0036-libunwind-Use-gcs-instead-of-gcs-target-attribute.patch b/meta/recipes-devtools/clang/clang/0036-libunwind-Use-gcs-instead-of-gcs-target-attribute.patch
new file mode 100644
index 0000000000..fe2bd77b33
--- /dev/null
+++ b/meta/recipes-devtools/clang/clang/0036-libunwind-Use-gcs-instead-of-gcs-target-attribute.patch
@@ -0,0 +1,56 @@
1From 8c839483915183a9c1ca4f74646ca4f478900e77 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 30 Apr 2025 19:51:19 -0700
4Subject: [PATCH] libunwind: Use +gcs instead of gcs target attribute
5
6__attribute__((target("gcs"))) does not work with gcc
7
8GCC-15 has added gcs intrinsics [1] but the syntax for enabling it is
9slightly different. This syntax works with clang too.
10
11With gcc15 compiler libunwind's check for this macros is succeeding and it
12ends up enabling 'gcs' by using function attribute, this works with clang
13but not with gcc but '+gcs' works with both
14
15We can see this in rust compiler bootstrap for aarch64/musl when system
16uses gcc15, it ends up with these errors
17
18Building libunwind.a for aarch64-poky-linux-musl
19cargo:warning=/mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux-musl/rust/1.85.1/rustc-1.85.1-src/src/llvm-project/libunwind/src/UnwindLevel1.c:191:1: error: arch extension 'gcs' should be prefixed by '+'
20cargo:warning= 191 | unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) {
21cargo:warning= | ^~~~~~~~~~~~~
22cargo:warning=/mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux-musl/rust/1.85.1/rustc-1.85.1-src/src/llvm-project/libunwind/src/UnwindLevel1.c:337:22: error: arch extension 'gcs' should be prefixed by '+'
23cargo:warning= 337 | _Unwind_Stop_Fn stop, void *stop_parameter) {
24cargo:warning= | ^~~~~~~~~~~~~~~
25
26[1] https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5a6af707f0af
27
28Upstream-Status: Submitted [https://github.com/llvm/llvm-project/pull/138077]
29
30Signed-off-by: Khem Raj <raj.khem@gmail.com>
31---
32 libunwind/src/UnwindLevel1.c | 4 ++--
33 1 file changed, 2 insertions(+), 2 deletions(-)
34
35diff --git a/libunwind/src/UnwindLevel1.c b/libunwind/src/UnwindLevel1.c
36index 7e785f4d31e7..ed2c8239824c 100644
37--- a/libunwind/src/UnwindLevel1.c
38+++ b/libunwind/src/UnwindLevel1.c
39@@ -185,7 +185,7 @@ extern int __unw_step_stage2(unw_cursor_t *);
40
41 #if defined(_LIBUNWIND_USE_GCS)
42 // Enable the GCS target feature to permit gcspop instructions to be used.
43-__attribute__((target("gcs")))
44+__attribute__((target("+gcs")))
45 #endif
46 static _Unwind_Reason_Code
47 unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *exception_object) {
48@@ -329,7 +329,7 @@ unwind_phase2(unw_context_t *uc, unw_cursor_t *cursor, _Unwind_Exception *except
49
50 #if defined(_LIBUNWIND_USE_GCS)
51 // Enable the GCS target feature to permit gcspop instructions to be used.
52-__attribute__((target("gcs")))
53+__attribute__((target("+gcs")))
54 #endif
55 static _Unwind_Reason_Code
56 unwind_phase2_forced(unw_context_t *uc, unw_cursor_t *cursor,
diff --git a/meta/recipes-devtools/clang/clang/0037-compiler-rt-Exclude-sync_fetch_and_-for-any-pre-ARMv.patch b/meta/recipes-devtools/clang/clang/0037-compiler-rt-Exclude-sync_fetch_and_-for-any-pre-ARMv.patch
new file mode 100644
index 0000000000..a7e5c5a859
--- /dev/null
+++ b/meta/recipes-devtools/clang/clang/0037-compiler-rt-Exclude-sync_fetch_and_-for-any-pre-ARMv.patch
@@ -0,0 +1,63 @@
1From d2360096db2da00121f4e653b39ca1f7eb2801eb Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 10 May 2025 14:03:12 -0700
4Subject: [PATCH] compiler-rt: Exclude sync_fetch_and_* for any pre-ARMv6 targets
5
6Sometimes builds may happen where ABI is not indidated by host_triple
7e.g. on Yocto the compiler used is called arm-poky-linux-gnueabi-clang
8for all arm32 cross compilers, it passed the ABI flags on cmdline in
9addition. e.g.
10
11-march=armv5te -mfloat-abi=soft
12or
13-march=armv7-a -mfloat-abi=hard
14
15compiler-rt's makery tries to add arm to COMPILER_RT_SUPPORTED_ARCH
16deducing it from triple name.
17
18which ends up choosing `arm` as one of compiler-rt arch to build for.
19This arch is however using armv7+ defaults and then tried to build sync
20builtins using
21
22arm-poky-linux-gnueabi-clang -march=armv5te -mfloat-abi=soft ...
23
24Which does not compile correctly, in such cases it should simply
25remove the sync builtins from list of things to build similar to what
26is done when we use armv4t or armv5t
27
28set(armv4t_SOURCES ${arm_min_SOURCES})
29set(armv5te_SOURCES ${arm_min_SOURCES})
30
31This lets compiler-rt build for arm architectures without depending
32upong compiler triple, but instead of poking the compiler for what
33it is building for
34
35Upstream-Status: Submitted [https://github.com/llvm/llvm-project/pull/139411]
36Signed-off-by: Khem Raj <raj.khem@gmail.com>
37---
38 compiler-rt/lib/builtins/CMakeLists.txt | 12 ++++++++++++
39 1 file changed, 12 insertions(+)
40
41diff --git a/compiler-rt/lib/builtins/CMakeLists.txt b/compiler-rt/lib/builtins/CMakeLists.txt
42index cb276311b290..53a3cd1dc81f 100644
43--- a/compiler-rt/lib/builtins/CMakeLists.txt
44+++ b/compiler-rt/lib/builtins/CMakeLists.txt
45@@ -864,6 +864,18 @@ else ()
46 list(JOIN BUILTIN_CFLAGS " " CMAKE_REQUIRED_FLAGS)
47 set(CMAKE_REQUIRED_FLAGS "${TARGET_${arch}_CFLAGS} ${BUILTIN_CFLAGS_${arch}}")
48 message(STATUS "Performing additional configure checks with target flags: ${CMAKE_REQUIRED_FLAGS}")
49+ # For ARM archs, exclude any sync builtins if dmb or mcr p15, #0, r0, c7, c10, #5
50+ # is not supported
51+ if (${arch} MATCHES "^(arm|armhf)$")
52+ try_compile_only(COMPILER_RT_HAS_${arch}_SYNC
53+ SOURCE "#if __ARM_ARCH < 6
54+ #error DMB is only supported on ARMv6+ !
55+ #endif
56+ int main(void) { return 0; }")
57+ if(NOT COMPILER_RT_HAS_${arch}_SYNC)
58+ list(REMOVE_ITEM ${arch}_SOURCES ${arm_sync_SOURCES})
59+ endif()
60+ endif()
61 # For ARM archs, exclude any VFP builtins if VFP is not supported
62 if (${arch} MATCHES "^(arm|armhf|armv7|armv7s|armv7k|armv7m|armv7em|armv8m.main|armv8.1m.main)$")
63 string(REPLACE ";" " " _TARGET_${arch}_CFLAGS "${TARGET_${arch}_CFLAGS}")
diff --git a/meta/recipes-devtools/clang/clang/0038-compiler-rt-Hardcode-uptr-sptr-typedefs-on-Mips-Linu.patch b/meta/recipes-devtools/clang/clang/0038-compiler-rt-Hardcode-uptr-sptr-typedefs-on-Mips-Linu.patch
new file mode 100644
index 0000000000..b54c163857
--- /dev/null
+++ b/meta/recipes-devtools/clang/clang/0038-compiler-rt-Hardcode-uptr-sptr-typedefs-on-Mips-Linu.patch
@@ -0,0 +1,35 @@
1From 9f88f2e4efa56e53c78f9b67775c71afa711a69c Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 22 May 2025 21:50:45 -0700
4Subject: [PATCH] [compiler-rt] Hardcode uptr/sptr typedefs on Mips/Linux
5
6Sanitizer build on Mips/Linux faills to build due to assertion errors
7mismatched definitions. This is due to inconsistent definitions of
8`uptr` of either `unsigned long` or `unsigned int` in compiler-rt. This
9is caused by clang defining
10
11__UINTPTR_TYPE__ long unsigned int where as gcc defines it as
12unsigned int
13
14As a workaround, this hardcodes `uptr`/`sptr` in compiler-rt to
15`unsigned int`/`int` on Linux Mips, matching gcc.
16
17Upstream-Status: Submitted [https://github.com/llvm/llvm-project/pull/141201]
18Signed-off-by: Khem Raj <raj.khem@gmail.com>
19---
20 compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
24index fff60c96f632..511ee8fe49cc 100644
25--- a/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
26+++ b/compiler-rt/lib/sanitizer_common/sanitizer_internal_defs.h
27@@ -139,7 +139,7 @@
28 namespace __sanitizer {
29
30 #if defined(__UINTPTR_TYPE__)
31-# if defined(__arm__) && defined(__linux__)
32+# if (defined(__arm__) || _ABIO32 == 1) && defined(__linux__)
33 // Linux Arm headers redefine __UINTPTR_TYPE__ and disagree with clang/gcc.
34 typedef unsigned int uptr;
35 typedef int sptr;
diff --git a/meta/recipes-devtools/clang/clang_git.bb b/meta/recipes-devtools/clang/clang_git.bb
index b41b700292..f958b72414 100644
--- a/meta/recipes-devtools/clang/clang_git.bb
+++ b/meta/recipes-devtools/clang/clang_git.bb
@@ -49,7 +49,7 @@ def get_clang_host_arch(bb, d):
49def get_clang_target_arch(bb, d): 49def get_clang_target_arch(bb, d):
50 return get_clang_arch(bb, d, 'TARGET_ARCH') 50 return get_clang_arch(bb, d, 'TARGET_ARCH')
51 51
52PACKAGECONFIG_CLANG_COMMON = "build-id eh libedit rtti shared-libs \ 52PACKAGECONFIG_CLANG_COMMON = "build-id eh libedit rtti shared-libs libclang-python \
53 ${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', 'compiler-rt libcplusplus libomp unwindlib', '', d)} \ 53 ${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', 'compiler-rt libcplusplus libomp unwindlib', '', d)} \
54 " 54 "
55 55
@@ -90,6 +90,7 @@ PACKAGECONFIG[split-dwarf] = "-DLLVM_USE_SPLIT_DWARF=ON,-DLLVM_USE_SPLIT_DWARF=O
90PACKAGECONFIG[terminfo] = "-DLLVM_ENABLE_TERMINFO=ON -DCOMPILER_RT_TERMINFO_LIB=ON,-DLLVM_ENABLE_TERMINFO=OFF -DCOMPILER_RT_TERMINFO_LIB=OFF,ncurses," 90PACKAGECONFIG[terminfo] = "-DLLVM_ENABLE_TERMINFO=ON -DCOMPILER_RT_TERMINFO_LIB=ON,-DLLVM_ENABLE_TERMINFO=OFF -DCOMPILER_RT_TERMINFO_LIB=OFF,ncurses,"
91PACKAGECONFIG[thin-lto] = "-DLLVM_ENABLE_LTO=Thin -DLLVM_BINUTILS_INCDIR=${STAGING_INCDIR},,binutils," 91PACKAGECONFIG[thin-lto] = "-DLLVM_ENABLE_LTO=Thin -DLLVM_BINUTILS_INCDIR=${STAGING_INCDIR},,binutils,"
92PACKAGECONFIG[unwindlib] = "-DCLANG_DEFAULT_UNWINDLIB=libunwind,-DCLANG_DEFAULT_UNWINDLIB=libgcc,," 92PACKAGECONFIG[unwindlib] = "-DCLANG_DEFAULT_UNWINDLIB=libunwind,-DCLANG_DEFAULT_UNWINDLIB=libgcc,,"
93PACKAGECONFIG[libclang-python] = "-DCLANG_PYTHON_BINDINGS_VERSIONS=${PYTHON_BASEVERSION},,"
93 94
94OECMAKE_SOURCEPATH = "${S}/llvm" 95OECMAKE_SOURCEPATH = "${S}/llvm"
95 96
@@ -206,7 +207,7 @@ EXTRA_OECMAKE:append:class-target = "\
206 207
207DEPENDS = "binutils zlib zstd libffi libxml2 libxml2-native ninja-native swig-native spirv-tools-native" 208DEPENDS = "binutils zlib zstd libffi libxml2 libxml2-native ninja-native swig-native spirv-tools-native"
208DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_SYS} virtual/nativesdk-cross-binutils nativesdk-python3" 209DEPENDS:append:class-nativesdk = " clang-crosssdk-${SDK_SYS} virtual/nativesdk-cross-binutils nativesdk-python3"
209DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} python3 ${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', 'compiler-rt libcxx', '', d)}" 210DEPENDS:append:class-target = " clang-cross-${TARGET_ARCH} python3 ${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', 'compiler-rt libcxx', '', d)} spirv-llvm-translator-native"
210 211
211RRECOMMENDS:${PN} = "binutils" 212RRECOMMENDS:${PN} = "binutils"
212RRECOMMENDS:${PN}:append:class-target = "${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', ' libcxx-dev', '', d)}" 213RRECOMMENDS:${PN}:append:class-target = "${@bb.utils.contains('TC_CXX_RUNTIME', 'llvm', ' libcxx-dev', '', d)}"
@@ -312,7 +313,7 @@ PROVIDES:append:class-native = " llvm-native libclc-native"
312PROVIDES:append:class-target = " llvm libclc" 313PROVIDES:append:class-target = " llvm libclc"
313PROVIDES:append:class-nativesdk = " nativesdk-llvm nativesdk-libclc" 314PROVIDES:append:class-nativesdk = " nativesdk-llvm nativesdk-libclc"
314 315
315PACKAGES =+ "${PN}-libllvm ${PN}-lldb-python ${PN}-libclang-cpp ${PN}-tidy ${PN}-format ${PN}-tools ${PN}-clc \ 316PACKAGES =+ "${PN}-libllvm ${PN}-lldb-python ${PN}-libclang-python ${PN}-libclang-cpp ${PN}-tidy ${PN}-format ${PN}-tools ${PN}-clc \
316 libclang lldb lldb-server liblldb llvm-linker-tools" 317 libclang lldb lldb-server liblldb llvm-linker-tools"
317 318
318 319
@@ -342,6 +343,8 @@ FILES:${PN}-libclang-cpp = "${libdir}/libclang-cpp.so.*"
342 343
343FILES:${PN}-lldb-python = "${libdir}/python*/site-packages/lldb/*" 344FILES:${PN}-lldb-python = "${libdir}/python*/site-packages/lldb/*"
344 345
346FILES:${PN}-libclang-python = "${PYTHON_SITEPACKAGES_DIR}/clang/*"
347
345FILES:${PN}-tidy = "${bindir}/*clang-tidy*" 348FILES:${PN}-tidy = "${bindir}/*clang-tidy*"
346FILES:${PN}-format = "${bindir}/*clang-format*" 349FILES:${PN}-format = "${bindir}/*clang-format*"
347 350
diff --git a/meta/recipes-devtools/clang/common-clang.inc b/meta/recipes-devtools/clang/common-clang.inc
index 1099274d90..45616de3e3 100644
--- a/meta/recipes-devtools/clang/common-clang.inc
+++ b/meta/recipes-devtools/clang/common-clang.inc
@@ -5,7 +5,7 @@ LLVM_HTTP ?= "https://github.com/llvm"
5 5
6MAJOR_VER = "20" 6MAJOR_VER = "20"
7MINOR_VER = "1" 7MINOR_VER = "1"
8PATCH_VER = "4" 8PATCH_VER = "5"
9# could be 'rcX' or 'git' or empty ( for release ) 9# could be 'rcX' or 'git' or empty ( for release )
10VER_SUFFIX = "" 10VER_SUFFIX = ""
11 11
diff --git a/meta/recipes-devtools/clang/common.inc b/meta/recipes-devtools/clang/common.inc
index 07315f17e4..f53336326a 100644
--- a/meta/recipes-devtools/clang/common.inc
+++ b/meta/recipes-devtools/clang/common.inc
@@ -17,7 +17,7 @@ BASEURI ?= "${LLVM_HTTP}/llvm-project/releases/download/llvmorg-${PV}/llvm-proje
17UPSTREAM_CHECK_URI = "${LLVM_HTTP}/llvm-project/releases/" 17UPSTREAM_CHECK_URI = "${LLVM_HTTP}/llvm-project/releases/"
18UPSTREAM_CHECK_REGEX = "releases/tag/llvmorg-?(?P<pver>\d+(\.\d+)+)" 18UPSTREAM_CHECK_REGEX = "releases/tag/llvmorg-?(?P<pver>\d+(\.\d+)+)"
19SOURCEDIR ?= "llvm-project-${PV}.src" 19SOURCEDIR ?= "llvm-project-${PV}.src"
20SRC_URI[sha256sum] = "a95365b02536ed4aef29b325c205dd89c268cba41503ab2fc05f81418613ab63" 20SRC_URI[sha256sum] = "a069565cd1c6aee48ee0f36de300635b5781f355d7b3c96a28062d50d575fa3e"
21 21
22SRC_URI = "\ 22SRC_URI = "\
23 ${BASEURI} \ 23 ${BASEURI} \
@@ -52,11 +52,13 @@ SRC_URI = "\
52 file://0029-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch \ 52 file://0029-llvm-Add-libunwind.pc.in-and-llvm-config-scripts.patch \
53 file://0030-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch \ 53 file://0030-scan-build-py-respect-LLVM_LIBDIR_SUFFIX-like-other-.patch \
54 file://0031-compiler-rt-Do-not-pass-target-to-clang-compiler.patch \ 54 file://0031-compiler-rt-Do-not-pass-target-to-clang-compiler.patch \
55 file://0032-Fix-build-on-ppc64-musl.patch \ 55 file://0032-clangd-Add-a-build-option-to-disable-building-dexp.patch \
56 file://0033-clangd-Add-a-build-option-to-disable-building-dexp.patch \ 56 file://0033-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch \
57 file://0034-AsmMatcherEmitter-sort-ClassInfo-lists-by-name-as-we.patch \ 57 file://0034-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch \
58 file://0035-llvm-config-remove-LLVM_LDFLAGS-from-ldflags-output.patch \ 58 file://0035-openmp-Do-not-emit-date-and-time-into-generate-files.patch \
59 file://0036-openmp-Do-not-emit-date-and-time-into-generate-files.patch \ 59 file://0036-libunwind-Use-gcs-instead-of-gcs-target-attribute.patch \
60 file://0037-compiler-rt-Exclude-sync_fetch_and_-for-any-pre-ARMv.patch \
61 file://0038-compiler-rt-Hardcode-uptr-sptr-typedefs-on-Mips-Linu.patch \
60" 62"
61# Fallback to no-PIE if not set 63# Fallback to no-PIE if not set
62GCCPIE ??= "" 64GCCPIE ??= ""
diff --git a/meta/recipes-devtools/clang/compiler-rt-sanitizers_git.bb b/meta/recipes-devtools/clang/compiler-rt-sanitizers_git.bb
index bb3c8aa20a..f8e7bb13d2 100644
--- a/meta/recipes-devtools/clang/compiler-rt-sanitizers_git.bb
+++ b/meta/recipes-devtools/clang/compiler-rt-sanitizers_git.bb
@@ -14,6 +14,14 @@ BPN = "compiler-rt-sanitizers"
14 14
15inherit cmake pkgconfig python3native 15inherit cmake pkgconfig python3native
16 16
17def get_compiler_rt_arch(bb, d):
18 if bb.utils.contains('TUNE_FEATURES', 'armv5 thumb dsp', True, False, d):
19 return 'armv5te'
20 elif bb.utils.contains('TUNE_FEATURES', 'armv4 thumb', True, False, d):
21 return 'armv4t'
22 elif bb.utils.contains('TUNE_FEATURES', 'arm vfp callconvention-hard', True, False, d):
23 return 'armhf'
24 return d.getVar('HOST_ARCH')
17 25
18LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=d846d1d65baf322d4c485d6ee54e877a" 26LIC_FILES_CHKSUM = "file://compiler-rt/LICENSE.TXT;md5=d846d1d65baf322d4c485d6ee54e877a"
19 27
@@ -56,6 +64,7 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
56 -DCOMPILER_RT_BUILD_LIBFUZZER=ON \ 64 -DCOMPILER_RT_BUILD_LIBFUZZER=ON \
57 -DCOMPILER_RT_BUILD_PROFILE=ON \ 65 -DCOMPILER_RT_BUILD_PROFILE=ON \
58 -DCOMPILER_RT_BUILD_MEMPROF=ON \ 66 -DCOMPILER_RT_BUILD_MEMPROF=ON \
67 -DCOMPILER_RT_DEFAULT_TARGET_ARCH=${@get_compiler_rt_arch(bb, d)} \
59 -DLLVM_ENABLE_RUNTIMES='compiler-rt' \ 68 -DLLVM_ENABLE_RUNTIMES='compiler-rt' \
60 -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \ 69 -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \
61 -DLLVM_APPEND_VC_REV=OFF \ 70 -DLLVM_APPEND_VC_REV=OFF \
@@ -64,16 +73,13 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
64 73
65EXTRA_OECMAKE:append:class-native = "\ 74EXTRA_OECMAKE:append:class-native = "\
66 -DCOMPILER_RT_USE_BUILTINS_LIBRARY=OFF \ 75 -DCOMPILER_RT_USE_BUILTINS_LIBRARY=OFF \
67 -DCMAKE_C_COMPILER_TARGET=${HOST_ARCH}${HOST_VENDOR}-${HOST_OS} \
68 -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
69 -DCOMPILER_RT_DEFAULT_TARGET_ARCH=${HOST_ARCH} \
70" 76"
71 77
72EXTRA_OECMAKE:append:class-target = "\ 78EXTRA_OECMAKE:append:class-target = "\
73 -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ 79 -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \
74 -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ 80 -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \
75 -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ 81 -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
76 -DCMAKE_C_COMPILER_TARGET=${HOST_ARCH}${HOST_VENDOR}-${HOST_OS} \ 82 -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
77 -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \ 83 -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
78 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ 84 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
79" 85"
@@ -84,12 +90,11 @@ EXTRA_OECMAKE:append:class-nativesdk = "\
84 -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ 90 -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
85 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ 91 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
86 -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ 92 -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \
87 -DCMAKE_C_COMPILER_TARGET=${HOST_ARCH}${HOST_VENDOR}-${HOST_OS} \ 93 -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
88 -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \ 94 -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
89" 95"
90 96
91EXTRA_OECMAKE:append:libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=ON " 97EXTRA_OECMAKE:append:libc-musl = " -DLIBCXX_HAS_MUSL_LIBC=ON "
92EXTRA_OECMAKE:append:powerpc = " -DCOMPILER_RT_DEFAULT_TARGET_ARCH=powerpc "
93 98
94do_install:append () { 99do_install:append () {
95 mkdir -p ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib 100 mkdir -p ${D}${nonarch_libdir}/clang/${MAJOR_VER}.${MINOR_VER}.${PATCH_VER}/lib
diff --git a/meta/recipes-devtools/clang/compiler-rt_git.bb b/meta/recipes-devtools/clang/compiler-rt_git.bb
index 0a0ef6be80..ad145f8644 100644
--- a/meta/recipes-devtools/clang/compiler-rt_git.bb
+++ b/meta/recipes-devtools/clang/compiler-rt_git.bb
@@ -58,11 +58,19 @@ BUILD_CXX = "${CCACHE}clang++ ${BUILD_CC_ARCH}"
58LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}" 58LDFLAGS += "${COMPILER_RT} ${UNWINDLIB}"
59CXXFLAGS += "${LIBCPLUSPLUS}" 59CXXFLAGS += "${LIBCPLUSPLUS}"
60 60
61def get_compiler_rt_arch(bb, d):
62 if bb.utils.contains('TUNE_FEATURES', 'armv5 thumb dsp', True, False, d):
63 return 'armv5te'
64 elif bb.utils.contains('TUNE_FEATURES', 'armv4 thumb', True, False, d):
65 return 'armv4t'
66 elif bb.utils.contains('TUNE_FEATURES', 'arm vfp callconvention-hard', True, False, d):
67 return 'armhf'
68 return d.getVar('HOST_ARCH')
69
61OECMAKE_TARGET_COMPILE = "compiler-rt" 70OECMAKE_TARGET_COMPILE = "compiler-rt"
62OECMAKE_TARGET_INSTALL = "install-compiler-rt install-compiler-rt-headers" 71OECMAKE_TARGET_INSTALL = "install-compiler-rt install-compiler-rt-headers"
63OECMAKE_SOURCEPATH = "${S}/llvm" 72OECMAKE_SOURCEPATH = "${S}/llvm"
64EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \ 73EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
65 -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
66 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \ 74 -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF \
67 -DCOMPILER_RT_STANDALONE_BUILD=ON \ 75 -DCOMPILER_RT_STANDALONE_BUILD=ON \
68 -DCOMPILER_RT_INCLUDE_TESTS=OFF \ 76 -DCOMPILER_RT_INCLUDE_TESTS=OFF \
@@ -70,11 +78,10 @@ EXTRA_OECMAKE += "-DCMAKE_BUILD_TYPE=RelWithDebInfo \
70 -DCOMPILER_RT_BUILD_SANITIZERS=OFF \ 78 -DCOMPILER_RT_BUILD_SANITIZERS=OFF \
71 -DCOMPILER_RT_BUILD_MEMPROF=OFF \ 79 -DCOMPILER_RT_BUILD_MEMPROF=OFF \
72 -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \ 80 -DCOMPILER_RT_BUILD_LIBFUZZER=OFF \
73 -DCOMPILER_RT_DEFAULT_TARGET_ARCH=${HOST_ARCH} \ 81 -DCOMPILER_RT_DEFAULT_TARGET_ARCH=${@get_compiler_rt_arch(bb, d)} \
74 -DLLVM_ENABLE_RUNTIMES='compiler-rt' \ 82 -DLLVM_ENABLE_RUNTIMES='compiler-rt' \
75 -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \ 83 -DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} \
76 -DLLVM_APPEND_VC_REV=OFF \ 84 -DLLVM_APPEND_VC_REV=OFF \
77 -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
78 -S ${S}/runtimes \ 85 -S ${S}/runtimes \
79" 86"
80 87
@@ -82,6 +89,8 @@ EXTRA_OECMAKE:append:class-target = "\
82 -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \ 89 -DCMAKE_RANLIB=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ranlib \
83 -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \ 90 -DCMAKE_AR=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-ar \
84 -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ 91 -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
92 -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
93 -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
85 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \ 94 -DCMAKE_POSITION_INDEPENDENT_CODE=ON \
86" 95"
87 96
@@ -91,6 +100,8 @@ EXTRA_OECMAKE:append:class-nativesdk = "\
91 -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \ 100 -DCMAKE_NM=${STAGING_BINDIR_TOOLCHAIN}/${TARGET_PREFIX}llvm-nm \
92 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \ 101 -DLLVM_TABLEGEN=${STAGING_BINDIR_NATIVE}/llvm-tblgen \
93 -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \ 102 -DCLANG_TABLEGEN=${STAGING_BINDIR_NATIVE}/clang-tblgen \
103 -DCMAKE_C_COMPILER_TARGET=${HOST_SYS} \
104 -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON \
94" 105"
95 106
96do_install:append () { 107do_install:append () {
diff --git a/meta/recipes-devtools/gcc/gcc-15.1.inc b/meta/recipes-devtools/gcc/gcc-15.1.inc
index 864c6091a6..0032500cdc 100644
--- a/meta/recipes-devtools/gcc/gcc-15.1.inc
+++ b/meta/recipes-devtools/gcc/gcc-15.1.inc
@@ -10,6 +10,8 @@ BINV = "15.1.0"
10 10
11FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:" 11FILESEXTRAPATHS =. "${FILE_DIRNAME}/gcc:${FILE_DIRNAME}/gcc/backport:"
12 12
13TOOLCHAIN = "gcc"
14
13DEPENDS =+ "mpfr gmp libmpc zlib zstd flex-native" 15DEPENDS =+ "mpfr gmp libmpc zlib zstd flex-native"
14NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native zstd-native" 16NATIVEDEPS = "mpfr-native gmp-native libmpc-native zlib-native flex-native zstd-native"
15 17
@@ -69,6 +71,8 @@ SRC_URI = "${BASEURI} \
69 file://0023-Fix-install-path-of-linux64.h.patch \ 71 file://0023-Fix-install-path-of-linux64.h.patch \
70 file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \ 72 file://0024-Avoid-hardcoded-build-paths-into-ppc-libgcc.patch \
71 file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \ 73 file://0025-gcc-testsuite-tweaks-for-mips-OE.patch \
74 file://0026-arm-fully-validate-mem_noofs_operand-PR120351.patch \
75 file://0026-fix-incorrect-preprocessor-line-numbers.patch \
72" 76"
73 77
74S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${SOURCEDIR}" 78S = "${TMPDIR}/work-shared/gcc-${PV}-${PR}/${SOURCEDIR}"
diff --git a/meta/recipes-devtools/gcc/gcc-multilib-config.inc b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
index 2dbbc23c94..d9959364c3 100644
--- a/meta/recipes-devtools/gcc/gcc-multilib-config.inc
+++ b/meta/recipes-devtools/gcc/gcc-multilib-config.inc
@@ -34,6 +34,7 @@ python gcc_multilib_setup() {
34 '%s/aarch64/aarch64-linux.h' % src_conf_dir, 34 '%s/aarch64/aarch64-linux.h' % src_conf_dir,
35 '%s/aarch64/aarch64-cores.def' % src_conf_dir, 35 '%s/aarch64/aarch64-cores.def' % src_conf_dir,
36 '%s/arm/linux-eabi.h' % src_conf_dir, 36 '%s/arm/linux-eabi.h' % src_conf_dir,
37 '%s/riscv/t-linux*' % src_conf_dir,
37 '%s/*/linux.h' % src_conf_dir, 38 '%s/*/linux.h' % src_conf_dir,
38 '%s/linux.h' % src_conf_dir) 39 '%s/linux.h' % src_conf_dir)
39 40
@@ -45,6 +46,9 @@ python gcc_multilib_setup() {
45 bb.utils.mkdirhier('%s/%s' % (build_conf_dir, parent_dir)) 46 bb.utils.mkdirhier('%s/%s' % (build_conf_dir, parent_dir))
46 bb.utils.copyfile(fn, '%s/%s' % (build_conf_dir, rel_path)) 47 bb.utils.copyfile(fn, '%s/%s' % (build_conf_dir, rel_path))
47 48
49 # For now, force the riscv multilib view to our own meaning we can always enable multilib
50 bb.utils.copyfile('%s/riscv/t-linux' % src_conf_dir, '%s/riscv/t-linux-multilib' % build_conf_dir)
51
48 pn = d.getVar('PN') 52 pn = d.getVar('PN')
49 multilibs = (d.getVar('MULTILIB_VARIANTS') or '').split() 53 multilibs = (d.getVar('MULTILIB_VARIANTS') or '').split()
50 if not multilibs and pn != "nativesdk-gcc": 54 if not multilibs and pn != "nativesdk-gcc":
@@ -145,6 +149,7 @@ python gcc_multilib_setup() {
145 'i686' : ['gcc/config/i386/t-linux64'], 149 'i686' : ['gcc/config/i386/t-linux64'],
146 'mips' : ['gcc/config/mips/t-linux64'], 150 'mips' : ['gcc/config/mips/t-linux64'],
147 'mips64' : ['gcc/config/mips/t-linux64'], 151 'mips64' : ['gcc/config/mips/t-linux64'],
152 'riscv64' : ['gcc/config/riscv/t-linux-multilib'],
148 'powerpc' : ['gcc/config/rs6000/t-linux64'], 153 'powerpc' : ['gcc/config/rs6000/t-linux64'],
149 'powerpc64' : ['gcc/config/rs6000/t-linux64'], 154 'powerpc64' : ['gcc/config/rs6000/t-linux64'],
150 'aarch64' : ['gcc/config/aarch64/t-aarch64'], 155 'aarch64' : ['gcc/config/aarch64/t-aarch64'],
@@ -161,6 +166,7 @@ python gcc_multilib_setup() {
161 'powerpc64' : ['gcc/config/linux.h', 'gcc/config/rs6000/linux64.h'], 166 'powerpc64' : ['gcc/config/linux.h', 'gcc/config/rs6000/linux64.h'],
162 'aarch64' : ['gcc/config/linux.h', 'gcc/config/aarch64/aarch64-linux.h', 'gcc/config/arm/linux-eabi.h'], 167 'aarch64' : ['gcc/config/linux.h', 'gcc/config/aarch64/aarch64-linux.h', 'gcc/config/arm/linux-eabi.h'],
163 'arm' : ['gcc/config/linux.h', 'gcc/config/aarch64/aarch64-linux.h', 'gcc/config/arm/linux-eabi.h'], 168 'arm' : ['gcc/config/linux.h', 'gcc/config/aarch64/aarch64-linux.h', 'gcc/config/arm/linux-eabi.h'],
169 'riscv64' : ['gcc/config/linux.h'],
164 } 170 }
165 171
166 libdir32 = 'SYSTEMLIBS_DIR' 172 libdir32 = 'SYSTEMLIBS_DIR'
diff --git a/meta/recipes-devtools/gcc/gcc-runtime.inc b/meta/recipes-devtools/gcc/gcc-runtime.inc
index afcc13a310..fe1f43b2fd 100644
--- a/meta/recipes-devtools/gcc/gcc-runtime.inc
+++ b/meta/recipes-devtools/gcc/gcc-runtime.inc
@@ -144,6 +144,11 @@ do_install:append:class-target () {
144 ln -sf ../${X86ARCH32}${TARGET_VENDOR}-${TARGET_OS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}/32 144 ln -sf ../${X86ARCH32}${TARGET_VENDOR}-${TARGET_OS} ${D}${includedir}/c++/${BINV}/${TARGET_ARCH}${TARGET_VENDOR}-${TARGET_OS}/32
145 fi 145 fi
146 146
147 if [ "${TARGET_ARCH}" = "riscv64" -a "${MULTILIB_VARIANTS}" = "" ]; then
148 mv ${D}${includedir}/c++/${BINV}/${TARGET_SYS}/bits/* ${D}${includedir}/c++/${BINV}/bits
149 mv ${D}${includedir}/c++/${BINV}/${TARGET_SYS}/ext/* ${D}${includedir}/c++/${BINV}/ext
150 fi
151
147 if [ "${TCLIBC}" != "glibc" ]; then 152 if [ "${TCLIBC}" != "glibc" ]; then
148 case "${TARGET_OS}" in 153 case "${TARGET_OS}" in
149 "linux-musl" | "linux-*spe") extra_target_os="linux";; 154 "linux-musl" | "linux-*spe") extra_target_os="linux";;
diff --git a/meta/recipes-devtools/gcc/gcc/0026-arm-fully-validate-mem_noofs_operand-PR120351.patch b/meta/recipes-devtools/gcc/gcc/0026-arm-fully-validate-mem_noofs_operand-PR120351.patch
new file mode 100644
index 0000000000..3f324fdc22
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc/0026-arm-fully-validate-mem_noofs_operand-PR120351.patch
@@ -0,0 +1,95 @@
1From bb7adc5dab8bcee2ef1c0d2af370ea77c49bb5c5 Mon Sep 17 00:00:00 2001
2From: Richard Earnshaw <rearnsha@arm.com>
3Date: Mon, 19 May 2025 16:19:39 +0100
4Subject: [PATCH] arm: fully validate mem_noofs_operand [PR120351]
5
6It's not enough to just check that a memory operand is of the form
7mem(reg); after RA we also need to validate the register being used.
8The safest way to do this is to call memory_operand.
9
10 PR target/120351
11
12gcc/ChangeLog:
13
14 * config/arm/predicates.md (mem_noofs_operand): Also check the op
15 is a valid memory_operand.
16
17gcc/testsuite/ChangeLog:
18
19 * gcc.target/arm/pr120351.c: New test.
20
21Upstream-Status: Backport [https://gcc.gnu.org/cgit/gcc/commit/?id=e5bb7a328eb71daa02d15b48d3a6c6b8cd24abc5]
22Signed-off-by: Khem Raj <raj.khem@gmail.com>
23---
24 gcc/config/arm/predicates.md | 3 +-
25 gcc/testsuite/gcc.target/arm/pr120351.c | 47 +++++++++++++++++++++++++
26 2 files changed, 49 insertions(+), 1 deletion(-)
27 create mode 100644 gcc/testsuite/gcc.target/arm/pr120351.c
28
29diff --git a/gcc/config/arm/predicates.md b/gcc/config/arm/predicates.md
30index 75c06d9be25..655f60312de 100644
31--- a/gcc/config/arm/predicates.md
32+++ b/gcc/config/arm/predicates.md
33@@ -907,7 +907,8 @@
34
35 (define_predicate "mem_noofs_operand"
36 (and (match_code "mem")
37- (match_code "reg" "0")))
38+ (match_code "reg" "0")
39+ (match_operand 0 "memory_operand")))
40
41 (define_predicate "call_insn_operand"
42 (ior (and (match_code "symbol_ref")
43diff --git a/gcc/testsuite/gcc.target/arm/pr120351.c b/gcc/testsuite/gcc.target/arm/pr120351.c
44new file mode 100644
45index 00000000000..d8e9d73275c
46--- /dev/null
47+++ b/gcc/testsuite/gcc.target/arm/pr120351.c
48@@ -0,0 +1,47 @@
49+/* { dg-do assemble } */
50+/* { dg-require-effective-target arm_neon_ok } */
51+/* { dg-add-options arm_neon } */
52+/* { dg-additional-options "-O2" } */
53+
54+
55+typedef struct A
56+{
57+ int f1;
58+} A;
59+
60+__inline void ref (A* x)
61+{
62+ __atomic_fetch_add(&x->f1, 1, 0);
63+}
64+
65+typedef struct B
66+{
67+ A *d;
68+ int *ptr;
69+} B;
70+
71+void insertOne (B*, B*);
72+
73+void init (B *);
74+__inline void copy (B *p, B *q)
75+{
76+ p->d = q->d;
77+ p->ptr = q->ptr;
78+ ref (p->d);
79+}
80+
81+__inline void emplace(B* x)
82+{
83+ B dummy;
84+ B _tmp;
85+ init (&dummy);
86+ copy (&_tmp, &dummy);
87+ insertOne(x, &_tmp);
88+}
89+
90+void testing ()
91+{
92+ B test;
93+ init (&test);
94+ emplace(&test);
95+}
diff --git a/meta/recipes-devtools/gcc/gcc/0026-fix-incorrect-preprocessor-line-numbers.patch b/meta/recipes-devtools/gcc/gcc/0026-fix-incorrect-preprocessor-line-numbers.patch
new file mode 100644
index 0000000000..f799085662
--- /dev/null
+++ b/meta/recipes-devtools/gcc/gcc/0026-fix-incorrect-preprocessor-line-numbers.patch
@@ -0,0 +1,475 @@
1From edf745dc519ddbfef127e2789bf11bfbacd300b7 Mon Sep 17 00:00:00 2001
2From: Jakub Jelinek <jakub@redhat.com>
3Date: Wed, 7 May 2025 17:25:42 +0200
4Subject: libcpp: Further fixes for incorrect line numbers in large files
5 [PR120061]
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10The backport of the PR108900 fix to 14 branch broke building chromium
11because static_assert (__LINE__ == expected_line_number, ""); now triggers
12as the __LINE__ values are off by one.
13This isn't the case on the trunk and 15 branch because we've switched
14to 64-bit location_t and so one actually needs far longer header files
15to trigger it.
16https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120061#c11
17https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120061#c12
18contain (large) testcases in patch form which show on the 14 branch
19that the first one used to fail before the PR108900 backport and now
20works correctly, while the second one attempts to match the chromium
21behavior and it used to pass before the PR108900 backport and now it
22FAILs.
23The two testcases show rare problematic cases, because
24do_include_common -> parse_include -> check_eol -> check_eol_1 ->
25cpp_get_token_1 -> _cpp_lex_token -> _cpp_lex_direct -> linemap_line_start
26triggers there
27 /* Allocate the new line_map. However, if the current map only has a
28 single line we can sometimes just increase its column_bits instead. */
29 if (line_delta < 0
30 || last_line != ORDINARY_MAP_STARTING_LINE_NUMBER (map)
31 || SOURCE_COLUMN (map, highest) >= (1U << (column_bits - range_bits))
32 || ( /* We can't reuse the map if the line offset is sufficiently
33 large to cause overflow when computing location_t values. */
34 (to_line - ORDINARY_MAP_STARTING_LINE_NUMBER (map))
35 >= (((uint64_t) 1)
36 << (CHAR_BIT * sizeof (linenum_type) - column_bits)))
37 || range_bits < map->m_range_bits)
38 map = linemap_check_ordinary
39 (const_cast <line_map *>
40 (linemap_add (set, LC_RENAME,
41 ORDINARY_MAP_IN_SYSTEM_HEADER_P (map),
42 ORDINARY_MAP_FILE_NAME (map),
43 to_line)));
44and so creates a new ordinary map on the line right after the
45(problematic) #include line.
46Now, in the spot that r14-11679-g8a884140c2bcb7 patched,
47pfile->line_table->highest_location in all 3 tests (also
48https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120061#c13
49) is before the decrement the start of the line after the #include line and so
50the decrement is really desirable in that case to put highest_location
51somewhere on the line where the #include actually is.
52But at the same time it is also undesirable, because if we do decrement it,
53then linemap_add LC_ENTER called from _cpp_do_file_change will then
54 /* Generate a start_location above the current highest_location.
55 If possible, make the low range bits be zero. */
56 location_t start_location = set->highest_location + 1;
57 unsigned range_bits = 0;
58 if (start_location < LINE_MAP_MAX_LOCATION_WITH_COLS)
59 range_bits = set->default_range_bits;
60 start_location += (1 << range_bits) - 1;
61 start_location &= ~((1 << range_bits) - 1);
62
63 linemap_assert (!LINEMAPS_ORDINARY_USED (set)
64 || (start_location
65 >= MAP_START_LOCATION (LINEMAPS_LAST_ORDINARY_MAP (set))));
66and we can end up with the new LC_ENTER ordinary map having the same
67start_location as the preceding LC_RENAME one.
68Next thing that happens is computation of included_from:
69 if (reason == LC_ENTER)
70 {
71 if (set->depth == 0)
72 map->included_from = 0;
73 else
74 /* The location of the end of the just-closed map. */
75 map->included_from
76 = (((map[0].start_location - 1 - map[-1].start_location)
77 & ~((1 << map[-1].m_column_and_range_bits) - 1))
78 + map[-1].start_location);
79The normal case (e.g. with the testcase included at the start of this comment) is
80that map[-1] starts somewhere earlier and so map->included_from computation above
81nicely computes location_t which expands to the start of the #include line.
82With r14-11679 reverted, for #c11 as well as #c12
83map[0].start_location == map[-1].start_location above, and so it is
84((location_t) -1 & ~((1 << map[-1].m_column_and_range_bits) - 1)))
85+ map[-1].start_location,
86which happens to be start of the #include line.
87For #c11 map[0].start_location is 0x500003a0 and map[-1] has
88m_column_and_range_bits 7 and map[-2] has m_column_and_range_bits 12 and
89map[0].included_from is set to 0x50000320.
90For #c12 map[0].start_location is 0x606c0402 and map[-2].start_location is
910x606c0400 and m_column_and_range_bits is 0 for all 3 maps.
92map[0].included_from is set to 0x606c0401.
93The last important part is again in linemap_add when doing LC_LEAVE:
94 /* (MAP - 1) points to the map we are leaving. The
95 map from which (MAP - 1) got included should be the map
96 that comes right before MAP in the same file. */
97 from = linemap_included_from_linemap (set, map - 1);
98
99 /* A TO_FILE of NULL is special - we use the natural values. */
100 if (to_file == NULL)
101 {
102 to_file = ORDINARY_MAP_FILE_NAME (from);
103 to_line = SOURCE_LINE (from, from[1].start_location);
104 sysp = ORDINARY_MAP_IN_SYSTEM_HEADER_P (from);
105 }
106Here it wants to compute the right to_line which ought to be the line after
107the #include directive.
108On the #c11 testcase that doesn't work correctly though, because
109map[-1].included_from is 0x50000320, from[0] for that is LC_ENTER with
110start_location 0x4080 and m_column_and_range_bits 12 but note that we've
111earlier computed map[-1].start_location + (-1 & 0xffffff80) and so only
112decreased by 7 bits, so to_line is still on the line with #include and not
113after it. In the #c12 that doesn't happen, all the ordinary maps involved
114there had 0 m_column_and_range_bits and so this computes correct line.
115
116Below is a fix for the trunk including testcases using the
117location_overflow_plugin hack to simulate the bugs without needing huge
118files (in the 14 case it is just 330KB and almost 10MB, but in the 15
119case it would need to be far bigger).
120The pre- r15-9018 trunk has
121FAIL: gcc.dg/plugin/location-overflow-test-pr116047.c -fplugin=./location_overflow_plugin.so scan-file static_assert[^\n\r]*6[^\n\r]*== 6
122and current trunk
123FAIL: gcc.dg/plugin/location-overflow-test-pr116047.c -fplugin=./location_overflow_plugin.so scan-file static_assert[^\n\r]*6[^\n\r]*== 6
124FAIL: gcc.dg/plugin/location-overflow-test-pr120061.c -fplugin=./location_overflow_plugin.so scan-file static_assert[^\n\r]*5[^\n\r]*== 5
125and with the patch everything PASSes.
126I'll post afterwards a 14 version of the patch.
127
128The patch reverts the r15-9018 change, because it is incorrect,
129we really need to decrement it even when crossing ordinary map
130boundaries, so that the location is not on the line after the #include
131line but somewhere on the #include line. It also patches two spots
132in linemap_add mentioned above to make sure we get correct locations
133both in the included_from location_t when doing LC_ENTER (second
134line-map.cc hunk) and when doing LC_LEAVE to compute the right to_line
135(first line-map.cc hunk), both in presence of an added LC_RENAME
136with the same start_location as the following LC_ENTER (i.e. the
137problematic cases).
138The LC_ENTER hunk is mostly to ensure included_form location_t is
139at the start of the #include line (column 0), without it we can
140decrease include_from not enough and end up at some random column
141in the middle of the line, because it is masking away
142map[-1].m_column_and_range_bits bits even when in the end the resulting
143include_from location_t will be found in map[-2] map with perhaps
144different m_column_and_range_bits. That alone doesn't fix the bug
145though.
146The more important is the LC_LEAVE hunk and the problem there is
147caused by linemap_line_start not actually doing
148 r = set->highest_line + (line_delta << map->m_column_and_range_bits);
149when adding a new map (the LC_RENAME one because we need to switch to
150different number of directly encoded ranges, or columns, etc.).
151So, in the original PR108900 case that
152 to_line = SOURCE_LINE (from, from[1].start_location);
153doesn't do the right thing, from there is the last < 0x50000000 map
154with m_column_and_range_bits 12, from[1] is the first one above it
155and map[-1].included_from is the correct location of column 0 on
156the #include line, but as the new LC_RENAME map has been created without
157actually increasing highest_location to be on the new line (we've just
158set to_line of the new LC_RENAME map to the correct line),
159 to_line = SOURCE_LINE (from, from[1].start_location);
160stays on the same source line. I've tried to just replace that with
161 to_line = SOURCE_LINE (from, linemap_included_from (map - 1)) + 1;
162i.e. just find out the #include line from map[-1].included_from and
163add 1 to it, unfortunately that breaks the
164c-c++-common/cpp/line-4.c
165test where we expect to stay on the same 0 line for LC_LEAVE from
166<command line> and gcc.dg/cpp/trad/Wunused.c, gcc.dg/cpp/trad/builtins.c
167and c-c++-common/analyzer/named-constants-via-macros-traditional.c tests
168all with -traditional-cpp preprocessing where to_line is also off-by-one
169from the expected one.
170So, this patch instead conditionalizes it, uses the
171 to_line = SOURCE_LINE (from, linemap_included_from (map - 1)) + 1;
172way only if from[1] is a LC_RENAME map (rather than the usual
173LC_ENTER one), that should limit it to the problematic cases of when
174parse_include peeked after EOL and had to create LC_RENAME map with
175the same start_location as the LC_ENTER after it.
176
177Some further justification for the LC_ENTER hunk, using the
178https://gcc.gnu.org/pipermail/gcc-patches/2025-May/682774.html testcase
179(old is 14 before r14-11679, vanilla current 14 and new with the 14 patch)
180I get
181$ /usr/src/gcc-14/obj/gcc/cc1.old -quiet -std=c23 pr116047.c -nostdinc
182In file included from pr116047-1.h:327677:21,
183 from pr116047.c:4:
184pr116047-2.h:1:1: error: unknown type name ‘a’
185 1 | a b c;
186 | ^
187pr116047-2.h:1:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c’
188 1 | a b c;
189 | ^
190pr116047-1.h:327677:1: error: static assertion failed: ""
191327677 | #include "pr116047-2.h"
192 | ^~~~~~~~~~~~~
193$ /usr/src/gcc-14/obj/gcc/cc1.vanilla -quiet -std=c23 pr116047.c -nostdinc
194In file included from pr116047-1.h:327678,
195 from pr116047.c:4:
196pr116047-2.h:1:1: error: unknown type name ‘a’
197 1 | a b c;
198 | ^
199pr116047-2.h:1:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c’
200 1 | a b c;
201 | ^
202$ /usr/src/gcc-14/obj/gcc/cc1.new -quiet -std=c23 pr116047.c -nostdinc
203In file included from pr116047-1.h:327677,
204 from pr116047.c:4:
205pr116047-2.h:1:1: error: unknown type name ‘a’
206 1 | a b c;
207 | ^
208pr116047-2.h:1:5: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘c’
209 1 | a b c;
210 | ^
211
212pr116047-1.h has on lines 327677+327678:
213 #include "pr116047-2.h"
214 static_assert (__LINE__ == 327678, "");
215so the static_assert failure is something that was dealt mainly in the
216LC_LEAVE hunk and files.cc reversion, but please have a look at the
217In file included from lines.
21814.2 emits correct line (#include "pr116047-2.h" is indeed on line
219327677) but some random column in there (which is not normally printed
220for smaller headers; 21 is the . before extension in the filename).
221Current trunk emits incorrect line (327678 instead of 327677, clearly
222it didn't decrement).
223And the patched compiler emits the right line with no column, as would
224be printed if I remove e.g. 300000 newlines from the file.
225
2262025-05-07 Jakub Jelinek <jakub@redhat.com>
227
228 PR preprocessor/108900
229 PR preprocessor/116047
230 PR preprocessor/120061
231 * files.cc (_cpp_stack_file): Revert 2025-03-28 change.
232 * line-map.cc (linemap_add): Use
233 SOURCE_LINE (from, linemap_included_from (map - 1)) + 1; instead of
234 SOURCE_LINE (from, from[1].start_location); to compute to_line
235 for LC_LEAVE. For LC_ENTER included_from computation, look at
236 map[-2] or even lower if map[-1] has the same start_location as
237 map[0].
238
239 * gcc.dg/plugin/plugin.exp: Add location-overflow-test-pr116047.c
240 and location-overflow-test-pr120061.c.
241 * gcc.dg/plugin/location_overflow_plugin.cc (plugin_init): Don't error
242 on unknown values, instead just break. Handle 0x4fHHHHHH arguments
243 differently.
244 * gcc.dg/plugin/location-overflow-test-pr116047.c: New test.
245 * gcc.dg/plugin/location-overflow-test-pr116047-1.h: New test.
246 * gcc.dg/plugin/location-overflow-test-pr116047-2.h: New test.
247 * gcc.dg/plugin/location-overflow-test-pr120061.c: New test.
248 * gcc.dg/plugin/location-overflow-test-pr120061-1.h: New test.
249 * gcc.dg/plugin/location-overflow-test-pr120061-2.h: New test.
250
251Upstream-Status: Backport [https://gcc.gnu.org/cgit/gcc/commit/?id=edf745dc519ddbfef127e2789bf11bfbacd300b7]
252Signed-off-by: Yash Shinde <Yash.Shinde@windriver.com>
253---
254 .../plugin/location-overflow-test-pr116047-1.h | 6 +++
255 .../plugin/location-overflow-test-pr116047-2.h | 1 +
256 .../plugin/location-overflow-test-pr116047.c | 5 +++
257 .../plugin/location-overflow-test-pr120061-1.h | 6 +++
258 .../plugin/location-overflow-test-pr120061-2.h | 1 +
259 .../plugin/location-overflow-test-pr120061.c | 6 +++
260 .../gcc.dg/plugin/location_overflow_plugin.cc | 15 +++++--
261 gcc/testsuite/gcc.dg/plugin/plugin.exp | 4 +-
262 libcpp/files.cc | 8 ----
263 libcpp/line-map.cc | 48 ++++++++++++++++++----
264 10 files changed, 80 insertions(+), 20 deletions(-)
265 create mode 100644 gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-1.h
266 create mode 100644 gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-2.h
267 create mode 100644 gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047.c
268 create mode 100644 gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-1.h
269 create mode 100644 gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-2.h
270 create mode 100644 gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061.c
271
272diff --git a/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-1.h b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-1.h
273new file mode 100644
274index 000000000000..3dd6434a938b
275--- /dev/null
276+++ b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-1.h
277@@ -0,0 +1,6 @@
278+
279+
280+
281+
282+#include "location-overflow-test-pr116047-2.h"
283+static_assert (__LINE__ == 6, "");
284diff --git a/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-2.h b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-2.h
285new file mode 100644
286index 000000000000..048f715b4656
287--- /dev/null
288+++ b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047-2.h
289@@ -0,0 +1 @@
290+int i;
291diff --git a/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047.c b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047.c
292new file mode 100644
293index 000000000000..75161fa5f055
294--- /dev/null
295+++ b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr116047.c
296@@ -0,0 +1,5 @@
297+/* PR preprocessor/116047 */
298+/* { dg-do preprocess } */
299+/* { dg-options "-nostdinc -std=c23 -fplugin-arg-location_overflow_plugin-value=0x4ffe0180" } */
300+#include "location-overflow-test-pr116047-1.h"
301+/* { dg-final { scan-file location-overflow-test-pr116047.i "static_assert\[^\n\r]\*6\[^\n\r]\*== 6" } } */
302diff --git a/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-1.h b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-1.h
303new file mode 100644
304index 000000000000..ebf7704f568e
305--- /dev/null
306+++ b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-1.h
307@@ -0,0 +1,6 @@
308+
309+
310+
311+
312+#include "location-overflow-test-pr120061-2.h"
313+
314diff --git a/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-2.h b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-2.h
315new file mode 100644
316index 000000000000..048f715b4656
317--- /dev/null
318+++ b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061-2.h
319@@ -0,0 +1 @@
320+int i;
321diff --git a/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061.c b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061.c
322new file mode 100644
323index 000000000000..e8e803898da3
324--- /dev/null
325+++ b/gcc/testsuite/gcc.dg/plugin/location-overflow-test-pr120061.c
326@@ -0,0 +1,6 @@
327+/* PR preprocessor/120061 */
328+/* { dg-do preprocess } */
329+/* { dg-options "-nostdinc -std=c23 -fplugin-arg-location_overflow_plugin-value=0x61000000" } */
330+#include "location-overflow-test-pr120061-1.h"
331+static_assert (__LINE__ == 5, "");
332+/* { dg-final { scan-file location-overflow-test-pr120061.i "static_assert\[^\n\r]\*5\[^\n\r]\*== 5" } } */
333diff --git a/gcc/testsuite/gcc.dg/plugin/location_overflow_plugin.cc b/gcc/testsuite/gcc.dg/plugin/location_overflow_plugin.cc
334index f731b1421b0f..f770d35ea518 100644
335--- a/gcc/testsuite/gcc.dg/plugin/location_overflow_plugin.cc
336+++ b/gcc/testsuite/gcc.dg/plugin/location_overflow_plugin.cc
337@@ -85,9 +85,18 @@ plugin_init (struct plugin_name_args *plugin_info,
338 error_at (UNKNOWN_LOCATION, "missing plugin argument");
339
340 /* With 64-bit locations, the thresholds are larger, so shift the base
341- location argument accordingly. */
342+ location argument accordingly, basically remap the GCC 14 32-bit
343+ location_t argument values to 64-bit location_t counterparts. There
344+ is one exception for values slightly before the 32-bit location_t
345+ LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES (0x50000000). In that case
346+ remap them to the same amount before the 64-bit location_t
347+ LINE_MAP_MAX_LOCATION_WITH_PACKED_RANGES -
348+ ((location_t) 0x50000000) << 31. */
349 gcc_assert (sizeof (location_t) == sizeof (uint64_t));
350- base_location = 1 + ((base_location - 1) << 31);
351+ if (base_location >= 0x4f000000 && base_location <= 0x4fffffff)
352+ base_location += (((location_t) 0x50000000) << 31) - 0x50000000;
353+ else
354+ base_location = 1 + ((base_location - 1) << 31);
355
356 register_callback (plugin_info->base_name,
357 PLUGIN_PRAGMAS,
358@@ -107,7 +116,7 @@ plugin_init (struct plugin_name_args *plugin_info,
359 break;
360
361 default:
362- error_at (UNKNOWN_LOCATION, "unrecognized value for plugin argument");
363+ break;
364 }
365
366 return 0;
367diff --git a/gcc/testsuite/gcc.dg/plugin/plugin.exp b/gcc/testsuite/gcc.dg/plugin/plugin.exp
368index 90c91621d0aa..96e76d2e0c36 100644
369--- a/gcc/testsuite/gcc.dg/plugin/plugin.exp
370+++ b/gcc/testsuite/gcc.dg/plugin/plugin.exp
371@@ -138,7 +138,9 @@ set plugin_test_list [list \
372 { location_overflow_plugin.cc \
373 location-overflow-test-1.c \
374 location-overflow-test-2.c \
375- location-overflow-test-pr83173.c } \
376+ location-overflow-test-pr83173.c \
377+ location-overflow-test-pr116047.c \
378+ location-overflow-test-pr120061.c } \
379 { must_tail_call_plugin.cc \
380 must-tail-call-1.c \
381 must-tail-call-2.c } \
382diff --git a/libcpp/files.cc b/libcpp/files.cc
383index c1abde6639fe..d80c4bfd9077 100644
384--- a/libcpp/files.cc
385+++ b/libcpp/files.cc
386@@ -1047,14 +1047,6 @@ _cpp_stack_file (cpp_reader *pfile, _cpp_file *file, include_type type,
387 && (pfile->line_table->highest_location
388 != LINE_MAP_MAX_LOCATION - 1));
389
390- if (decrement && LINEMAPS_ORDINARY_USED (pfile->line_table))
391- {
392- const line_map_ordinary *map
393- = LINEMAPS_LAST_ORDINARY_MAP (pfile->line_table);
394- if (map && map->start_location == pfile->line_table->highest_location)
395- decrement = false;
396- }
397-
398 if (decrement)
399 pfile->line_table->highest_location--;
400
401diff --git a/libcpp/line-map.cc b/libcpp/line-map.cc
402index 17e7f12551c0..cf6557117c81 100644
403--- a/libcpp/line-map.cc
404+++ b/libcpp/line-map.cc
405@@ -621,8 +621,8 @@ linemap_add (line_maps *set, enum lc_reason reason,
406 #include "included", inside the same "includer" file. */
407
408 linemap_assert (!MAIN_FILE_P (map - 1));
409- /* (MAP - 1) points to the map we are leaving. The
410- map from which (MAP - 1) got included should be the map
411+ /* (MAP - 1) points to the map we are leaving. The
412+ map from which (MAP - 1) got included should be usually the map
413 that comes right before MAP in the same file. */
414 from = linemap_included_from_linemap (set, map - 1);
415
416@@ -630,7 +630,24 @@ linemap_add (line_maps *set, enum lc_reason reason,
417 if (to_file == NULL)
418 {
419 to_file = ORDINARY_MAP_FILE_NAME (from);
420- to_line = SOURCE_LINE (from, from[1].start_location);
421+ /* Compute the line on which the map resumes, for #include this
422+ should be the line after the #include line. Usually FROM is
423+ the map right before LC_ENTER map - the first map of the included
424+ file, and in that case SOURCE_LINE (from, from[1].start_location);
425+ computes the right line (and does handle even some special cases
426+ (e.g. where for returning from <command line> we still want to
427+ be at line 0 or some -traditional-cpp cases). In rare cases
428+ FROM can be followed by LC_RENAME created by linemap_line_start
429+ for line right after #include line. If that happens,
430+ start_location of the FROM[1] map will be the same as
431+ start_location of FROM[2] LC_ENTER, but FROM[1] start_location
432+ might not have advance enough for moving to a full next line.
433+ In that case compute the line of #include line and add 1 to it
434+ to advance to the next line. See PR120061. */
435+ if (from[1].reason == LC_RENAME)
436+ to_line = SOURCE_LINE (from, linemap_included_from (map - 1)) + 1;
437+ else
438+ to_line = SOURCE_LINE (from, from[1].start_location);
439 sysp = ORDINARY_MAP_IN_SYSTEM_HEADER_P (from);
440 }
441 else
442@@ -660,11 +677,26 @@ linemap_add (line_maps *set, enum lc_reason reason,
443 if (set->depth == 0)
444 map->included_from = 0;
445 else
446- /* The location of the end of the just-closed map. */
447- map->included_from
448- = (((map[0].start_location - 1 - map[-1].start_location)
449- & ~((loc_one << map[-1].m_column_and_range_bits) - 1))
450- + map[-1].start_location);
451+ {
452+ /* Compute location from whence this line map was included.
453+ For #include this should be preferrably column 0 of the
454+ line on which #include directive appears.
455+ map[-1] is the just closed map and usually included_from
456+ falls within that map. In rare cases linemap_line_start
457+ can insert a new LC_RENAME map for the line immediately
458+ after #include line, in that case map[-1] will have the
459+ same start_location as the new one and so included_from
460+ would not be from map[-1] but likely map[-2]. If that
461+ happens, mask off map[-2] m_column_and_range_bits bits
462+ instead of map[-1]. See PR120061. */
463+ int i = -1;
464+ while (map[i].start_location == map[0].start_location)
465+ --i;
466+ map->included_from
467+ = (((map[0].start_location - 1 - map[i].start_location)
468+ & ~((loc_one << map[i].m_column_and_range_bits) - 1))
469+ + map[i].start_location);
470+ }
471 set->depth++;
472 if (set->trace_includes)
473 trace_include (set, map);
474--
475
diff --git a/meta/recipes-devtools/go/go-1.24.2.inc b/meta/recipes-devtools/go/go-1.24.3.inc
index cb4ae9ef80..78e26146b5 100644
--- a/meta/recipes-devtools/go/go-1.24.2.inc
+++ b/meta/recipes-devtools/go/go-1.24.3.inc
@@ -17,4 +17,4 @@ SRC_URI += "\
17 file://0010-cmd-go-clear-GOROOT-for-func-ldShared-when-trimpath-.patch \ 17 file://0010-cmd-go-clear-GOROOT-for-func-ldShared-when-trimpath-.patch \
18 file://6d265b008e3d106b2706645e5a88cd8e2fb98953.patch \ 18 file://6d265b008e3d106b2706645e5a88cd8e2fb98953.patch \
19" 19"
20SRC_URI[main.sha256sum] = "9dc77ffadc16d837a1bf32d99c624cb4df0647cee7b119edd9e7b1bcc05f2e00" 20SRC_URI[main.sha256sum] = "229c08b600b1446798109fae1f569228102c8473caba8104b6418cb5bc032878"
diff --git a/meta/recipes-devtools/go/go-binary-native_1.24.2.bb b/meta/recipes-devtools/go/go-binary-native_1.24.3.bb
index 690b8546cb..af56dc9111 100644
--- a/meta/recipes-devtools/go/go-binary-native_1.24.2.bb
+++ b/meta/recipes-devtools/go/go-binary-native_1.24.3.bb
@@ -9,9 +9,9 @@ PROVIDES = "go-native"
9 9
10# Checksums available at https://go.dev/dl/ 10# Checksums available at https://go.dev/dl/
11SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}" 11SRC_URI = "https://dl.google.com/go/go${PV}.${BUILD_GOOS}-${BUILD_GOARCH}.tar.gz;name=go_${BUILD_GOTUPLE}"
12SRC_URI[go_linux_amd64.sha256sum] = "68097bd680839cbc9d464a0edce4f7c333975e27a90246890e9f1078c7e702ad" 12SRC_URI[go_linux_amd64.sha256sum] = "3333f6ea53afa971e9078895eaa4ac7204a8c6b5c68c10e6bc9a33e8e391bdd8"
13SRC_URI[go_linux_arm64.sha256sum] = "756274ea4b68fa5535eb9fe2559889287d725a8da63c6aae4d5f23778c229f4b" 13SRC_URI[go_linux_arm64.sha256sum] = "a463cb59382bd7ae7d8f4c68846e73c4d589f223c589ac76871b66811ded7836"
14SRC_URI[go_linux_ppc64le.sha256sum] = "5fff857791d541c71d8ea0171c73f6f99770d15ff7e2ad979104856d01f36563" 14SRC_URI[go_linux_ppc64le.sha256sum] = "341a749d168f47b1d4dad25e32cae70849b7ceed7c290823b853c9e6b0df0856"
15 15
16UPSTREAM_CHECK_URI = "https://golang.org/dl/" 16UPSTREAM_CHECK_URI = "https://golang.org/dl/"
17UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux" 17UPSTREAM_CHECK_REGEX = "go(?P<pver>\d+(\.\d+)+)\.linux"
diff --git a/meta/recipes-devtools/go/go-cross-canadian_1.24.2.bb b/meta/recipes-devtools/go/go-cross-canadian_1.24.3.bb
index 7ac9449e47..7ac9449e47 100644
--- a/meta/recipes-devtools/go/go-cross-canadian_1.24.2.bb
+++ b/meta/recipes-devtools/go/go-cross-canadian_1.24.3.bb
diff --git a/meta/recipes-devtools/go/go-cross_1.24.2.bb b/meta/recipes-devtools/go/go-cross_1.24.3.bb
index 80b5a03f6c..80b5a03f6c 100644
--- a/meta/recipes-devtools/go/go-cross_1.24.2.bb
+++ b/meta/recipes-devtools/go/go-cross_1.24.3.bb
diff --git a/meta/recipes-devtools/go/go-crosssdk_1.24.2.bb b/meta/recipes-devtools/go/go-crosssdk_1.24.3.bb
index 1857c8a577..1857c8a577 100644
--- a/meta/recipes-devtools/go/go-crosssdk_1.24.2.bb
+++ b/meta/recipes-devtools/go/go-crosssdk_1.24.3.bb
diff --git a/meta/recipes-devtools/go/go-runtime_1.24.2.bb b/meta/recipes-devtools/go/go-runtime_1.24.3.bb
index 63464a1501..63464a1501 100644
--- a/meta/recipes-devtools/go/go-runtime_1.24.2.bb
+++ b/meta/recipes-devtools/go/go-runtime_1.24.3.bb
diff --git a/meta/recipes-devtools/go/go_1.24.2.bb b/meta/recipes-devtools/go/go_1.24.3.bb
index 46f5fbc6be..46f5fbc6be 100644
--- a/meta/recipes-devtools/go/go_1.24.2.bb
+++ b/meta/recipes-devtools/go/go_1.24.3.bb
diff --git a/meta/recipes-devtools/m4/m4-1.4.19.inc b/meta/recipes-devtools/m4/m4-1.4.20.inc
index c73418d8e6..2ea3a9bace 100644
--- a/meta/recipes-devtools/m4/m4-1.4.19.inc
+++ b/meta/recipes-devtools/m4/m4-1.4.20.inc
@@ -7,15 +7,12 @@ GNU M4 also has built-in functions for including files, running shell commands,
7inherit autotools texinfo ptest gettext 7inherit autotools texinfo ptest gettext
8 8
9SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \ 9SRC_URI = "${GNU_MIRROR}/m4/m4-${PV}.tar.gz \
10 file://ac_config_links.patch \
11 file://0001-sigsegv-Fix-build-on-ppc-musl.patch \
12 file://0001-Define-alignof_slot-using-_Alignof-when-using-C11-or.patch \
13 " 10 "
14SRC_URI:append:class-target = " file://run-ptest \ 11SRC_URI:append:class-target = " file://run-ptest \
15 file://serial-tests-config.patch \ 12 file://serial-tests-config.patch \
16 " 13 "
17 14
18SRC_URI[sha256sum] = "3be4a26d825ffdfda52a56fc43246456989a3630093cced3fbddf4771ee58a70" 15SRC_URI[sha256sum] = "6ac4fc31ce440debe63987c2ebbf9d7b6634e67a7c3279257dc7361de8bdb3ef"
19 16
20LICENSE = "GPL-3.0-only" 17LICENSE = "GPL-3.0-only"
21 18
@@ -26,8 +23,6 @@ EXTRA_OECONF += "--without-libsigsegv-prefix"
26 23
27EXTRA_OEMAKE += "'infodir=${infodir}'" 24EXTRA_OEMAKE += "'infodir=${infodir}'"
28 25
29CFLAGS += "-std=gnu17"
30
31do_compile_ptest() { 26do_compile_ptest() {
32 cd ${B}/tests 27 cd ${B}/tests
33 sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_LIBRARIES) $(check_PROGRAMS)' Makefile 28 sed -i '/^buildtest-TESTS: /c buildtest-TESTS: $(TESTS) $(check_LIBRARIES) $(check_PROGRAMS)' Makefile
@@ -37,15 +32,15 @@ do_compile_ptest() {
37do_install_ptest() { 32do_install_ptest() {
38 cp -r ${B}/tests ${D}${PTEST_PATH} 33 cp -r ${B}/tests ${D}${PTEST_PATH}
39 cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/ 34 cp -r ${S}/tests/* ${D}${PTEST_PATH}/tests/
35 cp -r ${S}/build-aux ${D}${PTEST_PATH}/tests/
40 sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile 36 sed -i '/^Makefile:/c Makefile:' ${D}${PTEST_PATH}/tests/Makefile
41 find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {} 37 find ${D}${PTEST_PATH} -type f -name *.[hoc] | xargs -i rm {}
42 cp ${S}/build-aux/update-copyright ${D}${PTEST_PATH}/tests/ 38 chmod 0755 ${D}${PTEST_PATH}/tests/test-spawn-pipe-main \
43 sed -i 's;update-copyright;./update-copyright;g' ${D}${PTEST_PATH}/tests/test-update-copyright.sh
44 chmod 0755 ${D}${PTEST_PATH}/tests/test-mbrtowc-w32-1.sh ${D}${PTEST_PATH}/tests/test-spawn-pipe-main \
45 ${D}${PTEST_PATH}/tests/test-spawn-pipe-child ${D}${PTEST_PATH}/tests/test-version-etc \ 39 ${D}${PTEST_PATH}/tests/test-spawn-pipe-child ${D}${PTEST_PATH}/tests/test-version-etc \
46 ${D}${PTEST_PATH}/tests/test-xalloc-die 40 ${D}${PTEST_PATH}/tests/test-xalloc-die
47 41
48 ln -s ptest ${D}${libdir}/${BPN}/${BP} 42 ln -sf ptest ${D}${libdir}/${BPN}/${BP}
43 sed -i -e 's/@BP@/${BP}/g' ${D}${PTEST_PATH}/run-ptest
49} 44}
50 45
51do_install_ptest:append:libc-glibc() { 46do_install_ptest:append:libc-glibc() {
@@ -59,4 +54,3 @@ RDEPENDS:${PN}-ptest:append:libc-glibc = "\
59 locale-base-fr-fr.iso-8859-1 \ 54 locale-base-fr-fr.iso-8859-1 \
60 glibc-gconv-iso8859-1 \ 55 glibc-gconv-iso8859-1 \
61" 56"
62
diff --git a/meta/recipes-devtools/m4/m4-native_1.4.19.bb b/meta/recipes-devtools/m4/m4-native_1.4.20.bb
index 407ad89330..407ad89330 100644
--- a/meta/recipes-devtools/m4/m4-native_1.4.19.bb
+++ b/meta/recipes-devtools/m4/m4-native_1.4.20.bb
diff --git a/meta/recipes-devtools/m4/m4/0001-Define-alignof_slot-using-_Alignof-when-using-C11-or.patch b/meta/recipes-devtools/m4/m4/0001-Define-alignof_slot-using-_Alignof-when-using-C11-or.patch
deleted file mode 100644
index 8757abd7a0..0000000000
--- a/meta/recipes-devtools/m4/m4/0001-Define-alignof_slot-using-_Alignof-when-using-C11-or.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1From b0fd3a58354b1f5ead891907979dfd3dd36840d5 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 14 Jan 2023 14:55:03 -0800
4Subject: [PATCH] Define alignof_slot using _Alignof when using C11 or newer
5
6WG14 N2350 made very clear that it is an UB having type definitions
7within "offsetof" [1]. This patch enhances the implementation of macro
8alignof_slot to use builtin "_Alignof" to avoid undefined behavior on
9when using std=c11 or newer
10
11clang 16+ has started to flag this [2]
12
13Fixes build when using -std >= gnu11 and using clang16+ [3]
14
15[1] https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2350.htm
16[2] https://reviews.llvm.org/D133574
17[3] https://public-inbox.org/bug-gnulib/20230114232744.215167-1-raj.khem@gmail.com/T/#u
18
19Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/gnulib.git/commit/?id=2d404c7dd974cc65f894526f4a1b76bc1dcd8d82]
20Signed-off-by: Khem Raj <raj.khem@gmail.com>
21---
22 lib/alignof.h | 2 ++
23 1 file changed, 2 insertions(+)
24
25--- a/lib/alignof.h
26+++ b/lib/alignof.h
27@@ -18,19 +18,19 @@
28 #define _ALIGNOF_H
29
30 #include <stddef.h>
31+#include "stdalign.h"
32
33 /* alignof_slot (TYPE)
34 Determine the alignment of a structure slot (field) of a given type,
35 at compile time. Note that the result depends on the ABI.
36- This is the same as alignof (TYPE) and _Alignof (TYPE), defined in
37- <stdalign.h> if __alignof_is_defined is 1.
38+ This is the same as alignof (TYPE).
39 Note: The result cannot be used as a value for an 'enum' constant,
40 due to bugs in HP-UX 10.20 cc and AIX 3.2.5 xlc. */
41 #if defined __cplusplus
42 template <class type> struct alignof_helper { char __slot1; type __slot2; };
43 # define alignof_slot(type) offsetof (alignof_helper<type>, __slot2)
44 #else
45-# define alignof_slot(type) offsetof (struct { char __slot1; type __slot2; }, __slot2)
46+# define alignof_slot(type) alignof (type)
47 #endif
48
49 /* alignof_type (TYPE)
diff --git a/meta/recipes-devtools/m4/m4/0001-sigsegv-Fix-build-on-ppc-musl.patch b/meta/recipes-devtools/m4/m4/0001-sigsegv-Fix-build-on-ppc-musl.patch
deleted file mode 100644
index 04320de63a..0000000000
--- a/meta/recipes-devtools/m4/m4/0001-sigsegv-Fix-build-on-ppc-musl.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From 36d5e26f606e070553eb0fff1f738e61970be5d7 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 9 Mar 2022 20:22:20 -0800
4Subject: [PATCH] sigsegv: Fix build on ppc/musl
5
6mcontext is not a standard layout so glibc and musl differ sadly.
7
8Fixes
9../../m4-1.4.19/lib/sigsegv.c: In function 'sigsegv_handler': ../../m4-1.4.19/lib/sigsegv.c:223:75: error: 'mcontext_t' has no member named 'uc_regs'; did you mean 'gregs'? 223 | # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1] | ^~~~~~~
10
11Upstream-Status: Submitted [https://lists.gnu.org/archive/html/m4-patches/2022-03/msg00000.html]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 lib/sigsegv.c | 6 +++---
15 1 file changed, 3 insertions(+), 3 deletions(-)
16
17diff --git a/lib/sigsegv.c b/lib/sigsegv.c
18index 696a152..fa0c465 100644
19--- a/lib/sigsegv.c
20+++ b/lib/sigsegv.c
21@@ -217,10 +217,10 @@ int libsigsegv_version = LIBSIGSEGV_VERSION;
22 # define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.gp_regs[1]
23 # else /* 32-bit */
24 /* both should be equivalent */
25-# if 0
26-# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.regs->gpr[1]
27+# if ! defined __GLIBC__
28+# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_regs->gregs[1]
29 # else
30-# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1]
31+# define SIGSEGV_FAULT_STACKPOINTER ((ucontext_t *) ucp)->uc_mcontext.uc_regs->gregs[1]
32 # endif
33 # endif
34
35--
362.35.1
37
diff --git a/meta/recipes-devtools/m4/m4/ac_config_links.patch b/meta/recipes-devtools/m4/m4/ac_config_links.patch
deleted file mode 100644
index 39fcd91896..0000000000
--- a/meta/recipes-devtools/m4/m4/ac_config_links.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1Upstream-Status: Inappropriate [configuration]
2
3This patch fixes a build problem for m4-native experienced on Ubuntu 9.10,
4where autoconf/automake (AC_CONFIG_LINKS) ends up making GNUmakefile a
5symlink to itself.
6
7The patch comments out ac_config_links directly in configure,
8as autoreconf is not actually run for m4-native.
9
10I believe it should be safe, as GNUmakefile is actually unpacked from
11source, and what we want is to is to not touch it.
12
13Tested on x86_64_linux (Ubuntu 8.04 and 9.10).
14
152009-11-10 Esben Haabendal <eha@doredevelopment.dk>
16---
17 configure | 4 ++--
18 1 file changed, 2 insertions(+), 2 deletions(-)
19
20diff --git a/configure b/configure
21index 883336a..6343a34 100755
22--- a/configure
23+++ b/configure
24@@ -37061,8 +37061,8 @@ printf "%s\n" "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
25 # only, it does not matter if we skip the link with older autoconf.
26 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
27 # builds, so use a shell variable to bypass this.
28- GNUmakefile=GNUmakefile
29- ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
30+# GNUmakefile=GNUmakefile
31+# ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
32
33
34 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL"
35--
362.25.1
37
diff --git a/meta/recipes-devtools/m4/m4/run-ptest b/meta/recipes-devtools/m4/m4/run-ptest
index 5c0fe93357..a91c372e54 100644
--- a/meta/recipes-devtools/m4/m4/run-ptest
+++ b/meta/recipes-devtools/m4/m4/run-ptest
@@ -2,4 +2,4 @@
2# 2#
3#This script is used to run m4 test suites 3#This script is used to run m4 test suites
4cd tests 4cd tests
5make -k runtest-TESTS top_srcdir=.. srcdir=. 5make -k runtest-TESTS abs_aux_dir=../../@BP@/tests/build-aux abs_top_srcdir=../../@BP@/tests abs_srcdir=../../@BP@/tests top_srcdir=.. srcdir=.
diff --git a/meta/recipes-devtools/m4/m4/serial-tests-config.patch b/meta/recipes-devtools/m4/m4/serial-tests-config.patch
index 34e6ad801e..c1573b13c0 100644
--- a/meta/recipes-devtools/m4/m4/serial-tests-config.patch
+++ b/meta/recipes-devtools/m4/m4/serial-tests-config.patch
@@ -12,19 +12,14 @@ Signed-off-by: Changqing Li <changqing.li@windriver.com>
12 configure.ac | 2 +- 12 configure.ac | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-) 13 1 file changed, 1 insertion(+), 1 deletion(-)
14 14
15diff --git a/configure.ac b/configure.ac
16index 78b8788..931fa6f 100644
17--- a/configure.ac 15--- a/configure.ac
18+++ b/configure.ac 16+++ b/configure.ac
19@@ -22,7 +22,7 @@ AC_INIT([GNU M4], m4_esyscmd([build-aux/git-version-gen .tarball-version]), 17@@ -22,7 +22,7 @@ AC_INIT([GNU M4], m4_esyscmd([build-aux/
20 [bug-m4@gnu.org]) 18 [bug-m4@gnu.org])
21 AC_CONFIG_AUX_DIR([build-aux]) 19 AC_CONFIG_AUX_DIR([build-aux])
22 20
23-AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests parallel-tests 21-AM_INIT_AUTOMAKE([1.14 dist-bzip2 dist-xz color-tests parallel-tests
24+AM_INIT_AUTOMAKE([1.11.6 dist-bzip2 dist-xz color-tests serial-tests 22+AM_INIT_AUTOMAKE([1.14 dist-bzip2 dist-xz color-tests serial-tests
25 silent-rules subdir-objects gnu]) 23 silent-rules subdir-objects gnu])
26 AM_SILENT_RULES([yes]) # make --enable-silent-rules the default. 24 AM_SILENT_RULES([yes]) # make --enable-silent-rules the default.
27 25
28--
292.7.4
30
diff --git a/meta/recipes-devtools/m4/m4_1.4.19.bb b/meta/recipes-devtools/m4/m4_1.4.20.bb
index b12c0adf3a..b12c0adf3a 100644
--- a/meta/recipes-devtools/m4/m4_1.4.19.bb
+++ b/meta/recipes-devtools/m4/m4_1.4.20.bb
diff --git a/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch b/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch
deleted file mode 100644
index 78345e925e..0000000000
--- a/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch
+++ /dev/null
@@ -1,94 +0,0 @@
1From 7f770b9c20da1a192dad8cb572a6391f2773285a Mon Sep 17 00:00:00 2001
2From: Jean Delvare <jdelvare@suse.de>
3Date: Thu, 3 May 2018 14:31:55 +0200
4Subject: [PATCH 1/2] Don't leak temporary file on failed ed-style patch
5
6Now that we write ed-style patches to a temporary file before we
7apply them, we need to ensure that the temporary file is removed
8before we leave, even on fatal error.
9
10* src/pch.c (do_ed_script): Use global TMPEDNAME instead of local
11 tmpname. Don't unlink the file directly, instead tag it for removal
12 at exit time.
13* src/patch.c (cleanup): Unlink TMPEDNAME at exit.
14
15This closes bug #53820:
16https://savannah.gnu.org/bugs/index.php?53820
17
18Fixes: 123eaff0d5d1 ("Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)")
19
20CVE: CVE-2018-1000156
21Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=19599883ffb6a450d2884f081f8ecf68edbed7ee]
22Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
23---
24 src/common.h | 2 ++
25 src/pch.c | 12 +++++-------
26 2 files changed, 7 insertions(+), 7 deletions(-)
27
28diff --git a/src/common.h b/src/common.h
29index ec50b40..22238b5 100644
30--- a/src/common.h
31+++ b/src/common.h
32@@ -94,10 +94,12 @@ XTERN char const *origsuff;
33 XTERN char const * TMPINNAME;
34 XTERN char const * TMPOUTNAME;
35 XTERN char const * TMPPATNAME;
36+XTERN char const * TMPEDNAME;
37
38 XTERN bool TMPINNAME_needs_removal;
39 XTERN bool TMPOUTNAME_needs_removal;
40 XTERN bool TMPPATNAME_needs_removal;
41+XTERN bool TMPEDNAME_needs_removal;
42
43 #ifdef DEBUGGING
44 XTERN int debug;
45diff --git a/src/pch.c b/src/pch.c
46index 16e001a..c1a62cf 100644
47--- a/src/pch.c
48+++ b/src/pch.c
49@@ -2392,7 +2392,6 @@ do_ed_script (char const *inname, char const *outname,
50 file_offset beginning_of_this_line;
51 size_t chars_read;
52 FILE *tmpfp = 0;
53- char const *tmpname;
54 int tmpfd;
55 pid_t pid;
56
57@@ -2404,12 +2403,13 @@ do_ed_script (char const *inname, char const *outname,
58 invalid commands and treats the next line as a new command, which
59 can lead to arbitrary command execution. */
60
61- tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0);
62+ tmpfd = make_tempfile (&TMPEDNAME, 'e', NULL, O_RDWR | O_BINARY, 0);
63 if (tmpfd == -1)
64- pfatal ("Can't create temporary file %s", quotearg (tmpname));
65+ pfatal ("Can't create temporary file %s", quotearg (TMPEDNAME));
66+ TMPEDNAME_needs_removal = true;
67 tmpfp = fdopen (tmpfd, "w+b");
68 if (! tmpfp)
69- pfatal ("Can't open stream for file %s", quotearg (tmpname));
70+ pfatal ("Can't open stream for file %s", quotearg (TMPEDNAME));
71 }
72
73 for (;;) {
74@@ -2449,8 +2449,7 @@ do_ed_script (char const *inname, char const *outname,
75 write_fatal ();
76
77 if (lseek (tmpfd, 0, SEEK_SET) == -1)
78- pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname));
79-
80+ pfatal ("Can't rewind to the beginning of file %s", quotearg (TMPEDNAME));
81 if (! dry_run && ! skip_rest_of_patch) {
82 int exclusive = *outname_needs_removal ? 0 : O_EXCL;
83 *outname_needs_removal = true;
84@@ -2482,7 +2481,6 @@ do_ed_script (char const *inname, char const *outname,
85 }
86
87 fclose (tmpfp);
88- safe_unlink (tmpname);
89
90 if (ofp)
91 {
92--
932.17.0
94
diff --git a/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch b/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch
deleted file mode 100644
index 8ffffef47e..0000000000
--- a/meta/recipes-devtools/patch/patch/0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch
+++ /dev/null
@@ -1,81 +0,0 @@
1From 369dcccdfa6336e5a873d6d63705cfbe04c55727 Mon Sep 17 00:00:00 2001
2From: Jean Delvare <jdelvare@suse.de>
3Date: Mon, 7 May 2018 15:14:45 +0200
4Subject: Don't leak temporary file on failed multi-file ed-style patch
5
6The previous fix worked fine with single-file ed-style patches, but
7would still leak temporary files in the case of multi-file ed-style
8patch. Fix that case as well, and extend the test case to check for
9it.
10
11* src/patch.c (main): Unlink TMPEDNAME if needed before moving to
12 the next file in a patch.
13
14This closes bug #53820:
15https://savannah.gnu.org/bugs/index.php?53820
16
17Fixes: 123eaff0d5d1 ("Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)")
18Fixes: 19599883ffb6 ("Don't leak temporary file on failed ed-style patch")
19
20CVE: CVE-2018-1000156
21Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=369dcccdfa6336e5a873d6d63705cfbe04c55727]
22Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
23---
24 src/patch.c | 1 +
25 tests/ed-style | 31 +++++++++++++++++++++++++++++++
26 2 files changed, 32 insertions(+)
27
28diff --git a/src/patch.c b/src/patch.c
29index 9146597..81c7a02 100644
30--- a/src/patch.c
31+++ b/src/patch.c
32@@ -236,6 +236,7 @@ main (int argc, char **argv)
33 }
34 remove_if_needed (TMPOUTNAME, &TMPOUTNAME_needs_removal);
35 }
36+ remove_if_needed (TMPEDNAME, &TMPEDNAME_needs_removal);
37
38 if (! skip_rest_of_patch && ! file_type)
39 {
40diff --git a/tests/ed-style b/tests/ed-style
41index 6b6ef9d..504e6e5 100644
42--- a/tests/ed-style
43+++ b/tests/ed-style
44@@ -38,3 +38,34 @@ EOF
45 check 'cat foo' <<EOF
46 foo
47 EOF
48+
49+# Test the case where one ed-style patch modifies several files
50+
51+cat > ed3.diff <<EOF
52+--- foo
53++++ foo
54+1c
55+bar
56+.
57+--- baz
58++++ baz
59+0a
60+baz
61+.
62+EOF
63+
64+# Apparently we can't create a file with such a patch, while it works fine
65+# when the file name is provided on the command line
66+cat > baz <<EOF
67+EOF
68+
69+check 'patch -e -i ed3.diff' <<EOF
70+EOF
71+
72+check 'cat foo' <<EOF
73+bar
74+EOF
75+
76+check 'cat baz' <<EOF
77+baz
78+EOF
79--
80cgit v1.0-41-gc330
81
diff --git a/meta/recipes-devtools/patch/patch/0001-Fix-swapping-fake-lines-in-pch_swap.patch b/meta/recipes-devtools/patch/patch/0001-Fix-swapping-fake-lines-in-pch_swap.patch
deleted file mode 100644
index 049149eb9e..0000000000
--- a/meta/recipes-devtools/patch/patch/0001-Fix-swapping-fake-lines-in-pch_swap.patch
+++ /dev/null
@@ -1,36 +0,0 @@
1From 9c986353e420ead6e706262bf204d6e03322c300 Mon Sep 17 00:00:00 2001
2From: Andreas Gruenbacher <agruen@gnu.org>
3Date: Fri, 17 Aug 2018 13:35:40 +0200
4Subject: [PATCH] Fix swapping fake lines in pch_swap
5
6* src/pch.c (pch_swap): Fix swapping p_bfake and p_efake when there is a
7blank line in the middle of a context-diff hunk: that empty line stays
8in the middle of the hunk and isn't swapped.
9
10Fixes: https://savannah.gnu.org/bugs/index.php?53133
11Signed-off-by: Andreas Gruenbacher <agruen@gnu.org>
12
13Upstream-Status: Backport [https://git.savannah.gnu.org/git/patch.git]
14CVE: CVE-2018-6952
15Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
16
17---
18 src/pch.c | 2 +-
19 1 file changed, 1 insertion(+), 1 deletion(-)
20
21diff --git a/src/pch.c b/src/pch.c
22index e92bc64..a500ad9 100644
23--- a/src/pch.c
24+++ b/src/pch.c
25@@ -2122,7 +2122,7 @@ pch_swap (void)
26 }
27 if (p_efake >= 0) { /* fix non-freeable ptr range */
28 if (p_efake <= i)
29- n = p_end - i + 1;
30+ n = p_end - p_ptrn_lines;
31 else
32 n = -i;
33 p_efake += n;
34--
352.10.2
36
diff --git a/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch b/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch
deleted file mode 100644
index d13d419f51..0000000000
--- a/meta/recipes-devtools/patch/patch/0001-Invoke-ed-directly-instead-of-using-the-shell.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From 3fcd042d26d70856e826a42b5f93dc4854d80bf0 Mon Sep 17 00:00:00 2001
2From: Andreas Gruenbacher <agruen@gnu.org>
3Date: Fri, 6 Apr 2018 19:36:15 +0200
4Subject: [PATCH] Invoke ed directly instead of using the shell
5
6* src/pch.c (do_ed_script): Invoke ed directly instead of using a shell
7command to avoid quoting vulnerabilities.
8
9CVE: CVE-2019-13638 CVE-2018-20969
10Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/patch.git/patch/?id=3fcd042d26d70856e826a42b5f93dc4854d80bf0]
11Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
12
13---
14 src/pch.c | 6 ++----
15 1 file changed, 2 insertions(+), 4 deletions(-)
16
17
18diff --git a/src/pch.c b/src/pch.c
19index 4fd5a05..16e001a 100644
20--- a/src/pch.c
21+++ b/src/pch.c
22@@ -2459,9 +2459,6 @@ do_ed_script (char const *inname, char const *outname,
23 *outname_needs_removal = true;
24 copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
25 }
26- sprintf (buf, "%s %s%s", editor_program,
27- verbosity == VERBOSE ? "" : "- ",
28- outname);
29 fflush (stdout);
30
31 pid = fork();
32@@ -2470,7 +2467,8 @@ do_ed_script (char const *inname, char const *outname,
33 else if (pid == 0)
34 {
35 dup2 (tmpfd, 0);
36- execl ("/bin/sh", "sh", "-c", buf, (char *) 0);
37+ assert (outname[0] != '!' && outname[0] != '-');
38+ execlp (editor_program, editor_program, "-", outname, (char *) NULL);
39 _exit (2);
40 }
41 else
42--
432.7.4
44
diff --git a/meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch b/meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch
deleted file mode 100644
index ba1a4bab4c..0000000000
--- a/meta/recipes-devtools/patch/patch/0001-Unset-need_charset_alias-when-building-for-musl.patch
+++ /dev/null
@@ -1,33 +0,0 @@
1From b9565dc2fe0c4f7daaec91b7e83bc7313dee2f4a Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Mon, 13 Apr 2015 17:02:13 -0700
4Subject: [PATCH] Unset need_charset_alias when building for musl
5
6localcharset uses ac_cv_gnu_library_2_1 from glibc21.m4
7which actually shoudl be fixed in gnulib and then all downstream
8projects will get it eventually. For now we apply the fix to
9coreutils
10
11Upstream-Status: Pending
12
13Signed-off-by: Khem Raj <raj.khem@gmail.com>
14---
15 lib/gnulib.mk | 2 +-
16 1 file changed, 1 insertion(+), 1 deletion(-)
17
18diff --git a/lib/gnulib.mk b/lib/gnulib.mk
19index e1d74db..c0e92dd 100644
20--- a/lib/gnulib.mk
21+++ b/lib/gnulib.mk
22@@ -1882,7 +1882,7 @@ install-exec-localcharset: all-local
23 case '$(host_os)' in \
24 darwin[56]*) \
25 need_charset_alias=true ;; \
26- darwin* | cygwin* | mingw* | pw32* | cegcc*) \
27+ darwin* | cygwin* | mingw* | pw32* | cegcc* | linux-musl*) \
28 need_charset_alias=false ;; \
29 *) \
30 need_charset_alias=true ;; \
31--
322.1.4
33
diff --git a/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch b/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch
deleted file mode 100644
index b0bd6fa83a..0000000000
--- a/meta/recipes-devtools/patch/patch/0002-Fix-segfault-with-mangled-rename-patch.patch
+++ /dev/null
@@ -1,35 +0,0 @@
1From f290f48a621867084884bfff87f8093c15195e6a Mon Sep 17 00:00:00 2001
2From: Andreas Gruenbacher <agruen@gnu.org>
3Date: Mon, 12 Feb 2018 16:48:24 +0100
4Subject: [PATCH] Fix segfault with mangled rename patch
5
6http://savannah.gnu.org/bugs/?53132
7* src/pch.c (intuit_diff_type): Ensure that two filenames are specified
8for renames and copies (fix the existing check).
9
10Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=f290f48a621867084884bfff87f8093c15195e6a]
11CVE: CVE-2018-6951
12
13Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
14
15---
16 src/pch.c | 3 ++-
17 1 file changed, 2 insertions(+), 1 deletion(-)
18
19diff --git a/src/pch.c b/src/pch.c
20index ff9ed2c..bc6278c 100644
21--- a/src/pch.c
22+++ b/src/pch.c
23@@ -974,7 +974,8 @@ intuit_diff_type (bool need_header, mode_t *p_file_type)
24 if ((pch_rename () || pch_copy ())
25 && ! inname
26 && ! ((i == OLD || i == NEW) &&
27- p_name[! reverse] &&
28+ p_name[reverse] && p_name[! reverse] &&
29+ name_is_valid (p_name[reverse]) &&
30 name_is_valid (p_name[! reverse])))
31 {
32 say ("Cannot %s file without two valid file names\n", pch_rename () ? "rename" : "copy");
33--
342.7.4
35
diff --git a/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch b/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch
deleted file mode 100644
index 2a09d0c03b..0000000000
--- a/meta/recipes-devtools/patch/patch/0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch
+++ /dev/null
@@ -1,38 +0,0 @@
1From b5a91a01e5d0897facdd0f49d64b76b0f02b43e1 Mon Sep 17 00:00:00 2001
2From: Andreas Gruenbacher <agruen@gnu.org>
3Date: Fri, 6 Apr 2018 11:34:51 +0200
4Subject: [PATCH] Allow input files to be missing for ed-style patches
5
6* src/pch.c (do_ed_script): Allow input files to be missing so that new
7files will be created as with non-ed-style patches.
8
9Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=b5a91a01e5d0897facdd0f49d64b76b0f02b43e1]
10CVE: CVE-2018-1000156
11
12Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
13---
14 src/pch.c | 8 +++++---
15 1 file changed, 5 insertions(+), 3 deletions(-)
16
17diff --git a/src/pch.c b/src/pch.c
18index bc6278c..0c5cc26 100644
19--- a/src/pch.c
20+++ b/src/pch.c
21@@ -2394,9 +2394,11 @@ do_ed_script (char const *inname, char const *outname,
22
23 if (! dry_run && ! skip_rest_of_patch) {
24 int exclusive = *outname_needs_removal ? 0 : O_EXCL;
25- assert (! inerrno);
26- *outname_needs_removal = true;
27- copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
28+ if (inerrno != ENOENT)
29+ {
30+ *outname_needs_removal = true;
31+ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
32+ }
33 sprintf (buf, "%s %s%s", editor_program,
34 verbosity == VERBOSE ? "" : "- ",
35 outname);
36--
372.7.4
38
diff --git a/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch b/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch
deleted file mode 100644
index d74c2f182e..0000000000
--- a/meta/recipes-devtools/patch/patch/0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch
+++ /dev/null
@@ -1,215 +0,0 @@
1From 123eaff0d5d1aebe128295959435b9ca5909c26d Mon Sep 17 00:00:00 2001
2From: Andreas Gruenbacher <agruen@gnu.org>
3Date: Fri, 6 Apr 2018 12:14:49 +0200
4Subject: [PATCH] Fix arbitrary command execution in ed-style patches (CVE-2018-1000156)
5
6* src/pch.c (do_ed_script): Write ed script to a temporary file instead
7of piping it to ed: this will cause ed to abort on invalid commands
8instead of rejecting them and carrying on.
9* tests/ed-style: New test case.
10* tests/Makefile.am (TESTS): Add test case.
11
12Upstream-Status: Backport [http://git.savannah.gnu.org/cgit/patch.git/commit/?id=123eaff0d5d1aebe128295959435b9ca5909c26d]
13CVE: CVE-2018-1000156
14
15Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
16---
17 src/pch.c | 91 ++++++++++++++++++++++++++++++++++++++++---------------
18 tests/Makefile.am | 1 +
19 tests/ed-style | 41 +++++++++++++++++++++++++
20 3 files changed, 108 insertions(+), 25 deletions(-)
21 create mode 100644 tests/ed-style
22
23diff --git a/src/pch.c b/src/pch.c
24index 0c5cc26..4fd5a05 100644
25--- a/src/pch.c
26+++ b/src/pch.c
27@@ -33,6 +33,7 @@
28 # include <io.h>
29 #endif
30 #include <safe.h>
31+#include <sys/wait.h>
32
33 #define INITHUNKMAX 125 /* initial dynamic allocation size */
34
35@@ -2389,24 +2390,28 @@ do_ed_script (char const *inname, char const *outname,
36 static char const editor_program[] = EDITOR_PROGRAM;
37
38 file_offset beginning_of_this_line;
39- FILE *pipefp = 0;
40 size_t chars_read;
41+ FILE *tmpfp = 0;
42+ char const *tmpname;
43+ int tmpfd;
44+ pid_t pid;
45+
46+ if (! dry_run && ! skip_rest_of_patch)
47+ {
48+ /* Write ed script to a temporary file. This causes ed to abort on
49+ invalid commands such as when line numbers or ranges exceed the
50+ number of available lines. When ed reads from a pipe, it rejects
51+ invalid commands and treats the next line as a new command, which
52+ can lead to arbitrary command execution. */
53+
54+ tmpfd = make_tempfile (&tmpname, 'e', NULL, O_RDWR | O_BINARY, 0);
55+ if (tmpfd == -1)
56+ pfatal ("Can't create temporary file %s", quotearg (tmpname));
57+ tmpfp = fdopen (tmpfd, "w+b");
58+ if (! tmpfp)
59+ pfatal ("Can't open stream for file %s", quotearg (tmpname));
60+ }
61
62- if (! dry_run && ! skip_rest_of_patch) {
63- int exclusive = *outname_needs_removal ? 0 : O_EXCL;
64- if (inerrno != ENOENT)
65- {
66- *outname_needs_removal = true;
67- copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
68- }
69- sprintf (buf, "%s %s%s", editor_program,
70- verbosity == VERBOSE ? "" : "- ",
71- outname);
72- fflush (stdout);
73- pipefp = popen(buf, binary_transput ? "wb" : "w");
74- if (!pipefp)
75- pfatal ("Can't open pipe to %s", quotearg (buf));
76- }
77 for (;;) {
78 char ed_command_letter;
79 beginning_of_this_line = file_tell (pfp);
80@@ -2417,14 +2422,14 @@ do_ed_script (char const *inname, char const *outname,
81 }
82 ed_command_letter = get_ed_command_letter (buf);
83 if (ed_command_letter) {
84- if (pipefp)
85- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
86+ if (tmpfp)
87+ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
88 write_fatal ();
89 if (ed_command_letter != 'd' && ed_command_letter != 's') {
90 p_pass_comments_through = true;
91 while ((chars_read = get_line ()) != 0) {
92- if (pipefp)
93- if (! fwrite (buf, sizeof *buf, chars_read, pipefp))
94+ if (tmpfp)
95+ if (! fwrite (buf, sizeof *buf, chars_read, tmpfp))
96 write_fatal ();
97 if (chars_read == 2 && strEQ (buf, ".\n"))
98 break;
99@@ -2437,13 +2442,49 @@ do_ed_script (char const *inname, char const *outname,
100 break;
101 }
102 }
103- if (!pipefp)
104+ if (!tmpfp)
105 return;
106- if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, pipefp) == 0
107- || fflush (pipefp) != 0)
108+ if (fwrite ("w\nq\n", sizeof (char), (size_t) 4, tmpfp) == 0
109+ || fflush (tmpfp) != 0)
110 write_fatal ();
111- if (pclose (pipefp) != 0)
112- fatal ("%s FAILED", editor_program);
113+
114+ if (lseek (tmpfd, 0, SEEK_SET) == -1)
115+ pfatal ("Can't rewind to the beginning of file %s", quotearg (tmpname));
116+
117+ if (! dry_run && ! skip_rest_of_patch) {
118+ int exclusive = *outname_needs_removal ? 0 : O_EXCL;
119+ *outname_needs_removal = true;
120+ if (inerrno != ENOENT)
121+ {
122+ *outname_needs_removal = true;
123+ copy_file (inname, outname, 0, exclusive, instat.st_mode, true);
124+ }
125+ sprintf (buf, "%s %s%s", editor_program,
126+ verbosity == VERBOSE ? "" : "- ",
127+ outname);
128+ fflush (stdout);
129+
130+ pid = fork();
131+ if (pid == -1)
132+ pfatal ("Can't fork");
133+ else if (pid == 0)
134+ {
135+ dup2 (tmpfd, 0);
136+ execl ("/bin/sh", "sh", "-c", buf, (char *) 0);
137+ _exit (2);
138+ }
139+ else
140+ {
141+ int wstatus;
142+ if (waitpid (pid, &wstatus, 0) == -1
143+ || ! WIFEXITED (wstatus)
144+ || WEXITSTATUS (wstatus) != 0)
145+ fatal ("%s FAILED", editor_program);
146+ }
147+ }
148+
149+ fclose (tmpfp);
150+ safe_unlink (tmpname);
151
152 if (ofp)
153 {
154diff --git a/tests/Makefile.am b/tests/Makefile.am
155index 6b6df63..16f8693 100644
156--- a/tests/Makefile.am
157+++ b/tests/Makefile.am
158@@ -32,6 +32,7 @@ TESTS = \
159 crlf-handling \
160 dash-o-append \
161 deep-directories \
162+ ed-style \
163 empty-files \
164 false-match \
165 fifo \
166diff --git a/tests/ed-style b/tests/ed-style
167new file mode 100644
168index 0000000..d8c0689
169--- /dev/null
170+++ b/tests/ed-style
171@@ -0,0 +1,41 @@
172+# Copyright (C) 2018 Free Software Foundation, Inc.
173+#
174+# Copying and distribution of this file, with or without modification,
175+# in any medium, are permitted without royalty provided the copyright
176+# notice and this notice are preserved.
177+
178+. $srcdir/test-lib.sh
179+
180+require cat
181+use_local_patch
182+use_tmpdir
183+
184+# ==============================================================
185+
186+cat > ed1.diff <<EOF
187+0a
188+foo
189+.
190+EOF
191+
192+check 'patch -e foo -i ed1.diff' <<EOF
193+EOF
194+
195+check 'cat foo' <<EOF
196+foo
197+EOF
198+
199+cat > ed2.diff <<EOF
200+1337a
201+r !echo bar
202+,p
203+EOF
204+
205+check 'patch -e foo -i ed2.diff 2> /dev/null || echo "Status: $?"' <<EOF
206+?
207+Status: 2
208+EOF
209+
210+check 'cat foo' <<EOF
211+foo
212+EOF
213--
2142.7.4
215
diff --git a/meta/recipes-devtools/patch/patch/CVE-2019-13636.patch b/meta/recipes-devtools/patch/patch/CVE-2019-13636.patch
deleted file mode 100644
index 8059d9fe19..0000000000
--- a/meta/recipes-devtools/patch/patch/CVE-2019-13636.patch
+++ /dev/null
@@ -1,113 +0,0 @@
1From dce4683cbbe107a95f1f0d45fabc304acfb5d71a Mon Sep 17 00:00:00 2001
2From: Andreas Gruenbacher <agruen@gnu.org>
3Date: Mon, 15 Jul 2019 16:21:48 +0200
4Subject: Don't follow symlinks unless --follow-symlinks is given
5
6* src/inp.c (plan_a, plan_b), src/util.c (copy_to_fd, copy_file,
7append_to_file): Unless the --follow-symlinks option is given, open files with
8the O_NOFOLLOW flag to avoid following symlinks. So far, we were only doing
9that consistently for input files.
10* src/util.c (create_backup): When creating empty backup files, (re)create them
11with O_CREAT | O_EXCL to avoid following symlinks in that case as well.
12
13CVE: CVE-2019-13636
14Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/patch.git/patch/?id=dce4683cbbe107a95f1f0d45fabc304acfb5d71a]
15Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
16
17---
18 src/inp.c | 12 ++++++++++--
19 src/util.c | 14 +++++++++++---
20 2 files changed, 21 insertions(+), 5 deletions(-)
21
22diff --git a/src/inp.c b/src/inp.c
23index 32d0919..22d7473 100644
24--- a/src/inp.c
25+++ b/src/inp.c
26@@ -238,8 +238,13 @@ plan_a (char const *filename)
27 {
28 if (S_ISREG (instat.st_mode))
29 {
30- int ifd = safe_open (filename, O_RDONLY|binary_transput, 0);
31+ int flags = O_RDONLY | binary_transput;
32 size_t buffered = 0, n;
33+ int ifd;
34+
35+ if (! follow_symlinks)
36+ flags |= O_NOFOLLOW;
37+ ifd = safe_open (filename, flags, 0);
38 if (ifd < 0)
39 pfatal ("can't open file %s", quotearg (filename));
40
41@@ -340,6 +345,7 @@ plan_a (char const *filename)
42 static void
43 plan_b (char const *filename)
44 {
45+ int flags = O_RDONLY | binary_transput;
46 int ifd;
47 FILE *ifp;
48 int c;
49@@ -353,7 +359,9 @@ plan_b (char const *filename)
50
51 if (instat.st_size == 0)
52 filename = NULL_DEVICE;
53- if ((ifd = safe_open (filename, O_RDONLY | binary_transput, 0)) < 0
54+ if (! follow_symlinks)
55+ flags |= O_NOFOLLOW;
56+ if ((ifd = safe_open (filename, flags, 0)) < 0
57 || ! (ifp = fdopen (ifd, binary_transput ? "rb" : "r")))
58 pfatal ("Can't open file %s", quotearg (filename));
59 if (TMPINNAME_needs_removal)
60diff --git a/src/util.c b/src/util.c
61index 1cc08ba..fb38307 100644
62--- a/src/util.c
63+++ b/src/util.c
64@@ -388,7 +388,7 @@ create_backup (char const *to, const struct stat *to_st, bool leave_original)
65
66 try_makedirs_errno = ENOENT;
67 safe_unlink (bakname);
68- while ((fd = safe_open (bakname, O_CREAT | O_WRONLY | O_TRUNC, 0666)) < 0)
69+ while ((fd = safe_open (bakname, O_CREAT | O_EXCL | O_WRONLY | O_TRUNC, 0666)) < 0)
70 {
71 if (errno != try_makedirs_errno)
72 pfatal ("Can't create file %s", quotearg (bakname));
73@@ -579,10 +579,13 @@ create_file (char const *file, int open_flags, mode_t mode,
74 static void
75 copy_to_fd (const char *from, int tofd)
76 {
77+ int from_flags = O_RDONLY | O_BINARY;
78 int fromfd;
79 ssize_t i;
80
81- if ((fromfd = safe_open (from, O_RDONLY | O_BINARY, 0)) < 0)
82+ if (! follow_symlinks)
83+ from_flags |= O_NOFOLLOW;
84+ if ((fromfd = safe_open (from, from_flags, 0)) < 0)
85 pfatal ("Can't reopen file %s", quotearg (from));
86 while ((i = read (fromfd, buf, bufsize)) != 0)
87 {
88@@ -625,6 +628,8 @@ copy_file (char const *from, char const *to, struct stat *tost,
89 else
90 {
91 assert (S_ISREG (mode));
92+ if (! follow_symlinks)
93+ to_flags |= O_NOFOLLOW;
94 tofd = create_file (to, O_WRONLY | O_BINARY | to_flags, mode,
95 to_dir_known_to_exist);
96 copy_to_fd (from, tofd);
97@@ -640,9 +645,12 @@ copy_file (char const *from, char const *to, struct stat *tost,
98 void
99 append_to_file (char const *from, char const *to)
100 {
101+ int to_flags = O_WRONLY | O_APPEND | O_BINARY;
102 int tofd;
103
104- if ((tofd = safe_open (to, O_WRONLY | O_BINARY | O_APPEND, 0)) < 0)
105+ if (! follow_symlinks)
106+ to_flags |= O_NOFOLLOW;
107+ if ((tofd = safe_open (to, to_flags, 0)) < 0)
108 pfatal ("Can't reopen file %s", quotearg (to));
109 copy_to_fd (from, tofd);
110 if (close (tofd) != 0)
111--
112cgit v1.0-41-gc330
113
diff --git a/meta/recipes-devtools/patch/patch/CVE-2019-20633.patch b/meta/recipes-devtools/patch/patch/CVE-2019-20633.patch
deleted file mode 100644
index 9b2c07cf1e..0000000000
--- a/meta/recipes-devtools/patch/patch/CVE-2019-20633.patch
+++ /dev/null
@@ -1,31 +0,0 @@
1From 15b158db3ae11cb835f2eb8d2eb48e09d1a4af48 Mon Sep 17 00:00:00 2001
2From: Andreas Gruenbacher <agruen@gnu.org>
3Date: Mon, 15 Jul 2019 19:10:02 +0200
4Subject: Avoid invalid memory access in context format diffs
5
6* src/pch.c (another_hunk): Avoid invalid memory access in context format
7diffs.
8
9CVE: CVE-2019-20633
10Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/patch.git/patch/?id=15b158db3ae11cb835f2eb8d2eb48e09d1a4af48]
11Signed-off-by: Scott Murray <scott.murray@konsulko.com>
12
13---
14 src/pch.c | 1 +
15 1 file changed, 1 insertion(+)
16
17diff --git a/src/pch.c b/src/pch.c
18index a500ad9..cb54e03 100644
19--- a/src/pch.c
20+++ b/src/pch.c
21@@ -1328,6 +1328,7 @@ another_hunk (enum diff difftype, bool rev)
22 ptrn_prefix_context = context;
23 ptrn_suffix_context = context;
24 if (repl_beginning
25+ || p_end <= 0
26 || (p_end
27 != p_ptrn_lines + 1 + (p_Char[p_end - 1] == '\n')))
28 {
29--
30cgit v1.2.1
31
diff --git a/meta/recipes-devtools/patch/patch_2.7.6.bb b/meta/recipes-devtools/patch/patch_2.7.6.bb
deleted file mode 100644
index 3dc3b5863c..0000000000
--- a/meta/recipes-devtools/patch/patch_2.7.6.bb
+++ /dev/null
@@ -1,25 +0,0 @@
1require patch.inc
2LICENSE = "GPL-3.0-only"
3
4SRC_URI += "file://0001-Unset-need_charset_alias-when-building-for-musl.patch \
5 file://0002-Fix-segfault-with-mangled-rename-patch.patch \
6 file://0003-Allow-input-files-to-be-missing-for-ed-style-patches.patch \
7 file://0004-Fix-arbitrary-command-execution-in-ed-style-patches-.patch \
8 file://0001-Fix-swapping-fake-lines-in-pch_swap.patch \
9 file://CVE-2019-13636.patch \
10 file://0001-Invoke-ed-directly-instead-of-using-the-shell.patch \
11 file://0001-Don-t-leak-temporary-file-on-failed-ed-style-patch.patch \
12 file://0001-Don-t-leak-temporary-file-on-failed-multi-file-ed.patch \
13 file://CVE-2019-20633.patch \
14"
15
16SRC_URI[sha256sum] = "8cf86e00ad3aaa6d26aca30640e86b0e3e1f395ed99f189b06d4c9f74bc58a4e"
17
18LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
19
20PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
21PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
22
23PROVIDES:append:class-native = " patch-replacement-native"
24
25BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/patch/patch_2.8.bb b/meta/recipes-devtools/patch/patch_2.8.bb
new file mode 100644
index 0000000000..6317ac775d
--- /dev/null
+++ b/meta/recipes-devtools/patch/patch_2.8.bb
@@ -0,0 +1,13 @@
1require patch.inc
2LICENSE = "GPL-3.0-only"
3
4SRC_URI[sha256sum] = "308a4983ff324521b9b21310bfc2398ca861798f02307c79eb99bb0e0d2bf980"
5
6LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
7
8PACKAGECONFIG ?= "${@bb.utils.filter('DISTRO_FEATURES', 'xattr', d)}"
9PACKAGECONFIG[xattr] = "--enable-xattr,--disable-xattr,attr,"
10
11PROVIDES:append:class-native = " patch-replacement-native"
12
13BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-devtools/pseudo/pseudo_git.bb b/meta/recipes-devtools/pseudo/pseudo_git.bb
index d7528d336b..4693afcaf6 100644
--- a/meta/recipes-devtools/pseudo/pseudo_git.bb
+++ b/meta/recipes-devtools/pseudo/pseudo_git.bb
@@ -25,3 +25,10 @@ TARGET_CC_ARCH:remove = "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_TIME_BITS
25 25
26# error: use of undeclared identifier '_STAT_VER' 26# error: use of undeclared identifier '_STAT_VER'
27COMPATIBLE_HOST:libc-musl = 'null' 27COMPATIBLE_HOST:libc-musl = 'null'
28
29#| ./ports/linux/pseudo_wrappers.c:80:14: error: use of unknown builtin '__builtin_apply' [-Wimplicit-function-declaration]
30#| void *res = __builtin_apply((void (*)()) real_syscall, __builtin_apply_args(), sizeof(long) * 7);
31#| ^
32#| ./ports/linux/pseudo_wrappers.c:80:57: error: use of unknown builtin '__builtin_apply_args' [-Wimplicit-function-declaration]
33#| void *res = __builtin_apply((void (*)()) real_syscall, __builtin_apply_args(), sizeof(long) * 7);
34TOOLCHAIN = "gcc"
diff --git a/meta/recipes-devtools/python/python3-cython/0001-Output-import-relative-paths-in-generated-C-code.-GH.patch b/meta/recipes-devtools/python/python3-cython/0001-Output-import-relative-paths-in-generated-C-code.-GH.patch
deleted file mode 100644
index bbafc29416..0000000000
--- a/meta/recipes-devtools/python/python3-cython/0001-Output-import-relative-paths-in-generated-C-code.-GH.patch
+++ /dev/null
@@ -1,73 +0,0 @@
1From 9b5f3b09f76899eba510c2d8f3ed2b0f752a4d1b Mon Sep 17 00:00:00 2001
2From: Oscar Benjamin <oscar.j.benjamin@gmail.com>
3Date: Sat, 24 Aug 2024 08:30:31 +0100
4Subject: [PATCH] Output import-relative paths in generated C code. (GH-6341)
5
6When cython is run on a file that is not in the current working directory,
7it outputs filepaths that are either absolute or are basenames.
8It is not good to output absolute paths in the generated C code and
9basenames mess up coverage measurement.
10
11Upstream-Status: Backport [20bceea6b19ffc2f65b9fba2e4f737f09e5a2b20]
12Signed-off-by: Ross Burton <ross.burton@arm.com>
13---
14 Cython/Compiler/ExprNodes.py | 8 +++++++-
15 Cython/Compiler/ModuleNode.py | 9 ++++++---
16 2 files changed, 13 insertions(+), 4 deletions(-)
17
18diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py
19index a6bb1688e..0fbb15368 100644
20--- a/Cython/Compiler/ExprNodes.py
21+++ b/Cython/Compiler/ExprNodes.py
22@@ -21,6 +21,7 @@ import re
23 import sys
24 import copy
25 import os.path
26+import pathlib
27 import operator
28
29 from .Errors import (
30@@ -10072,7 +10073,12 @@ class CodeObjectNode(ExprNode):
31 func_name = code.get_py_string_const(
32 func.name, identifier=True, is_str=False, unicode_value=func.name)
33 # FIXME: better way to get the module file path at module init time? Encoding to use?
34- file_path = StringEncoding.bytes_literal(func.pos[0].get_filenametable_entry().encode('utf8'), 'utf8')
35+ file_path = func.pos[0].get_filenametable_entry()
36+ if os.path.isabs(file_path):
37+ file_path = func.pos[0].get_description()
38+ # Always use / as separator
39+ file_path = pathlib.Path(file_path).as_posix()
40+ file_path = StringEncoding.bytes_literal(file_path.encode('utf-8'), 'utf8')
41 file_path_const = code.get_py_string_const(file_path, identifier=False, is_str=True)
42
43 # This combination makes CPython create a new dict for "frame.f_locals" (see GH #1836).
44diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py
45index 43c6b5f07..8c29d6db7 100644
46--- a/Cython/Compiler/ModuleNode.py
47+++ b/Cython/Compiler/ModuleNode.py
48@@ -13,6 +13,7 @@ from collections import defaultdict
49 import json
50 import operator
51 import os
52+import pathlib
53 import re
54 import sys
55
56@@ -944,9 +945,11 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode):
57 for source_desc in code.globalstate.filename_list:
58 file_path = source_desc.get_filenametable_entry()
59 if isabs(file_path):
60- file_path = basename(file_path) # never include absolute paths
61- escaped_filename = file_path.replace("\\", "\\\\").replace('"', r'\"')
62- escaped_filename = as_encoded_filename(escaped_filename)
63+ # never include absolute paths
64+ file_path = source_desc.get_description()
65+ # Always use / as separator
66+ file_path = pathlib.Path(file_path).as_posix()
67+ escaped_filename = as_encoded_filename(file_path)
68 code.putln('%s,' % escaped_filename.as_c_string_literal())
69 else:
70 # Some C compilers don't like an empty array
71--
722.34.1
73
diff --git a/meta/recipes-devtools/python/python3-cython_3.0.12.bb b/meta/recipes-devtools/python/python3-cython_3.1.0.bb
index f1951e3ae6..f93135b94b 100644
--- a/meta/recipes-devtools/python/python3-cython_3.0.12.bb
+++ b/meta/recipes-devtools/python/python3-cython_3.1.0.bb
@@ -7,8 +7,7 @@ SECTION = "devel/python"
7LICENSE = "Apache-2.0" 7LICENSE = "Apache-2.0"
8LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=61c3ee8961575861fa86c7e62bc9f69c" 8LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=61c3ee8961575861fa86c7e62bc9f69c"
9 9
10SRC_URI += "file://0001-Output-import-relative-paths-in-generated-C-code.-GH.patch" 10SRC_URI[sha256sum] = "1097dd60d43ad0fff614a57524bfd531b35c13a907d13bee2cc2ec152e6bf4a1"
11SRC_URI[sha256sum] = "b988bb297ce76c671e28c97d017b95411010f7c77fa6623dd0bb47eed1aee1bc"
12 11
13inherit pypi setuptools3 cython 12inherit pypi setuptools3 cython
14 13
diff --git a/meta/recipes-devtools/python/python3-numpy_2.2.5.bb b/meta/recipes-devtools/python/python3-numpy_2.2.6.bb
index f963e15b83..10468d6850 100644
--- a/meta/recipes-devtools/python/python3-numpy_2.2.5.bb
+++ b/meta/recipes-devtools/python/python3-numpy_2.2.6.bb
@@ -12,7 +12,7 @@ SRC_URI = "${GITHUB_BASE_URI}/download/v${PV}/${SRCNAME}-${PV}.tar.gz \
12 file://fix_reproducibility.patch \ 12 file://fix_reproducibility.patch \
13 file://run-ptest \ 13 file://run-ptest \
14 " 14 "
15SRC_URI[sha256sum] = "a9c0d994680cd991b1cb772e8b297340085466a6fe964bc9d4e80f5e2f43c291" 15SRC_URI[sha256sum] = "e29554e2bef54a90aa5cc07da6ce955accb83f21ab5de01a62c8478897b264fd"
16 16
17GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases" 17GITHUB_BASE_URI = "https://github.com/numpy/numpy/releases"
18UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$" 18UPSTREAM_CHECK_REGEX = "releases/tag/v?(?P<pver>\d+(\.\d+)+)$"
diff --git a/meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch b/meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch
deleted file mode 100644
index 785a2192c3..0000000000
--- a/meta/recipes-devtools/python/python3-setuptools/0001-conditionally-do-not-fetch-code-by-easy_install.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From 92363514224b0aeba065f83b868a15a2a03601ab Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Tue, 17 Jul 2018 10:13:38 +0800
4Subject: [PATCH] conditionally do not fetch code by easy_install
5
6If NO_FETCH_BUILD is set, do not fetch code in easy_install. This avoids setup.py
7trying to fetch missing dependencies at build time.
8
9This is only used by the deprecated codepath as implemented by setuptools3.bbclass, so
10when that ever gets removed this patch can also be deleted.
11
12Upstream-Status: Denied [https://github.com/pypa/setuptools/issues/4735]
13Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
14
15Update to apply against v75.6.0.
16
17Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
18---
19 setuptools/command/easy_install.py | 5 +++++
20 1 file changed, 5 insertions(+)
21
22diff --git a/setuptools/command/easy_install.py b/setuptools/command/easy_install.py
23index eb1b4c1..4fd8d14 100644
24--- a/setuptools/command/easy_install.py
25+++ b/setuptools/command/easy_install.py
26@@ -672,6 +672,11 @@ class easy_install(Command):
27 os.path.exists(tmpdir) and _rmtree(tmpdir)
28
29 def easy_install(self, spec, deps: bool = False) -> Distribution | None:
30+ if os.environ.get('NO_FETCH_BUILD', None):
31+ log.error("ERROR: Do not try to fetch `%s' for building. "
32+ "Please add its native recipe to DEPENDS." % spec)
33+ return None
34+
35 with self._tmpdir() as tmpdir:
36 if not isinstance(spec, Requirement):
37 if URL_SCHEME(spec):
diff --git a/meta/recipes-devtools/python/python3-setuptools_78.1.0.bb b/meta/recipes-devtools/python/python3-setuptools_80.8.0.bb
index 7455ec41af..327eff5700 100644
--- a/meta/recipes-devtools/python/python3-setuptools_78.1.0.bb
+++ b/meta/recipes-devtools/python/python3-setuptools_80.8.0.bb
@@ -8,12 +8,10 @@ inherit pypi python_setuptools_build_meta
8 8
9CVE_PRODUCT = "python3-setuptools python:setuptools" 9CVE_PRODUCT = "python3-setuptools python:setuptools"
10 10
11SRC_URI:append:class-native = " file://0001-conditionally-do-not-fetch-code-by-easy_install.patch"
12
13SRC_URI += " \ 11SRC_URI += " \
14 file://0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch" 12 file://0001-_distutils-sysconfig.py-make-it-possible-to-substite.patch"
15 13
16SRC_URI[sha256sum] = "18fd474d4a82a5f83dac888df697af65afa82dec7323d09c3e37d1f14288da54" 14SRC_URI[sha256sum] = "49f7af965996f26d43c8ae34539c8d99c5042fbff34302ea151eaa9c207cd257"
17 15
18DEPENDS += "python3" 16DEPENDS += "python3"
19 17
diff --git a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch
index 508754286f..39b62f6f26 100644
--- a/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch
+++ b/meta/recipes-devtools/python/python3/0001-Makefile.pre-use-qemu-wrapper-when-gathering-profile.patch
@@ -1,16 +1,21 @@
1From 701720a5bab5b42fd7520fd9dd95fd2c7e42c186 Mon Sep 17 00:00:00 2001 1From e7a8a7385f561f214054cf95f0a22bfa064eee0b Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com> 2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 30 Jan 2019 12:41:04 +0100 3Date: Wed, 30 Jan 2019 12:41:04 +0100
4Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data 4Subject: [PATCH] Makefile.pre: use qemu wrapper when gathering profile data
5 5
6Upstream-Status: Inappropriate [oe-core specific] 6Upstream-Status: Inappropriate [oe-core specific]
7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> 7Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
8
9Update to remove test_types from the test list, since that fails under
10qemu now.
11
12Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
8--- 13---
9 Makefile.pre.in | 3 +-- 14 Makefile.pre.in | 3 +--
10 1 file changed, 1 insertion(+), 2 deletions(-) 15 1 file changed, 1 insertion(+), 2 deletions(-)
11 16
12diff --git a/Makefile.pre.in b/Makefile.pre.in 17diff --git a/Makefile.pre.in b/Makefile.pre.in
13index f9932dd..be1b9ea 100644 18index 3bd4495f95b..8e8fc60bc76 100644
14--- a/Makefile.pre.in 19--- a/Makefile.pre.in
15+++ b/Makefile.pre.in 20+++ b/Makefile.pre.in
16@@ -751,8 +751,7 @@ profile-run-stamp: 21@@ -751,8 +751,7 @@ profile-run-stamp:
@@ -19,7 +24,10 @@ index f9932dd..be1b9ea 100644
19 # Next, run the profile task to generate the profile information. 24 # Next, run the profile task to generate the profile information.
20- @ # FIXME: can't run for a cross build 25- @ # FIXME: can't run for a cross build
21- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK) 26- $(LLVM_PROF_FILE) $(RUNSHARED) ./$(BUILDPYTHON) $(PROFILE_TASK)
22+ ./pgo-wrapper ./python -m test.regrtest --pgo test_grammar test_opcodes test_dict test_types 27+ ./pgo-wrapper ./python -m test.regrtest --pgo test_grammar test_opcodes test_dict
23 $(LLVM_PROF_MERGER) 28 $(LLVM_PROF_MERGER)
24 # Remove profile generation binary since we are done with it. 29 # Remove profile generation binary since we are done with it.
25 $(MAKE) clean-retain-profile 30 $(MAKE) clean-retain-profile
31--
322.39.5
33
diff --git a/meta/recipes-devtools/python/python3_3.13.2.bb b/meta/recipes-devtools/python/python3_3.13.3.bb
index 8e16ce90dc..6839d28e19 100644
--- a/meta/recipes-devtools/python/python3_3.13.2.bb
+++ b/meta/recipes-devtools/python/python3_3.13.3.bb
@@ -36,7 +36,7 @@ SRC_URI:append:class-native = " \
36 file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \ 36 file://0001-Lib-sysconfig.py-use-prefix-value-from-build-configu.patch \
37 " 37 "
38 38
39SRC_URI[sha256sum] = "d984bcc57cd67caab26f7def42e523b1c015bbc5dc07836cf4f0b63fa159eb56" 39SRC_URI[sha256sum] = "40f868bcbdeb8149a3149580bb9bfd407b3321cd48f0be631af955ac92c0e041"
40 40
41# exclude pre-releases for both python 2.x and 3.x 41# exclude pre-releases for both python 2.x and 3.x
42UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar" 42UPSTREAM_CHECK_REGEX = "[Pp]ython-(?P<pver>\d+(\.\d+)+).tar"
diff --git a/meta/recipes-devtools/qemu/qemu_10.0.0.bb b/meta/recipes-devtools/qemu/qemu_10.0.0.bb
index dc1352232e..5d544d8d13 100644
--- a/meta/recipes-devtools/qemu/qemu_10.0.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_10.0.0.bb
@@ -7,6 +7,7 @@ DEPENDS += "glib-2.0 zlib pixman"
7DEPENDS:append:libc-musl = " libucontext" 7DEPENDS:append:libc-musl = " libucontext"
8 8
9CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}" 9CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
10LDFLAGS:append:toolchain-clang:x86 = " -latomic"
10 11
11RDEPENDS:${PN}-common:class-target += "bash" 12RDEPENDS:${PN}-common:class-target += "bash"
12 13
diff --git a/meta/recipes-devtools/rpm-sequoia/files/0001-Use-optional-env-vars-to-force-runtime-paths-in-test.patch b/meta/recipes-devtools/rpm-sequoia/files/0001-Use-optional-env-vars-to-force-runtime-paths-in-test.patch
new file mode 100644
index 0000000000..d0179fc53c
--- /dev/null
+++ b/meta/recipes-devtools/rpm-sequoia/files/0001-Use-optional-env-vars-to-force-runtime-paths-in-test.patch
@@ -0,0 +1,35 @@
1From 590937523deea4ad2a2ee0e1ae4412a8f59e0170 Mon Sep 17 00:00:00 2001
2From: Ines KCHELFI <ines.kchelfi@smile.fr>
3Date: Thu, 10 Apr 2025 15:14:11 +0200
4Subject: [PATCH] Use optional env vars to force runtime paths in tests
5
6Signed-off-by: Ines KCHELFI <ines.kchelfi@smile.fr>
7Upstream-Status: Submitted [https://github.com/rpm-software-management/rpm-sequoia/pull/86]
8---
9 tests/symbols.rs | 6 ++++--
10 1 file changed, 4 insertions(+), 2 deletions(-)
11
12diff --git a/tests/symbols.rs b/tests/symbols.rs
13index c16dd9b..dc4a42c 100644
14--- a/tests/symbols.rs
15+++ b/tests/symbols.rs
16@@ -14,7 +14,8 @@ fn symbols() -> anyhow::Result<()> {
17 // OUT_DIR gives us
18 // `/tmp/rpm-sequoia/debug/build/rpm-sequoia-HASH/out`.
19
20- let out_dir = PathBuf::from(env!("OUT_DIR"));
21+ let out_dir = PathBuf::from(option_env!("FORCE_RUNTIME_PATH_LIB")
22+ .unwrap_or(env!("OUT_DIR")));
23 let mut build_dir = out_dir;
24 let lib = loop {
25 let mut lib = build_dir.clone();
26@@ -53,7 +54,8 @@ fn symbols() -> anyhow::Result<()> {
27 }
28
29 let mut expected_symbols_txt_fn
30- = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
31+ = PathBuf::from(option_env!("FORCE_RUNTIME_PATH_SRC")
32+ .unwrap_or(env!("CARGO_MANIFEST_DIR")));
33 expected_symbols_txt_fn.push("src/symbols.txt");
34
35 let mut expected_symbols_txt = Vec::new();
diff --git a/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.7.0.bb b/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.7.0.bb
index 57062b100a..6ef626e466 100644
--- a/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.7.0.bb
+++ b/meta/recipes-devtools/rpm-sequoia/rpm-sequoia_1.7.0.bb
@@ -10,9 +10,12 @@ LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=f0ff5ff7747cf7d394079c6ae87f5f0c"
10 10
11DEPENDS = "openssl" 11DEPENDS = "openssl"
12 12
13inherit pkgconfig rust cargo cargo-update-recipe-crates 13inherit pkgconfig rust cargo cargo-update-recipe-crates ptest-cargo
14
15SRC_URI = "git://github.com/rpm-software-management/rpm-sequoia.git;protocol=https;branch=main \
16 file://0001-Use-optional-env-vars-to-force-runtime-paths-in-test.patch \
17"
14 18
15SRC_URI = "git://github.com/rpm-software-management/rpm-sequoia.git;protocol=https;branch=main"
16 19
17SRCREV = "0667e04ae7fb8cf0490919978d69883d16400e41" 20SRCREV = "0667e04ae7fb8cf0490919978d69883d16400e41"
18 21
@@ -41,6 +44,13 @@ do_compile:prepend () {
41 export LIBDIR="${libdir}" 44 export LIBDIR="${libdir}"
42} 45}
43 46
47# By default, ptest binaries contain host build dir paths.
48# Use custom environment variables to force these paths to match the target instead.
49do_compile_ptest_cargo:prepend() {
50 os.environ["FORCE_RUNTIME_PATH_LIB"] = d.getVar("libdir")
51 os.environ["FORCE_RUNTIME_PATH_SRC"] = d.getVar("PTEST_PATH")
52}
53
44do_install:append () { 54do_install:append () {
45 # Move the library to the correct location expected by rpm-sequoia.pc 55 # Move the library to the correct location expected by rpm-sequoia.pc
46 mkdir -p ${D}${libdir} 56 mkdir -p ${D}${libdir}
@@ -54,6 +64,18 @@ do_install:append () {
54 install -m644 ${S}/target/release/rpm-sequoia.pc ${D}${libdir}/pkgconfig 64 install -m644 ${S}/target/release/rpm-sequoia.pc ${D}${libdir}/pkgconfig
55} 65}
56 66
67do_install_ptest:append () {
68 install -d ${D}${PTEST_PATH}/src
69 install -m 644 ${S}/src/symbols.txt ${D}${PTEST_PATH}/src/symbols.txt
70}
71
72# Tests need objdump
73# ptest requires a symlinked library that is only present in the -dev package,
74# so we add the -dev to runtime dependencies.
75# The "dev-deps" QA check is skipped to avoid warnings about this dev package dependency.
76RDEPENDS:${PN}-ptest += "binutils ${PN}-dev"
77INSANE_SKIP:${PN}-ptest += "dev-deps"
78
57RDEPENDS:${PN} = "rpm-sequoia-crypto-policy" 79RDEPENDS:${PN} = "rpm-sequoia-crypto-policy"
58PACKAGE_WRITE_DEPS += "rpm-sequoia-crypto-policy-native" 80PACKAGE_WRITE_DEPS += "rpm-sequoia-crypto-policy-native"
59 81
diff --git a/meta/recipes-devtools/rpm/rpm_4.20.0.bb b/meta/recipes-devtools/rpm/rpm_4.20.0.bb
index 281fde1c82..bcc138dab0 100644
--- a/meta/recipes-devtools/rpm/rpm_4.20.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_4.20.0.bb
@@ -62,6 +62,10 @@ OECMAKE_GENERATOR = "Unix Makefiles"
62 62
63BBCLASSEXTEND = "native nativesdk" 63BBCLASSEXTEND = "native nativesdk"
64 64
65# Clang results in a reproducibility issue
66# https://github.com/llvm/llvm-project/issues/82541
67TOOLCHAIN = "gcc"
68
65PACKAGECONFIG ??= "archive" 69PACKAGECONFIG ??= "archive"
66 70
67PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF" 71PACKAGECONFIG[plugins] = "-DENABLE_PLUGINS=ON,-DENABLE_PLUGINS=OFF"
diff --git a/meta/recipes-devtools/rust/files/rust-oe-selftest.patch b/meta/recipes-devtools/rust/files/rust-oe-selftest.patch
index 909bc971db..048fc3f10b 100644
--- a/meta/recipes-devtools/rust/files/rust-oe-selftest.patch
+++ b/meta/recipes-devtools/rust/files/rust-oe-selftest.patch
@@ -103,50 +103,6 @@ index 1a9d3d3f12f..0a9cfc48806 100644
103 fn test_get_mut_poison() { 103 fn test_get_mut_poison() {
104 let mut m = new_poisoned_rwlock(NonCopy(10)); 104 let mut m = new_poisoned_rwlock(NonCopy(10));
105 105
106diff --git a/library/std/src/thread/tests.rs b/library/std/src/thread/tests.rs
107index 5d6b9e94ee9..a5aacb2eb87 100644
108--- a/library/std/src/thread/tests.rs
109+++ b/library/std/src/thread/tests.rs
110@@ -116,6 +116,7 @@ fn test_is_finished() {
111 }
112
113 #[test]
114+#[ignore]
115 fn test_join_panic() {
116 match thread::spawn(move || panic!()).join() {
117 result::Result::Err(_) => (),
118@@ -218,6 +219,7 @@ fn test_simple_newsched_spawn() {
119 }
120
121 #[test]
122+#[ignore]
123 fn test_try_panic_message_string_literal() {
124 match thread::spawn(move || {
125 panic!("static string");
126@@ -234,6 +236,7 @@ fn test_try_panic_message_string_literal() {
127 }
128
129 #[test]
130+#[ignore]
131 fn test_try_panic_any_message_owned_str() {
132 match thread::spawn(move || {
133 panic_any("owned string".to_string());
134@@ -250,6 +253,7 @@ fn test_try_panic_any_message_owned_str() {
135 }
136
137 #[test]
138+#[ignore]
139 fn test_try_panic_any_message_any() {
140 match thread::spawn(move || {
141 panic_any(Box::new(413u16) as Box<dyn Any + Send>);
142@@ -268,6 +272,7 @@ fn test_try_panic_any_message_any() {
143 }
144
145 #[test]
146+#[ignore]
147 fn test_try_panic_any_message_unit_struct() {
148 struct Juju;
149
150diff --git a/library/test/src/tests.rs b/library/test/src/tests.rs 106diff --git a/library/test/src/tests.rs b/library/test/src/tests.rs
151--- a/library/test/src/tests.rs 107--- a/library/test/src/tests.rs
152+++ b/library/test/src/tests.rs 108+++ b/library/test/src/tests.rs
diff --git a/meta/recipes-devtools/rust/rust_1.85.1.bb b/meta/recipes-devtools/rust/rust_1.85.1.bb
index dc4f564855..f289db6306 100644
--- a/meta/recipes-devtools/rust/rust_1.85.1.bb
+++ b/meta/recipes-devtools/rust/rust_1.85.1.bb
@@ -7,17 +7,12 @@ LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=9c0fae516fe8aaea2fb601db4800daf7"
7inherit rust 7inherit rust
8inherit cargo_common 8inherit cargo_common
9 9
10DEPENDS += "file-native python3-native" 10DEPENDS += "rust-llvm"
11DEPENDS:append:class-native = " rust-llvm-native"
12DEPENDS:append:class-nativesdk = " nativesdk-rust-llvm"
13
14# native rust uses cargo/rustc from binary snapshots to bootstrap 11# native rust uses cargo/rustc from binary snapshots to bootstrap
15# but everything else should use our native builds 12# but everything else should use our native builds
16DEPENDS:append:class-target = " cargo-native rust-native" 13DEPENDS:append:class-target = " cargo-native rust-native"
17DEPENDS:append:class-nativesdk = " cargo-native rust-native" 14DEPENDS:append:class-nativesdk = " cargo-native rust-native"
18 15
19DEPENDS += "rust-llvm (=${PV})"
20
21RDEPENDS:${PN}:append:class-target = " gcc g++ binutils" 16RDEPENDS:${PN}:append:class-target = " gcc g++ binutils"
22 17
23# Otherwise we'll depend on what we provide 18# Otherwise we'll depend on what we provide
@@ -64,7 +59,7 @@ do_rust_setup_snapshot () {
64 # are used internally by rust and result in symbol mismatches if we don't 59 # are used internally by rust and result in symbol mismatches if we don't
65 if [ ! -z "${UNINATIVE_LOADER}" -a -e "${UNINATIVE_LOADER}" ]; then 60 if [ ! -z "${UNINATIVE_LOADER}" -a -e "${UNINATIVE_LOADER}" ]; then
66 for bin in cargo rustc rustdoc; do 61 for bin in cargo rustc rustdoc; do
67 patchelf-uninative ${WORKDIR}/rust-snapshot/bin/$bin --set-interpreter ${UNINATIVE_LOADER} 62 patchelf ${WORKDIR}/rust-snapshot/bin/$bin --set-interpreter ${UNINATIVE_LOADER}
68 done 63 done
69 fi 64 fi
70} 65}
@@ -72,6 +67,7 @@ addtask rust_setup_snapshot after do_unpack before do_configure
72addtask do_test_compile after do_configure do_rust_gen_targets 67addtask do_test_compile after do_configure do_rust_gen_targets
73do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot" 68do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot"
74do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER" 69do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER"
70do_rust_setup_snapshot[depends] += "patchelf-native:do_populate_sysroot"
75 71
76RUSTC_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/rustc" 72RUSTC_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/rustc"
77CARGO_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/cargo" 73CARGO_BOOTSTRAP = "${STAGING_BINDIR_NATIVE}/cargo"
@@ -207,9 +203,9 @@ rust_runx () {
207 mkdir -p `dirname ${RUST_ALTERNATE_EXE_PATH}` 203 mkdir -p `dirname ${RUST_ALTERNATE_EXE_PATH}`
208 cp ${RUST_ALTERNATE_EXE_PATH_NATIVE} ${RUST_ALTERNATE_EXE_PATH} 204 cp ${RUST_ALTERNATE_EXE_PATH_NATIVE} ${RUST_ALTERNATE_EXE_PATH}
209 if [ -e ${STAGING_LIBDIR_NATIVE}/libc++.so.1 ]; then 205 if [ -e ${STAGING_LIBDIR_NATIVE}/libc++.so.1 ]; then
210 chrpath -r \$ORIGIN/../../../../../`basename ${STAGING_DIR_NATIVE}`${libdir_native} ${RUST_ALTERNATE_EXE_PATH} 206 patchelf --set-rpath \$ORIGIN/../../../../../`basename ${STAGING_DIR_NATIVE}`${libdir_native} ${RUST_ALTERNATE_EXE_PATH}
211 else 207 else
212 chrpath -d ${RUST_ALTERNATE_EXE_PATH} 208 patchelf --remove-rpath ${RUST_ALTERNATE_EXE_PATH}
213 fi 209 fi
214 fi 210 fi
215 211
@@ -266,7 +262,7 @@ rust_do_install:class-nativesdk() {
266 install -d ${D}${bindir} 262 install -d ${D}${bindir}
267 for i in cargo-clippy clippy-driver rustfmt; do 263 for i in cargo-clippy clippy-driver rustfmt; do
268 cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} 264 cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir}
269 chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i 265 patchelf --set-rpath "\$ORIGIN/../lib" ${D}${bindir}/$i
270 done 266 done
271 267
272 chown root:root ${D}/ -R 268 chown root:root ${D}/ -R
@@ -301,7 +297,7 @@ rust_do_install:class-target() {
301 install -d ${D}${bindir} 297 install -d ${D}${bindir}
302 for i in ${EXTRA_TOOLS}; do 298 for i in ${EXTRA_TOOLS}; do
303 cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir} 299 cp build/${RUST_BUILD_SYS}/stage2-tools/${RUST_HOST_SYS}/release/$i ${D}${bindir}
304 chrpath -r "\$ORIGIN/../lib" ${D}${bindir}/$i 300 patchelf --set-rpath "\$ORIGIN/../lib" ${D}${bindir}/$i
305 done 301 done
306 302
307 install -d ${D}${libdir}/rustlib/${RUST_HOST_SYS} 303 install -d ${D}${libdir}/rustlib/${RUST_HOST_SYS}
diff --git a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
index 1e65616081..449a75ebf8 100644
--- a/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
+++ b/meta/recipes-devtools/syslinux/syslinux_6.04-pre2.bb
@@ -130,3 +130,8 @@ FILES:${PN}-staticdev += "${datadir}/${BPN}/com32/lib*.a ${libdir}/${BPN}/com32/
130FILES:${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*" 130FILES:${PN}-misc = "${datadir}/${BPN}/* ${libdir}/${BPN}/* ${bindir}/*"
131 131
132BBCLASSEXTEND = "native nativesdk" 132BBCLASSEXTEND = "native nativesdk"
133
134# com32/lib/../include/stdarg.h:9:15: fatal error: 'stdarg.h' file not found
135# 9 | #include_next <stdarg.h>
136# | ^~~~~~~~~~
137TOOLCHAIN = "gcc"
diff --git a/meta/recipes-devtools/valgrind/valgrind/0001-Use-portable-syntax-for-pushsection-directive-in-inl.patch b/meta/recipes-devtools/valgrind/valgrind/0001-Use-portable-syntax-for-pushsection-directive-in-inl.patch
new file mode 100644
index 0000000000..b59c544223
--- /dev/null
+++ b/meta/recipes-devtools/valgrind/valgrind/0001-Use-portable-syntax-for-pushsection-directive-in-inl.patch
@@ -0,0 +1,31 @@
1From 2089383a0e3a50f527337ea05188b3e302069888 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 14 May 2025 09:29:33 -0700
4Subject: [PATCH] Use portable syntax for pushsection directive in inline
5 assembly
6
7'@' does not work with clang inline assembler, but '%' works with both
8gcc and clang. Therefore use '%' to make it more portable
9
10Fixes
11<inline asm>:1:41: error: expected '%<type>' or "<type>"
12
13Upstream-Status: Submitted [https://bugs.kde.org/show_bug.cgi?id=504222]
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 coregrind/vg_preloaded.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/coregrind/vg_preloaded.c b/coregrind/vg_preloaded.c
20index 5bec51d..e4c2dbc 100644
21--- a/coregrind/vg_preloaded.c
22+++ b/coregrind/vg_preloaded.c
23@@ -55,7 +55,7 @@
24 /* Note: The "MS" section flags are to remove duplicates. */
25 #define DEFINE_GDB_PY_SCRIPT(script_name) \
26 asm("\
27-.pushsection \".debug_gdb_scripts\", \"MS\",@progbits,1\n\
28+.pushsection \".debug_gdb_scripts\", \"MS\",%progbits,1\n\
29 .byte 1 /* Python */\n\
30 .asciz \"" script_name "\"\n\
31 .popsection \n\
diff --git a/meta/recipes-devtools/valgrind/valgrind_3.25.0.bb b/meta/recipes-devtools/valgrind/valgrind_3.25.1.bb
index 67166a4ef0..a8b0be5767 100644
--- a/meta/recipes-devtools/valgrind/valgrind_3.25.0.bb
+++ b/meta/recipes-devtools/valgrind/valgrind_3.25.1.bb
@@ -25,8 +25,9 @@ SRC_URI = "https://sourceware.org/pub/valgrind/valgrind-${PV}.tar.bz2 \
25 file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \ 25 file://0001-memcheck-tests-Fix-timerfd-syscall-test.patch \
26 file://0001-docs-Disable-manual-validation.patch \ 26 file://0001-docs-Disable-manual-validation.patch \
27 file://0001-tests-arm-Use-O-instead-of-O0.patch \ 27 file://0001-tests-arm-Use-O-instead-of-O0.patch \
28 file://0001-Use-portable-syntax-for-pushsection-directive-in-inl.patch \
28 " 29 "
29SRC_URI[sha256sum] = "295f60291d6b64c0d90c1ce645634bdc5361d39b0c50ecf9de6385ee77586ecc" 30SRC_URI[sha256sum] = "61deb8d0727b45c268efdc1b3b6c9e679cd97cbf5ee4b28d1dead7c8b7a271af"
30UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar" 31UPSTREAM_CHECK_REGEX = "valgrind-(?P<pver>\d+(\.\d+)+)\.tar"
31 32
32COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64|riscv64).*-linux' 33COMPATIBLE_HOST = '(i.86|x86_64|arm|aarch64|mips|powerpc|powerpc64|riscv64).*-linux'
@@ -105,3 +106,11 @@ INHIBIT_PACKAGE_STRIP_FILES = "${PKGD}${libexecdir}/valgrind/vgpreload_memcheck-
105# valgrind needs debug information for ld.so at runtime in order to 106# valgrind needs debug information for ld.so at runtime in order to
106# redirect functions like strlen. 107# redirect functions like strlen.
107RRECOMMENDS:${PN} += "${TCLIBC}-dbg" 108RRECOMMENDS:${PN} += "${TCLIBC}-dbg"
109
110# Valgrind needs intrinsics which are not provided by clang
111# m_signals.c:2213:7: error: __builtin_longjmp is not supported for the current target
112# 2213 | VG_MINIMAL_LONGJMP(tst->sched_jmpbuf);
113# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
114#
115# It needs something like - https://bugs.kde.org/show_bug.cgi?id=369723
116TOOLCHAIN:riscv64 = "gcc"
diff --git a/meta/recipes-extended/iputils/iputils/CVE-2025-47268.patch b/meta/recipes-extended/iputils/iputils/CVE-2025-47268.patch
new file mode 100644
index 0000000000..dd31b79031
--- /dev/null
+++ b/meta/recipes-extended/iputils/iputils/CVE-2025-47268.patch
@@ -0,0 +1,143 @@
1From 070cfacd7348386173231fb16fad4983d4e6ae40 Mon Sep 17 00:00:00 2001
2From: Petr Vorel <pvorel@suse.cz>
3Date: Mon, 5 May 2025 23:55:57 +0200
4Subject: [PATCH] ping: Fix signed 64-bit integer overflow in RTT calculation
5
6Crafted ICMP Echo Reply packet can cause signed integer overflow in
7
81) triptime calculation:
9triptime = tv->tv_sec * 1000000 + tv->tv_usec;
10
112) tsum2 increment which uses triptime
12rts->tsum2 += (double)((long long)triptime * (long long)triptime);
13
143) final tmvar:
15tmvar = (rts->tsum2 / total) - (tmavg * tmavg)
16
17 $ export CFLAGS="-O1 -g -fsanitize=address,undefined -fno-omit-frame-pointer"
18 $ export LDFLAGS="-fsanitize=address,undefined -fno-omit-frame-pointer"
19 $ meson setup .. -Db_sanitize=address,undefined
20 $ ninja
21 $ ./ping/ping -c2 127.0.0.1
22
23 PING 127.0.0.1 (127.0.0.1) 56(84) bytes of data.
24 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.061 ms
25 ../ping/ping_common.c:757:25: runtime error: signed integer overflow: -2513732689199106 * 1000000 cannot be represented in type 'long int'
26 ../ping/ping_common.c:757:12: runtime error: signed integer overflow: -4975495174606980224 + -6510615555425289427 cannot be represented in type 'long int'
27 ../ping/ping_common.c:769:47: runtime error: signed integer overflow: 6960633343677281965 * 6960633343677281965 cannot be represented in type 'long int'
28 24 bytes from 127.0.0.1: icmp_seq=1 ttl=64 (truncated)
29 ./ping/ping: Warning: time of day goes back (-7256972569576721377us), taking countermeasures
30 ./ping/ping: Warning: time of day goes back (-7256972569576721232us), taking countermeasures
31 24 bytes from 127.0.0.1: icmp_seq=1 ttl=64 (truncated)
32 ../ping/ping_common.c:265:16: runtime error: signed integer overflow: 6960633343677281965 * 2 cannot be represented in type 'long int'
33 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.565 ms
34
35 --- 127.0.0.1 ping statistics ---
36 2 packets transmitted, 2 received, +2 duplicates, 0% packet loss, time 1002ms
37 ../ping/ping_common.c:940:42: runtime error: signed integer overflow: 1740158335919320832 * 1740158335919320832 cannot be represented in type 'long int'
38 rtt min/avg/max/mdev = 0.000/1740158335919320.832/6960633343677281.965/-1623514645242292.-224 ms
39
40To fix the overflow check allowed ranges of struct timeval members:
41* tv_sec <0, LONG_MAX/1000000>
42* tv_usec <0, 999999>
43
44Fix includes 2 new error messages (needs translation).
45Also existing message "time of day goes back ..." needed to be modified
46as it now prints tv->tv_sec which is a second (needs translation update).
47
48After fix:
49
50 $ ./ping/ping -c2 127.0.0.1
51 64 bytes from 127.0.0.1: icmp_seq=1 ttl=64 time=0.057 ms
52 ./ping/ping: Warning: invalid tv_usec -6510615555424928611 us
53 ./ping/ping: Warning: time of day goes back (-3985394643238914 s), taking countermeasures
54 ./ping/ping: Warning: invalid tv_usec -6510615555424928461 us
55 ./ping/ping: Warning: time of day goes back (-3985394643238914 s), taking countermeasures
56 24 bytes from 127.0.0.1: icmp_seq=1 ttl=64 (truncated)
57 ./ping/ping: Warning: invalid tv_usec -6510615555425884541 us
58 ./ping/ping: Warning: time of day goes back (-4243165695442945 s), taking countermeasures
59 24 bytes from 127.0.0.1: icmp_seq=1 ttl=64 (truncated)
60 64 bytes from 127.0.0.1: icmp_seq=2 ttl=64 time=0.111 ms
61
62 --- 127.0.0.1 ping statistics ---
63 2 packets transmitted, 2 received, +2 duplicates, 0% packet loss, time 101ms
64 rtt min/avg/max/mdev = 0.000/0.042/0.111/0.046 ms
65
66Fixes: https://github.com/iputils/iputils/issues/584
67Fixes: CVE-2025-472
68Link: https://github.com/Zephkek/ping-rtt-overflow/
69Co-developed-by: Cyril Hrubis <chrubis@suse.cz>
70Reported-by: Mohamed Maatallah <hotelsmaatallahrecemail@gmail.com>
71Reviewed-by: Mohamed Maatallah <hotelsmaatallahrecemail@gmail.com>
72Reviewed-by: Cyril Hrubis <chrubis@suse.cz>
73Reviewed-by: Noah Meyerhans <noahm@debian.org>
74Signed-off-by: Petr Vorel <pvorel@suse.cz>
75
76CVE: CVE-2025-47268
77
78Upstream-Status: Backport
79[https://github.com/iputils/iputils/commit/070cfacd7348386173231fb16fad4983d4e6ae40]
80
81Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
82---
83 iputils_common.h | 3 +++
84 ping/ping_common.c | 22 +++++++++++++++++++---
85 2 files changed, 22 insertions(+), 3 deletions(-)
86
87diff --git a/iputils_common.h b/iputils_common.h
88index 49e790d..829a749 100644
89--- a/iputils_common.h
90+++ b/iputils_common.h
91@@ -10,6 +10,9 @@
92 !!__builtin_types_compatible_p(__typeof__(arr), \
93 __typeof__(&arr[0]))])) * 0)
94
95+/* 1000001 = 1000000 tv_sec + 1 tv_usec */
96+#define TV_SEC_MAX_VAL (LONG_MAX/1000001)
97+
98 #ifdef __GNUC__
99 # define iputils_attribute_format(t, n, m) __attribute__((__format__ (t, n, m)))
100 #else
101diff --git a/ping/ping_common.c b/ping/ping_common.c
102index dadd2a4..4e99d89 100644
103--- a/ping/ping_common.c
104+++ b/ping/ping_common.c
105@@ -754,16 +754,32 @@ int gather_statistics(struct ping_rts *rts, uint8_t *icmph, int icmplen,
106
107 restamp:
108 tvsub(tv, &tmp_tv);
109- triptime = tv->tv_sec * 1000000 + tv->tv_usec;
110- if (triptime < 0) {
111- error(0, 0, _("Warning: time of day goes back (%ldus), taking countermeasures"), triptime);
112+
113+ if (tv->tv_usec >= 1000000) {
114+ error(0, 0, _("Warning: invalid tv_usec %ld us"), tv->tv_usec);
115+ tv->tv_usec = 999999;
116+ }
117+
118+ if (tv->tv_usec < 0) {
119+ error(0, 0, _("Warning: invalid tv_usec %ld us"), tv->tv_usec);
120+ tv->tv_usec = 0;
121+ }
122+
123+ if (tv->tv_sec > TV_SEC_MAX_VAL) {
124+ error(0, 0, _("Warning: invalid tv_sec %ld s"), tv->tv_sec);
125+ triptime = 0;
126+ } else if (tv->tv_sec < 0) {
127+ error(0, 0, _("Warning: time of day goes back (%ld s), taking countermeasures"), tv->tv_sec);
128 triptime = 0;
129 if (!rts->opt_latency) {
130 gettimeofday(tv, NULL);
131 rts->opt_latency = 1;
132 goto restamp;
133 }
134+ } else {
135+ triptime = tv->tv_sec * 1000000 + tv->tv_usec;
136 }
137+
138 if (!csfailed) {
139 rts->tsum += triptime;
140 rts->tsum2 += (double)((long long)triptime * (long long)triptime);
141--
1422.34.1
143
diff --git a/meta/recipes-extended/iputils/iputils_20240905.bb b/meta/recipes-extended/iputils/iputils_20240905.bb
index ca8ddc530d..64d58a91c2 100644
--- a/meta/recipes-extended/iputils/iputils_20240905.bb
+++ b/meta/recipes-extended/iputils/iputils_20240905.bb
@@ -10,7 +10,9 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=627cc07ec86a45951d43e30658bbd819"
10 10
11DEPENDS = "gnutls" 11DEPENDS = "gnutls"
12 12
13SRC_URI = "git://github.com/iputils/iputils;branch=master;protocol=https" 13SRC_URI = "git://github.com/iputils/iputils;branch=master;protocol=https \
14 file://CVE-2025-47268.patch \
15 "
14SRCREV = "10b50784aae3fb75c96cdf9b1668916b49557dd5" 16SRCREV = "10b50784aae3fb75c96cdf9b1668916b49557dd5"
15 17
16S = "${WORKDIR}/git" 18S = "${WORKDIR}/git"
diff --git a/meta/recipes-extended/less/less_668.bb b/meta/recipes-extended/less/less_678.bb
index 63fc367e33..87ec6c92ca 100644
--- a/meta/recipes-extended/less/less_668.bb
+++ b/meta/recipes-extended/less/less_678.bb
@@ -21,7 +21,7 @@ SECTION = "console/utils"
21 21
22LICENSE = "GPL-3.0-or-later | BSD-2-Clause" 22LICENSE = "GPL-3.0-or-later | BSD-2-Clause"
23LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \ 23LIC_FILES_CHKSUM = "file://COPYING;md5=1ebbd3e34237af26da5dc08a4e440464 \
24 file://LICENSE;md5=ea7ea443692720f3015859945c0fb65d \ 24 file://LICENSE;md5=8051a271adb36d1462531a3b40c22878 \
25 " 25 "
26DEPENDS = "ncurses" 26DEPENDS = "ncurses"
27 27
@@ -29,7 +29,7 @@ SRC_URI = "http://www.greenwoodsoftware.com/${BPN}/${BPN}-${PV}.tar.gz \
29 file://run-ptest \ 29 file://run-ptest \
30 " 30 "
31 31
32SRC_URI[sha256sum] = "2819f55564d86d542abbecafd82ff61e819a3eec967faa36cd3e68f1596a44b8" 32SRC_URI[sha256sum] = "4c085364f3028290d34647df27f56018c365dc4c0092ab7de74ed8fe89014fe7"
33 33
34UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html" 34UPSTREAM_CHECK_URI = "http://www.greenwoodsoftware.com/less/download.html"
35 35
diff --git a/meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch b/meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch
new file mode 100644
index 0000000000..c6fae88eb9
--- /dev/null
+++ b/meta/recipes-extended/ltp/ltp/0001-cve-2015-3290-Disable-AVX-for-x86_64.patch
@@ -0,0 +1,42 @@
1From 28d823a63ee29f5d72c2aba781a06a7e2651cadc Mon Sep 17 00:00:00 2001
2From: Siddhesh Poyarekar <siddhesh@gotplt.org>
3Date: Mon, 7 Apr 2025 06:24:47 -0400
4Subject: [PATCH] cve-2015-3290: Disable AVX for x86_64
5
6When the input compiler enables AVX, stack realignment requirements
7causes gcc to fail to omit %rbp use, due to which the test fails to
8clobber %rbp in inline asm. Disable AVX to build the test on x86_64 so
9that the test continues working.
10
11Link: https://lore.kernel.org/ltp/20250407102448.2605506-2-siddhesh@gotplt.org/
12
13Upstream-Status: Backport [https://github.com/linux-test-project/ltp/commit/28d823a63ee29f5d72c2aba781a06a7e2651cadc]
14
15Reviewed-by: Martin Doucha <mdoucha@suse.cz>
16Reviewed-by: Petr Vorel <pvorel@suse.cz>
17Signed-off-by: Siddhesh Poyarekar <siddhesh@gotplt.org>
18
19---
20 testcases/cve/Makefile | 6 ++++++
21 1 file changed, 6 insertions(+)
22
23diff --git a/testcases/cve/Makefile b/testcases/cve/Makefile
24index 01b9b9ccb..98c38e908 100644
25--- a/testcases/cve/Makefile
26+++ b/testcases/cve/Makefile
27@@ -22,6 +22,12 @@ ifneq (,$(filter $(HOST_CPU),x86 x86_64))
28 meltdown: CFLAGS += -msse2
29 endif
30
31+# The test needs to clobber %rbp, which requires frame pointer omission. Also
32+# for x86_64, disable AVX since that could sometimes require a stack
33+# realignment, which gets in the way of frame pointer omission.
34 cve-2015-3290: CFLAGS += -pthread -fomit-frame-pointer
35+ifeq ($(HOST_CPU),x86_64)
36+cve-2015-3290: CFLAGS += -mno-avx
37+endif
38
39 include $(top_srcdir)/include/mk/generic_leaf_target.mk
40--
412.37.3
42
diff --git a/meta/recipes-extended/ltp/ltp_20250130.bb b/meta/recipes-extended/ltp/ltp_20250130.bb
index 690224e6d7..f9521acbc6 100644
--- a/meta/recipes-extended/ltp/ltp_20250130.bb
+++ b/meta/recipes-extended/ltp/ltp_20250130.bb
@@ -30,6 +30,7 @@ SRC_URI = "git://github.com/linux-test-project/ltp.git;branch=master;protocol=ht
30 file://0001-Remove-OOM-tests-from-runtest-mm.patch \ 30 file://0001-Remove-OOM-tests-from-runtest-mm.patch \
31 file://0001-Add-__clear_cache-declaration-for-clang.patch \ 31 file://0001-Add-__clear_cache-declaration-for-clang.patch \
32 file://0001-kernel-kvm-don-t-hardcode-objcopy.patch \ 32 file://0001-kernel-kvm-don-t-hardcode-objcopy.patch \
33 file://0001-cve-2015-3290-Disable-AVX-for-x86_64.patch \
33 " 34 "
34 35
35S = "${WORKDIR}/git" 36S = "${WORKDIR}/git"
diff --git a/meta/recipes-extended/man-pages/man-pages_6.13.bb b/meta/recipes-extended/man-pages/man-pages_6.14.bb
index a2e6a89843..92afff640d 100644
--- a/meta/recipes-extended/man-pages/man-pages_6.13.bb
+++ b/meta/recipes-extended/man-pages/man-pages_6.14.bb
@@ -20,7 +20,7 @@ LIC_FILES_CHKSUM = "file://README;md5=72cff06b7954222c24d38bc2c41b234e \
20SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/${BP}.tar.gz \ 20SRC_URI = "${KERNELORG_MIRROR}/linux/docs/${BPN}/${BP}.tar.gz \
21 " 21 "
22 22
23SRC_URI[sha256sum] = "869a682be64ee634149f62b4bcbd8334fd1e400883181618d7164a43de6a3aa1" 23SRC_URI[sha256sum] = "a298963d8baf37fa5ecd2b07c803e1f29ab0476add405a7e263e5c63baf43588"
24 24
25inherit manpages lib_package 25inherit manpages lib_package
26 26
diff --git a/meta/recipes-extended/zip/zip-3.0/0001-fileio.c-fix-a-buffer-overflow-detected-issue.patch b/meta/recipes-extended/zip/zip-3.0/0001-fileio.c-fix-a-buffer-overflow-detected-issue.patch
new file mode 100644
index 0000000000..d760dfcec5
--- /dev/null
+++ b/meta/recipes-extended/zip/zip-3.0/0001-fileio.c-fix-a-buffer-overflow-detected-issue.patch
@@ -0,0 +1,38 @@
1From 23b4ed82bff20c737fe2e95d5b035e92a9522ca2 Mon Sep 17 00:00:00 2001
2From: Ming Liu <liu.ming50@gmail.com>
3Date: Thu, 15 May 2025 13:58:45 +0200
4Subject: [PATCH] fileio.c: fix a buffer overflow detected issue
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Fix a following issue:
10| *** buffer overflow detected ***: terminated
11|
12| zip error: Interrupted (aborting)
13
14Reference: https://bugzilla.redhat.com/show_bug.cgi?id=2165653
15
16Upstream-Status: Inactive-Upstream [the fix is from Redhat but not the official project]
17
18Signed-off-by: Ming Liu <liu.ming50@gmail.com>
19---
20 fileio.c | 2 +-
21 1 file changed, 1 insertion(+), 1 deletion(-)
22
23diff --git a/fileio.c b/fileio.c
24index 1847e62..5a2959d 100644
25--- a/fileio.c
26+++ b/fileio.c
27@@ -3502,7 +3502,7 @@ zwchar *local_to_wide_string(local_string)
28 if ((wc_string = (wchar_t *)malloc((wsize + 1) * sizeof(wchar_t))) == NULL) {
29 ZIPERR(ZE_MEM, "local_to_wide_string");
30 }
31- wsize = mbstowcs(wc_string, local_string, strlen(local_string) + 1);
32+ wsize = mbstowcs(wc_string, local_string, wsize + 1);
33 wc_string[wsize] = (wchar_t) 0;
34
35 /* in case wchar_t is not zwchar */
36--
372.43.0
38
diff --git a/meta/recipes-extended/zip/zip_3.0.bb b/meta/recipes-extended/zip/zip_3.0.bb
index b573669f2f..27691bd89a 100644
--- a/meta/recipes-extended/zip/zip_3.0.bb
+++ b/meta/recipes-extended/zip/zip_3.0.bb
@@ -19,6 +19,7 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/infozip/Zip%203.x%20%28latest%29/3.0/zip30.tar.
19 file://0001-configure-Specify-correct-function-signatures-and-de.patch \ 19 file://0001-configure-Specify-correct-function-signatures-and-de.patch \
20 file://0001-unix-configure-use-_Static_assert-to-do-correct-dete.patch \ 20 file://0001-unix-configure-use-_Static_assert-to-do-correct-dete.patch \
21 file://0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch \ 21 file://0001-configure-Include-dirent.h-for-closedir-opendir-APIs.patch \
22 file://0001-fileio.c-fix-a-buffer-overflow-detected-issue.patch \
22 " 23 "
23UPSTREAM_VERSION_UNKNOWN = "1" 24UPSTREAM_VERSION_UNKNOWN = "1"
24 25
diff --git a/meta/recipes-graphics/mesa/files/0001-clover-Don-t-include-libclc-headers.patch b/meta/recipes-graphics/mesa/files/0001-clover-Don-t-include-libclc-headers.patch
deleted file mode 100644
index 0f9a01d823..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-clover-Don-t-include-libclc-headers.patch
+++ /dev/null
@@ -1,143 +0,0 @@
1From e94da9ccbc099468df752227716880efef66411b Mon Sep 17 00:00:00 2001
2From: Nikita Popov <npopov@redhat.com>
3Date: Thu, 27 Feb 2025 15:44:27 +0100
4Subject: [PATCH] clover: Don't include libclc headers
5
6Per https://github.com/llvm/llvm-project/issues/119967 these
7headers are internal implementation details of libclc and were
8never supposed to be installed. They are not available anymore
9since LLVM 20. Instead opencl-c.h should be used.
10
11There already ise a code path for including opencl-c.h, so always
12use it.
13
14This didn't work for me out of the box, because the build system
15currently hardcodes the clang resource directory, which is incorrect
16for Fedora at least. Fix this by using GetResourcePath +
17CLANG_RESOURCE_DIR provided by clang instead. This is basically
18the same as what is done in clc_helper.c
19
20I've still retained the old behavior as a fallback just in case
21(e.g. if clang is linked statically?)
22
23Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33805/]
24Reviewed-by: Karol Herbst <kherbst@redhat.com>
25Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33805>
26Signed-off-by: Khem Raj <raj.khem@gmail.com>
27---
28 .../frontends/clover/llvm/invocation.cpp | 53 +++++++++++++------
29 src/gallium/frontends/clover/meson.build | 5 +-
30 2 files changed, 39 insertions(+), 19 deletions(-)
31
32diff --git a/src/gallium/frontends/clover/llvm/invocation.cpp b/src/gallium/frontends/clover/llvm/invocation.cpp
33index 3cbb05b..ca030b4 100644
34--- a/src/gallium/frontends/clover/llvm/invocation.cpp
35+++ b/src/gallium/frontends/clover/llvm/invocation.cpp
36@@ -24,6 +24,8 @@
37 // OTHER DEALINGS IN THE SOFTWARE.
38 //
39
40+#include <dlfcn.h>
41+
42 #include <llvm/IR/DiagnosticPrinter.h>
43 #include <llvm/IR/DiagnosticInfo.h>
44 #include <llvm/IR/LLVMContext.h>
45@@ -39,6 +41,8 @@
46 #include <clang/Frontend/TextDiagnosticBuffer.h>
47 #include <clang/Frontend/TextDiagnosticPrinter.h>
48 #include <clang/Basic/TargetInfo.h>
49+#include <clang/Config/config.h>
50+#include <clang/Driver/Driver.h>
51
52 #if LLVM_VERSION_MAJOR >= 20
53 #include <llvm/Support/VirtualFileSystem.h>
54@@ -323,6 +327,30 @@ namespace {
55 return c;
56 }
57
58+ std::string getResourceDirectory() {
59+ Dl_info info;
60+ if (dladdr((void *)clang::CompilerInvocation::CreateFromArgs, &info) == 0) {
61+ return FALLBACK_CLANG_RESOURCE_DIR;
62+ }
63+
64+ char *libclang_path = realpath(info.dli_fname, NULL);
65+ if (libclang_path == nullptr) {
66+ return FALLBACK_CLANG_RESOURCE_DIR;
67+ }
68+
69+ // GetResourcePath is a way to retrieve the actual libclang resource dir based on a given
70+ // binary or library.
71+ std::string clang_resource_dir =
72+#if LLVM_VERSION_MAJOR >= 20
73+ clang::driver::Driver::GetResourcesPath(std::string(libclang_path));
74+#else
75+ clang::driver::Driver::GetResourcesPath(std::string(libclang_path), CLANG_RESOURCE_DIR);
76+#endif
77+ free(libclang_path);
78+
79+ return clang_resource_dir;
80+ }
81+
82 std::unique_ptr<Module>
83 compile(LLVMContext &ctx, clang::CompilerInstance &c,
84 const std::string &name, const std::string &source,
85@@ -331,25 +359,18 @@ namespace {
86 c.getFrontendOpts().ProgramAction = clang::frontend::EmitLLVMOnly;
87 c.getHeaderSearchOpts().UseBuiltinIncludes = true;
88 c.getHeaderSearchOpts().UseStandardSystemIncludes = true;
89- c.getHeaderSearchOpts().ResourceDir = CLANG_RESOURCE_DIR;
90
91- if (use_libclc) {
92- // Add libclc generic search path
93- c.getHeaderSearchOpts().AddPath(LIBCLC_INCLUDEDIR,
94- clang::frontend::Angled,
95- false, false);
96+ std::string clang_resource_dir = getResourceDirectory();
97+ c.getHeaderSearchOpts().ResourceDir = clang_resource_dir;
98
99- // Add libclc include
100- c.getPreprocessorOpts().Includes.push_back("clc/clc.h");
101- } else {
102- // Add opencl-c generic search path
103- c.getHeaderSearchOpts().AddPath(CLANG_RESOURCE_DIR,
104- clang::frontend::Angled,
105- false, false);
106+ // Add opencl-c generic search path
107+ std::string clang_include_path = clang_resource_dir + "/include";
108+ c.getHeaderSearchOpts().AddPath(clang_include_path,
109+ clang::frontend::Angled,
110+ false, false);
111
112- // Add opencl include
113- c.getPreprocessorOpts().Includes.push_back("opencl-c.h");
114- }
115+ // Add opencl include
116+ c.getPreprocessorOpts().Includes.push_back("opencl-c.h");
117
118 // Add definition for the OpenCL version
119 const auto dev_version = dev.device_version();
120diff --git a/src/gallium/frontends/clover/meson.build b/src/gallium/frontends/clover/meson.build
121index e569b86..56a9894 100644
122--- a/src/gallium/frontends/clover/meson.build
123+++ b/src/gallium/frontends/clover/meson.build
124@@ -10,7 +10,6 @@ clover_opencl_cpp_args = [
125 '-DCL_USE_DEPRECATED_OPENCL_2_0_APIS',
126 '-DCL_USE_DEPRECATED_OPENCL_2_1_APIS',
127 '-DCL_USE_DEPRECATED_OPENCL_2_2_APIS',
128- '-DLIBCLC_INCLUDEDIR="@0@/"'.format(dep_clc.get_variable(pkgconfig : 'includedir')),
129 '-DLIBCLC_LIBEXECDIR="@0@/"'.format(dep_clc.get_variable(pkgconfig : 'libexecdir'))
130 ]
131 clover_incs = [inc_include, inc_src, inc_gallium, inc_gallium_aux]
132@@ -43,9 +42,9 @@ libclllvm = static_library(
133 cpp_args : [
134 clover_cpp_args,
135 clover_opencl_cpp_args,
136- '-DCLANG_RESOURCE_DIR="@0@"'.format(join_paths(
137+ '-DFALLBACK_CLANG_RESOURCE_DIR="@0@"'.format(join_paths(
138 dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir'), 'clang',
139- dep_llvm.version(), 'include',
140+ dep_llvm.version()
141 )),
142 ],
143 gnu_symbol_visibility : 'hidden',
diff --git a/meta/recipes-graphics/mesa/files/0001-dont-build-clover-frontend.patch b/meta/recipes-graphics/mesa/files/0001-dont-build-clover-frontend.patch
new file mode 100644
index 0000000000..5f45f94fea
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-dont-build-clover-frontend.patch
@@ -0,0 +1,29 @@
1From: Markus Volk <f_l_k@t-online.de>
2Date: Sun, 19 Mai 2025 15:34:46 +0100
3Subject: [PATCH] dont build clover frontend
4
5The clover frontend is deprecated and is always built with opencl, even if
6using rusticl. Additionally it adds a reproducibility issue.
7
8Upstream-Status: Inappropriate [oe-specific]
9Signed-off-by: Markus Volk <f_l_k@t-online.de>
10
11--- a/src/gallium/meson.build 2025-05-07 18:35:10.000000000 +0200
12+++ b/src/gallium/meson.build 2025-05-18 17:05:23.677694272 +0200
13@@ -195,15 +195,11 @@
14 else
15 driver_d3d12 = declare_dependency()
16 endif
17-if with_gallium_clover or with_tests
18+if with_tests
19 # At the moment, clover and gallium/tests are the only two consumers
20 # for pipe-loader
21 subdir('targets/pipe-loader')
22 endif
23-if with_gallium_clover
24- subdir('frontends/clover')
25- subdir('targets/opencl')
26-endif
27 if with_gallium_rusticl
28 subdir('frontends/rusticl')
29 subdir('targets/rusticl')
diff --git a/meta/recipes-graphics/mesa/files/0001-gallium-clover-Do-not-use-LLVM_LIBRARY_DIR-for-FALLB.patch b/meta/recipes-graphics/mesa/files/0001-gallium-clover-Do-not-use-LLVM_LIBRARY_DIR-for-FALLB.patch
deleted file mode 100644
index 8b2ce2f63b..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-gallium-clover-Do-not-use-LLVM_LIBRARY_DIR-for-FALLB.patch
+++ /dev/null
@@ -1,34 +0,0 @@
1From 5ea5c5d48e049d7b10b7ffb814e84e3ddef7fff9 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Fri, 25 Apr 2025 19:00:14 -0700
4Subject: [PATCH] gallium/clover: Do not use LLVM_LIBRARY_DIR for
5 FALLBACK_CLANG_RESOURCE_DIR
6
7This option -DFALLBACK_CLANG_RESOURCE_DIR is synthesized by meson from
8LLVM_LIBRARY_DIR which is resolved to absolute path under <recipe_sysroot>
9and its used in clover front-end as string in .c files, which encodes it
10into binary as string and shows up in yocto QA error.
11
12ERROR: mesa-2_25.0.2-r0 do_package_qa: QA Issue: File /usr/lib/libMesaOpenCL.so.1.0.0 in package libopencl-mesa contains reference to TMPDIR [buildpaths]
13ERROR: mesa-2_25.0.2-r0 do_package_qa: Fatal QA errors were found, failing task.
14ERROR: Logfile of failure stored in: /mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux/mesa/25.0.2/temp/log.do_package_qa.974870
15
16Upstream-Status: Inappropriate [OE-Specific]
17Signed-off-by: Khem Raj <raj.khem@gmail.com>
18---
19 src/gallium/frontends/clover/meson.build | 2 +-
20 1 file changed, 1 insertion(+), 1 deletion(-)
21
22diff --git a/src/gallium/frontends/clover/meson.build b/src/gallium/frontends/clover/meson.build
23index 56a9894..32c21d6 100644
24--- a/src/gallium/frontends/clover/meson.build
25+++ b/src/gallium/frontends/clover/meson.build
26@@ -43,7 +43,7 @@ libclllvm = static_library(
27 clover_cpp_args,
28 clover_opencl_cpp_args,
29 '-DFALLBACK_CLANG_RESOURCE_DIR="@0@"'.format(join_paths(
30- dep_llvm.get_variable(cmake : 'LLVM_LIBRARY_DIR', configtool: 'libdir'), 'clang',
31+ '/usr/lib/clang',
32 dep_llvm.version()
33 )),
34 ],
diff --git a/meta/recipes-graphics/mesa/files/0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch b/meta/recipes-graphics/mesa/files/0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch
deleted file mode 100644
index d65ba574d2..0000000000
--- a/meta/recipes-graphics/mesa/files/0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch
+++ /dev/null
@@ -1,57 +0,0 @@
1From f9b6175e7c446a82c568ff1a214885d707c95f49 Mon Sep 17 00:00:00 2001
2From: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
3Date: Wed, 16 Apr 2025 14:35:37 +0300
4Subject: [PATCH] mesa-clc: add an option to force inclusion of OpenCL headers
5
6Currently mesa-clc bundles OpenCL headers from Clang only if the static
7LLVM is used (which means Clang / LLVM are not present on the target
8system). In some cases (e.g. when building in OpenEmbedded environemnt)
9it is desirable to have shared LLVM library, but skip installing the
10whole Clang runtime just to compile shaders. Add an option that forces
11OpenCL headers to be bundled with the mesa-clc binary.
12
13Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
14Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34551]
15---
16 meson_options.txt | 10 ++++++++++
17 src/compiler/clc/meson.build | 3 ++-
18 2 files changed, 12 insertions(+), 1 deletion(-)
19
20diff --git a/meson_options.txt b/meson_options.txt
21index 18da31eff507..addd274ecef7 100644
22--- a/meson_options.txt
23+++ b/meson_options.txt
24@@ -797,6 +797,16 @@ option(
25 description : 'Install the mesa-clc compiler (if needed for cross builds).'
26 )
27
28+option(
29+ 'mesa-clc-bundle-headers',
30+ type : 'combo',
31+ value : 'auto',
32+ choices : [
33+ 'enabled', 'auto'
34+ ],
35+ description : 'Bundle the OpenCL headers into the mesa-clc binary (default to bundle if static LLVM is used). Note, it might require rebuilding mesa-clc if opencl-c.h or opencl-c-base.h are changed (e.g. on Clang upgrades).'
36+)
37+
38 option(
39 'precomp-compiler',
40 type : 'combo',
41diff --git a/src/compiler/clc/meson.build b/src/compiler/clc/meson.build
42index 263eba527191..9ff61440f0da 100644
43--- a/src/compiler/clc/meson.build
44+++ b/src/compiler/clc/meson.build
45@@ -11,7 +11,8 @@ _libmesaclc_c_args = []
46 _libmesaclc_cpp_args = ['-DLLVM_LIB_DIR="@0@"'.format(llvm_libdir)]
47 _libmesaclc_sources = []
48
49-if not _shared_llvm
50+if not _shared_llvm or \
51+ get_option('mesa-clc-bundle-headers') == 'enabled'
52 # LLVM 16 moved clang header path from using full version to only major version
53 if dep_llvm.version().version_compare('< 16')
54 # Prior to LLVM 16, this path used a full version
55--
562.47.2
57
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 288027bbb9..7c067420c1 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -17,13 +17,11 @@ PE = "2"
17SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \ 17SRC_URI = "https://archive.mesa3d.org/mesa-${PV}.tar.xz \
18 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \ 18 file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
19 file://0001-freedreno-don-t-encode-build-path-into-binaries.patch \ 19 file://0001-freedreno-don-t-encode-build-path-into-binaries.patch \
20 file://0001-mesa-clc-add-an-option-to-force-inclusion-of-OpenCL-.patch \ 20 file://0001-dont-build-clover-frontend.patch \
21 file://0001-clover-Don-t-include-libclc-headers.patch \
22 file://0001-gallium-clover-Do-not-use-LLVM_LIBRARY_DIR-for-FALLB.patch \
23" 21"
24 22
25SRC_URI[sha256sum] = "c0d245dea0aa4b49f74b3d474b16542e4a8799791cd33d676c69f650ad4378d0" 23SRC_URI[sha256sum] = "cf942a18b7b9e9b88524dcbf0b31fed3cde18e6d52b3375b0ab6587a14415bce"
26PV = "25.0.5" 24PV = "25.1.1"
27 25
28UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)" 26UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
29 27
@@ -35,15 +33,21 @@ do_install:append() {
35 if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)} && [ -f ${D}${includedir}/EGL/eglplatform.h ]; then 33 if ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'true', 'false', d)} && [ -f ${D}${includedir}/EGL/eglplatform.h ]; then
36 sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h 34 sed -i -e 's/^#elif defined(__unix__) && defined(EGL_NO_X11)$/#elif defined(__unix__) \&\& defined(EGL_NO_X11) || ${@bb.utils.contains('PACKAGECONFIG', 'x11', '0', '1', d)}/' ${D}${includedir}/EGL/eglplatform.h
37 fi 35 fi
36 # These are ICDs, apps are not supposed to link against them
37 if ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', 'true', 'false', d)} ; then
38 rm -f ${D}${libdir}/libEGL_mesa.so ${D}${libdir}/libGLX_mesa.so
39 fi
38} 40}
39 41
40DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native" 42DEPENDS = "expat makedepend-native flex-native bison-native libxml2-native zlib chrpath-replacement-native python3-mako-native gettext-native python3-pyyaml-native"
41EXTRANATIVEPATH += "chrpath-native" 43EXTRANATIVEPATH += "chrpath-native"
42PROVIDES = " \ 44GLPROVIDES = " \
43 ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \ 45 ${@bb.utils.contains('PACKAGECONFIG', 'opengl', 'virtual/libgl', '', d)} \
44 ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', 'virtual/libglx', '', d)} \
45 ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \ 46 ${@bb.utils.contains('PACKAGECONFIG', 'gles', 'virtual/libgles1 virtual/libgles2 virtual/libgles3', '', d)} \
46 ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \ 47 ${@bb.utils.contains('PACKAGECONFIG', 'egl', 'virtual/egl', '', d)} \
48"
49PROVIDES = " \
50 ${@bb.utils.contains('PACKAGECONFIG', 'glvnd', '', d.getVar('GLPROVIDES'), d)} \
47 ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \ 51 ${@bb.utils.contains('PACKAGECONFIG', 'gbm', 'virtual/libgbm', '', d)} \
48 virtual/mesa \ 52 virtual/mesa \
49 " 53 "
@@ -70,7 +74,6 @@ def check_buildtype(d):
70MESON_BUILDTYPE = "${@check_buildtype(d)}" 74MESON_BUILDTYPE = "${@check_buildtype(d)}"
71 75
72EXTRA_OEMESON = " \ 76EXTRA_OEMESON = " \
73 -Dshared-glapi=enabled \
74 -Dglx-read-only-text=true \ 77 -Dglx-read-only-text=true \
75 -Dplatforms='${@",".join("${PLATFORMS}".split())}' \ 78 -Dplatforms='${@",".join("${PLATFORMS}".split())}' \
76" 79"
@@ -104,11 +107,12 @@ PACKAGECONFIG[x11] = ",-Dglx=disabled,${X11_DEPS}"
104PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols" 107PACKAGECONFIG[wayland] = ",,wayland-native wayland libdrm wayland-protocols"
105 108
106VULKAN_DRIVERS_AMD = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',amd', '', d)}" 109VULKAN_DRIVERS_AMD = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',amd', '', d)}"
110VULKAN_DRIVERS_ASAHI = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc opencl', ',asahi', '', d)}"
107VULKAN_DRIVERS_INTEL = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc', ',intel', '', d)}" 111VULKAN_DRIVERS_INTEL = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc', ',intel', '', d)}"
108VULKAN_DRIVERS_SWRAST = ",swrast" 112VULKAN_DRIVERS_SWRAST = ",swrast"
109# Crashes on x32 113# Crashes on x32
110VULKAN_DRIVERS_SWRAST:x86-x32 = "" 114VULKAN_DRIVERS_SWRAST:x86-x32 = ""
111VULKAN_DRIVERS_LLVM = "${VULKAN_DRIVERS_SWRAST}${VULKAN_DRIVERS_AMD}${VULKAN_DRIVERS_INTEL}" 115VULKAN_DRIVERS_LLVM = "${VULKAN_DRIVERS_SWRAST}${VULKAN_DRIVERS_AMD}${VULKAN_DRIVERS_ASAHI}${VULKAN_DRIVERS_INTEL}"
112 116
113VULKAN_DRIVERS = "" 117VULKAN_DRIVERS = ""
114VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}" 118VULKAN_DRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'freedreno', ',freedreno', '', d)}"
@@ -147,11 +151,7 @@ PACKAGECONFIG[egl] = "-Degl=enabled, -Degl=disabled"
147 151
148# "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG! 152# "opencl" also requires libclc and gallium-llvm to be present in PKGCONFIG!
149# Be sure to enable them both for the target and for the native build. 153# Be sure to enable them both for the target and for the native build.
150PACKAGECONFIG[opencl] = " \ 154PACKAGECONFIG[opencl] = "-Dgallium-rusticl=true, -Dgallium-rusticl=false, bindgen-cli-native"
151 -Dgallium-opencl=icd -Dgallium-rusticl=true, \
152 -Dgallium-opencl=disabled -Dgallium-rusticl=false, \
153 bindgen-cli-native \
154"
155 155
156PACKAGECONFIG[broadcom] = "" 156PACKAGECONFIG[broadcom] = ""
157PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native" 157PACKAGECONFIG[etnaviv] = ",,python3-pycparser-native"
@@ -170,14 +170,14 @@ GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'vc4', ',vc4', ''
170GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}" 170GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'v3d', ',v3d', '', d)}"
171GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}" 171GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'zink', ',zink', '', d)}"
172 172
173# radeonsi requires LLVM 173GALLIUMDRIVERS_ASAHI = "${@bb.utils.contains('PACKAGECONFIG', 'asahi libclc opencl', ',asahi', '', d)}"
174GALLIUMDRIVERS_IRIS = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc', ',iris', '', d)}" 174GALLIUMDRIVERS_IRIS = "${@bb.utils.contains('PACKAGECONFIG', 'intel libclc', ',iris', '', d)}"
175GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',radeonsi', '', d)}" 175GALLIUMDRIVERS_RADEONSI = "${@bb.utils.contains('PACKAGECONFIG', 'amd', ',radeonsi', '', d)}"
176GALLIUMDRIVERS_LLVMPIPE = ",llvmpipe" 176GALLIUMDRIVERS_LLVMPIPE = ",llvmpipe"
177# llvmpipe crashes on x32 177# llvmpipe crashes on x32
178GALLIUMDRIVERS_LLVMPIPE:x86-x32 = "" 178GALLIUMDRIVERS_LLVMPIPE:x86-x32 = ""
179GALLIUMDRIVERS_SVGA = "${@bb.utils.contains('PACKAGECONFIG', 'svga', ',svga', '', d)}" 179GALLIUMDRIVERS_SVGA = "${@bb.utils.contains('PACKAGECONFIG', 'svga', ',svga', '', d)}"
180GALLIUMDRIVERS_LLVM = ",r300,nouveau${GALLIUMDRIVERS_LLVMPIPE}${GALLIUMDRIVERS_IRIS}${GALLIUMDRIVERS_RADEONSI}${GALLIUMDRIVERS_SVGA}" 180GALLIUMDRIVERS_LLVM = ",r300,nouveau${GALLIUMDRIVERS_LLVMPIPE}${GALLIUMDRIVERS_ASAHI}${GALLIUMDRIVERS_IRIS}${GALLIUMDRIVERS_RADEONSI}${GALLIUMDRIVERS_SVGA}"
181 181
182PACKAGECONFIG[amd] = "" 182PACKAGECONFIG[amd] = ""
183PACKAGECONFIG[svga] = "" 183PACKAGECONFIG[svga] = ""
@@ -203,6 +203,8 @@ PACKAGECONFIG[vdpau] = "-Dgallium-vdpau=enabled,-Dgallium-vdpau=disabled,libvdpa
203 203
204PACKAGECONFIG[imagination] = "-Dimagination-srv=true,-Dimagination-srv=false" 204PACKAGECONFIG[imagination] = "-Dimagination-srv=true,-Dimagination-srv=false"
205 205
206PACKAGECONFIG[asahi] = ""
207
206PACKAGECONFIG[intel] = "" 208PACKAGECONFIG[intel] = ""
207GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'intel', ',i915,crocus', '', d)}" 209GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'intel', ',i915,crocus', '', d)}"
208 210
@@ -217,8 +219,6 @@ GALLIUMDRIVERS:append = "${@bb.utils.contains('PACKAGECONFIG', 'tegra', ',tegra,
217 219
218PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false" 220PACKAGECONFIG[vulkan-beta] = "-Dvulkan-beta=true,-Dvulkan-beta=false"
219 221
220PACKAGECONFIG[osmesa] = "-Dosmesa=true,-Dosmesa=false"
221
222PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto" 222PACKAGECONFIG[perfetto] = "-Dperfetto=true,-Dperfetto=false,libperfetto"
223 223
224PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind" 224PACKAGECONFIG[unwind] = "-Dlibunwind=enabled,-Dlibunwind=disabled,libunwind"
@@ -237,22 +237,14 @@ CFLAGS:append:armv6 = " -DMISSING_64BIT_ATOMICS"
237# Remove the mesa dependency on mesa-dev, as mesa is empty 237# Remove the mesa dependency on mesa-dev, as mesa is empty
238DEV_PKG_DEPENDENCY = "" 238DEV_PKG_DEPENDENCY = ""
239 239
240# Khronos documentation says that include/GLES2/gl2ext.h can be used for
241# OpenGL ES 3 specification as well as for OpenGL ES 2.
242# There can be applications including GLES2/gl2ext.h instead of GLES3/gl3ext.h
243# meaning we should probably bring in GLES2/gl2ext.h if someone asks for
244# development package of libgles3.
245RDEPENDS:libgles3-mesa-dev += "libgles2-mesa-dev"
246
247# GLES2 and GLES3 implementations are packaged in a single library in libgles2-mesa. 240# GLES2 and GLES3 implementations are packaged in a single library in libgles2-mesa.
248# Add a dependency so the GLES3 dev package is associated with its implementation. 241# Add a dependency so the GLES3 dev package is associated with its implementation.
249RDEPENDS:libgles2-mesa += "libgles3-mesa" 242RPROVIDES:libgles2-mesa += "libgles3-mesa"
250ALLOW_EMPTY:libgles3-mesa = "1" 243RPROVIDES:libgles2-mesa-dev += "libgles3-mesa-dev"
251 244
252RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools spirv-llvm-translator', '', d)}" 245RDEPENDS:libopencl-mesa += "${@bb.utils.contains('PACKAGECONFIG', 'opencl', 'libclc spirv-tools spirv-llvm-translator', '', d)}"
253 246
254PACKAGES =+ "libegl-mesa libegl-mesa-dev \ 247PACKAGES =+ "libegl-mesa libegl-mesa-dev \
255 libosmesa libosmesa-dev \
256 libgallium \ 248 libgallium \
257 libgl-mesa libgl-mesa-dev \ 249 libgl-mesa libgl-mesa-dev \
258 libglx-mesa libglx-mesa-dev \ 250 libglx-mesa libglx-mesa-dev \
@@ -260,8 +252,7 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \
260 libgbm libgbm-dev \ 252 libgbm libgbm-dev \
261 libgles1-mesa libgles1-mesa-dev \ 253 libgles1-mesa libgles1-mesa-dev \
262 libgles2-mesa libgles2-mesa-dev \ 254 libgles2-mesa libgles2-mesa-dev \
263 libgles3-mesa libgles3-mesa-dev \ 255 libopencl-mesa \
264 libopencl-mesa libopencl-mesa-dev \
265 libxatracker libxatracker-dev \ 256 libxatracker libxatracker-dev \
266 mesa-megadriver mesa-vulkan-drivers \ 257 mesa-megadriver mesa-vulkan-drivers \
267 mesa-vdpau-drivers mesa-tools \ 258 mesa-vdpau-drivers mesa-tools \
@@ -278,36 +269,42 @@ do_install:append () {
278# RPROVIDEs/RCONFLICTs on the generic libgl name. 269# RPROVIDEs/RCONFLICTs on the generic libgl name.
279python __anonymous() { 270python __anonymous() {
280 pkgconfig = (d.getVar('PACKAGECONFIG') or "").split() 271 pkgconfig = (d.getVar('PACKAGECONFIG') or "").split()
272 mlprefix = d.getVar("MLPREFIX")
281 suffix = "" 273 suffix = ""
282 if "-native" in d.getVar("PN"): 274 if "-native" in d.getVar("PN"):
283 suffix = "-native" 275 suffix = "-native"
284 for p in (("egl", "libegl", "libegl1"),
285 ("opengl", "libgl", "libgl1"),
286 ("glvnd", "libglx",),
287 ("gles", "libgles1", "libglesv1-cm1"),
288 ("gles", "libgles2", "libglesv2-2"),
289 ("gles", "libgles3",),
290 ("opencl", "libopencl",)):
291 if not p[0] in pkgconfig:
292 continue
293 mlprefix = d.getVar("MLPREFIX")
294 fullp = mlprefix + p[1] + "-mesa" + suffix
295 mlprefix = d.getVar("MLPREFIX")
296 pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
297 d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
298 d.appendVar("RREPLACES:" + fullp, pkgs)
299 d.appendVar("RPROVIDES:" + fullp, pkgs)
300 d.appendVar("RCONFLICTS:" + fullp, pkgs)
301 276
277 for p in ("libegl", "libgl", "libglx", "libgles1", "libgles2", "libgles3", "libopencl"):
278 fullp = mlprefix + p + "-mesa" + suffix
302 d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}mesa-megadriver" + suffix) 279 d.appendVar("RRECOMMENDS:" + fullp, " ${MLPREFIX}mesa-megadriver" + suffix)
303 280
304 # For -dev, the first element is both the Debian and original name 281 d.setVar("DEBIAN_NOAUTONAME:%slibopencl-mesa%s" % (mlprefix, suffix), "1")
305 fullp = mlprefix + p[1] + "-mesa-dev" + suffix 282
306 pkgs = " " + mlprefix + p[1] + "-dev" + suffix 283 if 'glvnd' in pkgconfig:
307 d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1") 284 for p in ("libegl", "libglx"):
308 d.appendVar("RREPLACES:" + fullp, pkgs) 285 fullp = mlprefix + p + "-mesa" + suffix
309 d.appendVar("RPROVIDES:" + fullp, pkgs) 286 d.appendVar("RPROVIDES:" + fullp, '%s-icd' % p)
310 d.appendVar("RCONFLICTS:" + fullp, pkgs) 287 else:
288 for p in (("egl", "libegl", "libegl1"),
289 ("opengl", "libgl", "libgl1"),
290 ("gles", "libgles1", "libglesv1-cm1"),
291 ("gles", "libgles2", "libglesv2-2", "libgles3")):
292 if not p[0] in pkgconfig:
293 continue
294 fullp = mlprefix + p[1] + "-mesa" + suffix
295 pkgs = " " + " ".join(mlprefix + x + suffix for x in p[1:])
296 d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
297 d.appendVar("RREPLACES:" + fullp, pkgs)
298 d.appendVar("RPROVIDES:" + fullp, pkgs)
299 d.appendVar("RCONFLICTS:" + fullp, pkgs)
300
301 # For -dev, the first element is both the Debian and original name
302 fullp = mlprefix + p[1] + "-mesa-dev" + suffix
303 pkgs = " " + mlprefix + p[1] + "-dev" + suffix
304 d.setVar("DEBIAN_NOAUTONAME:" + fullp, "1")
305 d.appendVar("RREPLACES:" + fullp, pkgs)
306 d.appendVar("RPROVIDES:" + fullp, pkgs)
307 d.appendVar("RCONFLICTS:" + fullp, pkgs)
311} 308}
312 309
313python mesa_populate_packages() { 310python mesa_populate_packages() {
@@ -329,9 +326,6 @@ python mesa_populate_packages() {
329 d.appendVar("RPROVIDES:%s" % lib_name, pkg_name) 326 d.appendVar("RPROVIDES:%s" % lib_name, pkg_name)
330 d.appendVar("RCONFLICTS:%s" % lib_name, pkg_name) 327 d.appendVar("RCONFLICTS:%s" % lib_name, pkg_name)
331 d.appendVar("RREPLACES:%s" % lib_name, pkg_name) 328 d.appendVar("RREPLACES:%s" % lib_name, pkg_name)
332
333 pipe_drivers_root = os.path.join(d.getVar('libdir'), "gallium-pipe")
334 do_split_packages(d, pipe_drivers_root, r'^pipe_(.*)\.so$', 'mesa-driver-pipe-%s', 'Mesa %s pipe driver', extra_depends='')
335} 329}
336 330
337PACKAGESPLITFUNCS =+ "mesa_populate_packages" 331PACKAGESPLITFUNCS =+ "mesa_populate_packages"
@@ -349,22 +343,17 @@ FILES:libgles1-mesa = "${libdir}/libGLESv1*.so.*"
349FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*" 343FILES:libgles2-mesa = "${libdir}/libGLESv2.so.*"
350FILES:libgl-mesa = "${libdir}/libGL.so.*" 344FILES:libgl-mesa = "${libdir}/libGL.so.*"
351FILES:libglx-mesa = "${libdir}/libGLX*.so.*" 345FILES:libglx-mesa = "${libdir}/libGLX*.so.*"
352FILES:libopencl-mesa = "${libdir}/lib*OpenCL.so.* ${libdir}/gallium-pipe/*.so ${sysconfdir}/OpenCL/vendors/*.icd" 346FILES:libopencl-mesa = "${libdir}/lib*OpenCL.so* ${sysconfdir}/OpenCL/vendors/*.icd"
353FILES:libglapi = "${libdir}/libglapi.so.*" 347FILES:libglapi = "${libdir}/libglapi.so.*"
354FILES:libosmesa = "${libdir}/libOSMesa.so.*"
355FILES:libxatracker = "${libdir}/libxatracker.so.*" 348FILES:libxatracker = "${libdir}/libxatracker.so.*"
356 349
357FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/vulkan ${libdir}/vdpau/*.so" 350FILES:${PN}-dev = "${libdir}/pkgconfig/dri.pc ${includedir}/GL/internal/dri_interface.h ${includedir}/vulkan ${libdir}/vdpau/*.so"
358FILES:libegl-mesa-dev = "${libdir}/libEGL*.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc" 351FILES:libegl-mesa-dev = "${libdir}/libEGL*.* ${includedir}/EGL ${includedir}/KHR ${libdir}/pkgconfig/egl.pc"
359FILES:libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h" 352FILES:libgbm-dev = "${libdir}/libgbm.* ${libdir}/pkgconfig/gbm.pc ${includedir}/gbm.h ${includedir}/gbm_backend_abi.h"
360FILES:libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL ${libdir}/pkgconfig/gl.pc" 353FILES:libgl-mesa-dev = "${libdir}/libGL.* ${includedir}/GL/*.h ${libdir}/pkgconfig/gl.pc"
361FILES:libglx-mesa-dev = "${libdir}/libGLX*.*"
362FILES:libglapi-dev = "${libdir}/libglapi.*" 354FILES:libglapi-dev = "${libdir}/libglapi.*"
363FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc" 355FILES:libgles1-mesa-dev = "${libdir}/libGLESv1*.* ${includedir}/GLES ${libdir}/pkgconfig/glesv1*.pc"
364FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${libdir}/pkgconfig/glesv2.pc" 356FILES:libgles2-mesa-dev = "${libdir}/libGLESv2.* ${includedir}/GLES2 ${includedir}/GLES3 ${libdir}/pkgconfig/glesv2.pc"
365FILES:libgles3-mesa-dev = "${includedir}/GLES3"
366FILES:libopencl-mesa-dev = "${libdir}/lib*OpenCL.so"
367FILES:libosmesa-dev = "${libdir}/libOSMesa.* ${includedir}/GL/osmesa.h ${libdir}/pkgconfig/osmesa.pc"
368FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \ 357FILES:libxatracker-dev = "${libdir}/libxatracker.so ${libdir}/libxatracker.la \
369 ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \ 358 ${includedir}/xa_tracker.h ${includedir}/xa_composite.h ${includedir}/xa_context.h \
370 ${libdir}/pkgconfig/xatracker.pc" 359 ${libdir}/pkgconfig/xatracker.pc"
@@ -375,6 +364,9 @@ ALLOW_EMPTY:${PN}-tools = "1"
375# All DRI drivers are symlinks to libdril_dri.so 364# All DRI drivers are symlinks to libdril_dri.so
376INSANE_SKIP:${PN}-megadriver += "dev-so" 365INSANE_SKIP:${PN}-megadriver += "dev-so"
377 366
367# OpenCL ICDs package also ship correspondig .so files, there is no -dev package
368INSANE_SKIP:libopencl-mesa += "dev-so"
369
378# Fix upgrade path from mesa to mesa-megadriver 370# Fix upgrade path from mesa to mesa-megadriver
379RREPLACES:mesa-megadriver = "mesa" 371RREPLACES:mesa-megadriver = "mesa"
380RCONFLICTS:mesa-megadriver = "mesa" 372RCONFLICTS:mesa-megadriver = "mesa"
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch
deleted file mode 100644
index b30b0e0017..0000000000
--- a/meta/recipes-graphics/vulkan/vulkan-samples/0001-framework-Include-stdint.h.patch
+++ /dev/null
@@ -1,26 +0,0 @@
1From 9a187d2f54d3683636b951a10c165d949b3a1d18 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sun, 23 Mar 2025 20:09:35 -0700
4Subject: [PATCH] framework: Include stdint.h
5
6Needed for uint32_t used in this header
7GCC 15 gets upset about it.
8
9Upstream-Status: Submitted [https://github.com/KhronosGroup/Vulkan-Samples/pull/1314]
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 framework/platform/configuration.h | 1 +
13 1 file changed, 1 insertion(+)
14
15diff --git a/framework/platform/configuration.h b/framework/platform/configuration.h
16index f6a9cae..c15f76f 100644
17--- a/framework/platform/configuration.h
18+++ b/framework/platform/configuration.h
19@@ -18,6 +18,7 @@
20 #pragma once
21
22 #include <algorithm>
23+#include <cstdint>
24 #include <map>
25 #include <memory>
26 #include <string>
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples/0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch b/meta/recipes-graphics/vulkan/vulkan-samples/0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch
deleted file mode 100644
index ffac2d78ce..0000000000
--- a/meta/recipes-graphics/vulkan/vulkan-samples/0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch
+++ /dev/null
@@ -1,30 +0,0 @@
1From da4ef211810bc3b0c51ea89f02c031a170fe0cb8 Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex@linutronix.de>
3Date: Tue, 1 Apr 2025 18:53:34 +0200
4Subject: [PATCH] bldsys/cmake/global_options.cmake: removed unused
5 ROOT_PATH_SIZE define
6
7After various refactorings it is no longer used anywhere (and
8is problematic for build reproducibility, as build path sizes can
9differ between build hosts).
10
11Upstream-Status: Submitted [https://github.com/KhronosGroup/Vulkan-Samples/pull/1325]
12Signed-off-by: Alexander Kanavin <alex@linutronix.de>
13---
14 bldsys/cmake/global_options.cmake | 3 ---
15 1 file changed, 3 deletions(-)
16
17diff --git a/bldsys/cmake/global_options.cmake b/bldsys/cmake/global_options.cmake
18index 96c7add..67a6c5e 100644
19--- a/bldsys/cmake/global_options.cmake
20+++ b/bldsys/cmake/global_options.cmake
21@@ -126,9 +126,6 @@ set(CMAKE_CXX_STANDARD 17)
22 set(CMAKE_DISABLE_SOURCE_CHANGES ON)
23 set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
24
25-string(LENGTH "${CMAKE_SOURCE_DIR}/" ROOT_PATH_SIZE)
26-add_definitions(-DROOT_PATH_SIZE=${ROOT_PATH_SIZE})
27-
28 set(CMAKE_C_FLAGS_DEBUG "-DDEBUG=0 ${CMAKE_C_FLAGS_DEBUG}")
29 set(CMAKE_CXX_FLAGS_DEBUG "-DDEBUG=0 ${CMAKE_CXX_FLAGS_DEBUG}")
30
diff --git a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
index 554e6eb290..22b5546631 100644
--- a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
+++ b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
@@ -7,12 +7,10 @@ LIC_FILES_CHKSUM = "file://LICENSE;md5=48aa35cefb768436223a6e7f18dc2a2a"
7 7
8SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=main;protocol=https;lfs=0 \ 8SRC_URI = "gitsm://github.com/KhronosGroup/Vulkan-Samples.git;branch=main;protocol=https;lfs=0 \
9 file://0001-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch;patchdir=third_party/glslang \ 9 file://0001-SPIRV-SpvBuilder.h-add-missing-cstdint-include.patch;patchdir=third_party/glslang \
10 file://0001-framework-Include-stdint.h.patch \
11 file://0003-bldsys-cmake-global_options.cmake-removed-unused-ROO.patch \
12 " 10 "
13 11
14UPSTREAM_CHECK_COMMITS = "1" 12UPSTREAM_CHECK_COMMITS = "1"
15SRCREV = "8547ce1022a19870d3e49075b5b08ca2d11c8773" 13SRCREV = "eca122602a5d7a9f63686411dcef1b62feb36a9a"
16 14
17UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for" 15UPSTREAM_CHECK_GITTAGREGEX = "These are not the releases you're looking for"
18S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"
diff --git a/meta/recipes-graphics/xorg-lib/libxcvt_0.1.3.bb b/meta/recipes-graphics/xorg-lib/libxcvt_0.1.3.bb
index 91537b0f4b..08194e4815 100644
--- a/meta/recipes-graphics/xorg-lib/libxcvt_0.1.3.bb
+++ b/meta/recipes-graphics/xorg-lib/libxcvt_0.1.3.bb
@@ -17,3 +17,5 @@ FILES:${PN} = " \
17 ${libdir}/libxcvt.so.0* \ 17 ${libdir}/libxcvt.so.0* \
18 ${bindir}/cvt \ 18 ${bindir}/cvt \
19" 19"
20
21BBCLASSEXTEND = "native"
diff --git a/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
index fbe860c6ea..7645f11c14 100644
--- a/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
+++ b/meta/recipes-graphics/xorg-xserver/xserver-xorg.inc
@@ -154,7 +154,3 @@ python add_xorg_abi_depends() {
154PACKAGEFUNCS =+ "add_xorg_abi_provides add_xorg_abi_depends" 154PACKAGEFUNCS =+ "add_xorg_abi_provides add_xorg_abi_depends"
155 155
156CVE_STATUS[CVE-2023-5574] = "${@bb.utils.contains('PACKAGECONFIG', 'xvfb', 'unpatched', 'not-applicable-config: specific to Xvfb', d)}" 156CVE_STATUS[CVE-2023-5574] = "${@bb.utils.contains('PACKAGECONFIG', 'xvfb', 'unpatched', 'not-applicable-config: specific to Xvfb', d)}"
157
158CVE_STATUS_GROUPS = "CVE_STATUS_REDHAT"
159CVE_STATUS_REDHAT = "CVE-2025-26594 CVE-2025-26595 CVE-2025-26596 CVE-2025-26597 CVE-2025-26598 CVE-2025-26599 CVE-2025-26600 CVE-2025-26601"
160CVE_STATUS_REDHAT[status] = "fixed-version: these are tracked as versionless redhat CVEs in NVD DB, fixed in 21.1.16"
diff --git a/meta/recipes-graphics/xwayland/xwayland_24.1.6.bb b/meta/recipes-graphics/xwayland/xwayland_24.1.6.bb
index 0774c1bbf5..350b8e93cc 100644
--- a/meta/recipes-graphics/xwayland/xwayland_24.1.6.bb
+++ b/meta/recipes-graphics/xwayland/xwayland_24.1.6.bb
@@ -48,7 +48,3 @@ do_install:append() {
48FILES:${PN} += "${libdir}/xorg/protocol.txt" 48FILES:${PN} += "${libdir}/xorg/protocol.txt"
49 49
50RDEPENDS:${PN} += "xkbcomp" 50RDEPENDS:${PN} += "xkbcomp"
51
52CVE_STATUS_GROUPS = "CVE_STATUS_REDHAT"
53CVE_STATUS_REDHAT = "CVE-2025-26594 CVE-2025-26595 CVE-2025-26596 CVE-2025-26597 CVE-2025-26598 CVE-2025-26599 CVE-2025-26600 CVE-2025-26601"
54CVE_STATUS_REDHAT[status] = "fixed-version: these are tracked as versionless redhat CVEs in NVD DB, fixed in 24.1.6"
diff --git a/meta/recipes-kernel/cryptodev/cryptodev-linux_1.14.bb b/meta/recipes-kernel/cryptodev/cryptodev-linux_1.14.bb
index d5ea9d8529..451a8d7ef8 100644
--- a/meta/recipes-kernel/cryptodev/cryptodev-linux_1.14.bb
+++ b/meta/recipes-kernel/cryptodev/cryptodev-linux_1.14.bb
@@ -4,9 +4,8 @@ SUMMARY = "A /dev/crypto device driver header file"
4 4
5do_compile[noexec] = "1" 5do_compile[noexec] = "1"
6 6
7# Just install cryptodev.h which is the only header file needed to be exported
8do_install() { 7do_install() {
9 install -D ${S}/crypto/cryptodev.h ${D}${includedir}/crypto/cryptodev.h 8 oe_runmake headers_install DESTDIR="${D}"
10} 9}
11 10
12ALLOW_EMPTY:${PN} = "1" 11ALLOW_EMPTY:${PN} = "1"
diff --git a/meta/recipes-kernel/kexec/kexec-tools/0001-ppc-fs2dt-Match-function-signatures.patch b/meta/recipes-kernel/kexec/kexec-tools/0001-ppc-fs2dt-Match-function-signatures.patch
new file mode 100644
index 0000000000..483e5195a9
--- /dev/null
+++ b/meta/recipes-kernel/kexec/kexec-tools/0001-ppc-fs2dt-Match-function-signatures.patch
@@ -0,0 +1,31 @@
1From 4a07e8f22b4f224dca79767e5cb86a0de91498dc Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 17 May 2025 07:48:50 -0700
4Subject: [PATCH] ppc/fs2dt: Match function signatures
5
6The prototypes of function pointers is analysed and
7compiler finds the signature mismatches and complain about it.
8
9../kexec-tools-2.0.31/kexec/arch/ppc/fs2dt.c:338:44: error: incompatible function pointer types passing 'int (const void *, const void *)' to parameter of type 'int (*)(const struct dirent **, const struct dirent **)' [-Wincompatible-function-pointer-types]
10 338 | numlist = scandir(pathname, &namelist, 0, comparefunc);
11 | ^~~~~~~~~~~
12
13Upstream-Status: Submitted [https://lore.kernel.org/kexec/20250517145852.2488183-1-raj.khem@gmail.com/T/#u]
14Signed-off-by: Khem Raj <raj.khem@gmail.com>
15---
16 kexec/arch/ppc/fs2dt.c | 2 +-
17 1 file changed, 1 insertion(+), 1 deletion(-)
18
19diff --git a/kexec/arch/ppc/fs2dt.c b/kexec/arch/ppc/fs2dt.c
20index fed499b..4952bfc 100644
21--- a/kexec/arch/ppc/fs2dt.c
22+++ b/kexec/arch/ppc/fs2dt.c
23@@ -292,7 +292,7 @@ static void putprops(char *fn, struct dirent **nlist, int numlist)
24 * Compare function used to sort the device-tree directories
25 * This function will be passed to scandir.
26 */
27-static int comparefunc(const void *dentry1, const void *dentry2)
28+static int comparefunc(const struct dirent ** dentry1, const struct dirent **dentry2)
29 {
30 char *str1 = (*(struct dirent **)dentry1)->d_name;
31 char *str2 = (*(struct dirent **)dentry2)->d_name;
diff --git a/meta/recipes-kernel/kexec/kexec-tools_2.0.31.bb b/meta/recipes-kernel/kexec/kexec-tools_2.0.31.bb
index d824859686..7333aa73c1 100644
--- a/meta/recipes-kernel/kexec/kexec-tools_2.0.31.bb
+++ b/meta/recipes-kernel/kexec/kexec-tools_2.0.31.bb
@@ -18,6 +18,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/utils/kernel/kexec/kexec-tools-${PV}.tar.gz
18 file://0005-Disable-PIE-during-link.patch \ 18 file://0005-Disable-PIE-during-link.patch \
19 file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \ 19 file://0001-arm64-kexec-disabled-check-if-kaslr-seed-dtb-propert.patch \
20 file://0001-kexec.c-add-MFD_NOEXEC_SEAL-flag-explicitly.patch \ 20 file://0001-kexec.c-add-MFD_NOEXEC_SEAL-flag-explicitly.patch \
21 file://0001-ppc-fs2dt-Match-function-signatures.patch \
21 " 22 "
22 23
23SRC_URI[sha256sum] = "ddaaa65b02b4f8aa9222586b1f26565b93a4baeffd35bcbd523f15fae7aa4897" 24SRC_URI[sha256sum] = "ddaaa65b02b4f8aa9222586b1f26565b93a4baeffd35bcbd523f15fae7aa4897"
@@ -27,6 +28,9 @@ inherit autotools update-rc.d systemd
27export LDFLAGS = "-L${STAGING_LIBDIR}" 28export LDFLAGS = "-L${STAGING_LIBDIR}"
28EXTRA_OECONF = " --with-zlib=yes" 29EXTRA_OECONF = " --with-zlib=yes"
29 30
31# purgatory uses -msoft-float for ppc32/ppc64, it does not go with -maltivec
32TUNE_CCARGS:remove:powerpc = "-maltivec"
33
30do_compile:prepend() { 34do_compile:prepend() {
31 # Remove the prepackaged config.h from the source tree as it overrides 35 # Remove the prepackaged config.h from the source tree as it overrides
32 # the same file generated by configure and placed in the build tree 36 # the same file generated by configure and placed in the build tree
diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_20250410.bb b/meta/recipes-kernel/linux-firmware/linux-firmware_20250509.bb
index e9491a74bd..3883f71781 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_20250410.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_20250509.bb
@@ -160,7 +160,7 @@ LIC_FILES_CHKSUM = "file://LICENCE.Abilis;md5=b5ee3f410780e56711ad48eadc22b8bc \
160 " 160 "
161# WHENCE checksum is defined separately to ease overriding it if 161# WHENCE checksum is defined separately to ease overriding it if
162# class-devupstream is selected. 162# class-devupstream is selected.
163WHENCE_CHKSUM = "7ddfb44c16e34dcd8bbacc4839ab78dc" 163WHENCE_CHKSUM = "d85e2f182f489a235400712cbfdb017a"
164 164
165# These are not common licenses, set NO_GENERIC_LICENSE for them 165# These are not common licenses, set NO_GENERIC_LICENSE for them
166# so that the license files will be copied from fetched source 166# so that the license files will be copied from fetched source
@@ -250,7 +250,7 @@ SRC_URI:class-devupstream = "git://git.kernel.org/pub/scm/linux/kernel/git/firmw
250# Pin this to the 20220509 release, override this in local.conf 250# Pin this to the 20220509 release, override this in local.conf
251SRCREV:class-devupstream ?= "b19cbdca78ab2adfd210c91be15a22568e8b8cae" 251SRCREV:class-devupstream ?= "b19cbdca78ab2adfd210c91be15a22568e8b8cae"
252 252
253SRC_URI[sha256sum] = "2ae6aab2d8930fd54bf30ae15498f1625721bc3630b894644db5d21fad5a20f9" 253SRC_URI[sha256sum] = "f2c60d66f226a28130cb5643e6e544d3229673460e127c91ba03f1080cbd703e"
254 254
255inherit allarch 255inherit allarch
256 256
@@ -487,7 +487,7 @@ PACKAGES =+ "${PN}-amphion-vpu-license ${PN}-amphion-vpu \
487 ${PN}-qcom-qrb4210-adreno \ 487 ${PN}-qcom-qrb4210-adreno \
488 ${PN}-qcom-qrb4210-audio ${PN}-qcom-qrb4210-compute ${PN}-qcom-qrb4210-modem \ 488 ${PN}-qcom-qrb4210-audio ${PN}-qcom-qrb4210-compute ${PN}-qcom-qrb4210-modem \
489 ${PN}-qcom-sa8775p-adreno ${PN}-qcom-sa8775p-audio ${PN}-qcom-sa8775p-compute \ 489 ${PN}-qcom-sa8775p-adreno ${PN}-qcom-sa8775p-audio ${PN}-qcom-sa8775p-compute \
490 ${PN}-qcom-sa8775p-generalpurpose \ 490 ${PN}-qcom-sa8775p-generalpurpose ${PN}-qcom-sa8775p-qupv3fw \
491 ${PN}-qcom-sc8280xp-lenovo-x13s-compat \ 491 ${PN}-qcom-sc8280xp-lenovo-x13s-compat \
492 ${PN}-qcom-sc8280xp-lenovo-x13s-audio \ 492 ${PN}-qcom-sc8280xp-lenovo-x13s-audio \
493 ${PN}-qcom-sc8280xp-lenovo-x13s-adreno \ 493 ${PN}-qcom-sc8280xp-lenovo-x13s-adreno \
@@ -1833,6 +1833,7 @@ LICENSE:${PN}-qcom-sa8775p-adreno = "Firmware-qcom"
1833LICENSE:${PN}-qcom-sa8775p-audio = "Firmware-qcom-2" 1833LICENSE:${PN}-qcom-sa8775p-audio = "Firmware-qcom-2"
1834LICENSE:${PN}-qcom-sa8775p-compute = "Firmware-qcom-2" 1834LICENSE:${PN}-qcom-sa8775p-compute = "Firmware-qcom-2"
1835LICENSE:${PN}-qcom-sa8775p-generalpurpose = "Firmware-qcom-2" 1835LICENSE:${PN}-qcom-sa8775p-generalpurpose = "Firmware-qcom-2"
1836LICENSE:${PN}-qcom-sa8775p-qupv3fw = "Firmware-qcom-2"
1836LICENSE:${PN}-qcom-sc8280xp-lenovo-x13s-audio = "Firmware-qcom & Firmware-linaro" 1837LICENSE:${PN}-qcom-sc8280xp-lenovo-x13s-audio = "Firmware-qcom & Firmware-linaro"
1837LICENSE:${PN}-qcom-sc8280xp-lenovo-x13s-adreno = "Firmware-qcom" 1838LICENSE:${PN}-qcom-sc8280xp-lenovo-x13s-adreno = "Firmware-qcom"
1838LICENSE:${PN}-qcom-sc8280xp-lenovo-x13s-compute = "Firmware-qcom" 1839LICENSE:${PN}-qcom-sc8280xp-lenovo-x13s-compute = "Firmware-qcom"
@@ -1915,6 +1916,7 @@ FILES:${PN}-qcom-sa8775p-adreno = "${nonarch_base_libdir}/firmware/qcom/sa8775p/
1915FILES:${PN}-qcom-sa8775p-audio = "${nonarch_base_libdir}/firmware/qcom/sa8775p/adsp*.*" 1916FILES:${PN}-qcom-sa8775p-audio = "${nonarch_base_libdir}/firmware/qcom/sa8775p/adsp*.*"
1916FILES:${PN}-qcom-sa8775p-compute = "${nonarch_base_libdir}/firmware/qcom/sa8775p/cdsp*.*" 1917FILES:${PN}-qcom-sa8775p-compute = "${nonarch_base_libdir}/firmware/qcom/sa8775p/cdsp*.*"
1917FILES:${PN}-qcom-sa8775p-generalpurpose = "${nonarch_base_libdir}/firmware/qcom/sa8775p/gpdsp*.*" 1918FILES:${PN}-qcom-sa8775p-generalpurpose = "${nonarch_base_libdir}/firmware/qcom/sa8775p/gpdsp*.*"
1919FILES:${PN}-qcom-sa8775p-qupv3fw = "${nonarch_base_libdir}/firmware/qcom/sa8775p/qupv3fw.elf*"
1918FILES:${PN}-qcom-sc8280xp-lenovo-x13s-compat = "${nonarch_base_libdir}/firmware/qcom/LENOVO/21BX" 1920FILES:${PN}-qcom-sc8280xp-lenovo-x13s-compat = "${nonarch_base_libdir}/firmware/qcom/LENOVO/21BX"
1919FILES:${PN}-qcom-sc8280xp-lenovo-x13s-audio = "${nonarch_base_libdir}/firmware/qcom/sc8280xp/LENOVO/21BX/*adsp*.* ${nonarch_base_libdir}/firmware/qcom/sc8280xp/LENOVO/21BX/battmgr.jsn* ${nonarch_base_libdir}/firmware/qcom/sc8280xp/LENOVO/21BX/audioreach-tplg.bin* ${nonarch_base_libdir}/firmware/qcom/sc8280xp/SC8280XP-LENOVO-X13S-tplg.bin*" 1921FILES:${PN}-qcom-sc8280xp-lenovo-x13s-audio = "${nonarch_base_libdir}/firmware/qcom/sc8280xp/LENOVO/21BX/*adsp*.* ${nonarch_base_libdir}/firmware/qcom/sc8280xp/LENOVO/21BX/battmgr.jsn* ${nonarch_base_libdir}/firmware/qcom/sc8280xp/LENOVO/21BX/audioreach-tplg.bin* ${nonarch_base_libdir}/firmware/qcom/sc8280xp/SC8280XP-LENOVO-X13S-tplg.bin*"
1920FILES:${PN}-qcom-sc8280xp-lenovo-x13s-adreno = "${nonarch_base_libdir}/firmware/qcom/sc8280xp/LENOVO/21BX/qcdxkmsuc8280.mbn*" 1922FILES:${PN}-qcom-sc8280xp-lenovo-x13s-adreno = "${nonarch_base_libdir}/firmware/qcom/sc8280xp/LENOVO/21BX/qcdxkmsuc8280.mbn*"
@@ -1997,6 +1999,7 @@ RDEPENDS:${PN}-qcom-sa8775p-adreno = "${PN}-qcom-license"
1997RDEPENDS:${PN}-qcom-sa8775p-audio = "${PN}-qcom-2-license" 1999RDEPENDS:${PN}-qcom-sa8775p-audio = "${PN}-qcom-2-license"
1998RDEPENDS:${PN}-qcom-sa8775p-compute = "${PN}-qcom-2-license" 2000RDEPENDS:${PN}-qcom-sa8775p-compute = "${PN}-qcom-2-license"
1999RDEPENDS:${PN}-qcom-sa8775p-generalpurpose = "${PN}-qcom-2-license" 2001RDEPENDS:${PN}-qcom-sa8775p-generalpurpose = "${PN}-qcom-2-license"
2002RDEPENDS:${PN}-qcom-sa8775p-qupv3fw = "${PN}-qcom-2-license"
2000RDEPENDS:${PN}-qcom-sc8280xp-lenovo-x13s-audio = "${PN}-qcom-license ${PN}-linaro-license" 2003RDEPENDS:${PN}-qcom-sc8280xp-lenovo-x13s-audio = "${PN}-qcom-license ${PN}-linaro-license"
2001RDEPENDS:${PN}-qcom-sc8280xp-lenovo-x13s-adreno = "${PN}-qcom-license" 2004RDEPENDS:${PN}-qcom-sc8280xp-lenovo-x13s-adreno = "${PN}-qcom-license"
2002RDEPENDS:${PN}-qcom-sc8280xp-lenovo-x13s-compute = "${PN}-qcom-license" 2005RDEPENDS:${PN}-qcom-sc8280xp-lenovo-x13s-compute = "${PN}-qcom-license"
diff --git a/meta/recipes-kernel/linux/cve-exclusion.inc b/meta/recipes-kernel/linux/cve-exclusion.inc
index f1b7db44b6..80c76433ef 100644
--- a/meta/recipes-kernel/linux/cve-exclusion.inc
+++ b/meta/recipes-kernel/linux/cve-exclusion.inc
@@ -133,6 +133,8 @@ CVE_STATUS[CVE-2023-1076] = "fixed-version: Fixed from version 6.3rc1"
133 133
134CVE_STATUS[CVE-2023-2898] = "fixed-version: Fixed from version 6.5rc1" 134CVE_STATUS[CVE-2023-2898] = "fixed-version: Fixed from version 6.5rc1"
135 135
136CVE_STATUS[CVE-2023-3079] = "not-applicable-config: Issue only affects chromium, which is not in linux-yocto"
137
136CVE_STATUS[CVE-2023-3772] = "fixed-version: Fixed from version 6.5rc7" 138CVE_STATUS[CVE-2023-3772] = "fixed-version: Fixed from version 6.5rc7"
137 139
138CVE_STATUS[CVE-2023-3773] = "fixed-version: Fixed from version 6.5rc7" 140CVE_STATUS[CVE-2023-3773] = "fixed-version: Fixed from version 6.5rc7"
diff --git a/meta/recipes-kernel/linux/kernel-devsrc.bb b/meta/recipes-kernel/linux/kernel-devsrc.bb
index 935e3f45dd..7ad848c35e 100644
--- a/meta/recipes-kernel/linux/kernel-devsrc.bb
+++ b/meta/recipes-kernel/linux/kernel-devsrc.bb
@@ -75,7 +75,8 @@ do_install() {
75 if [ -s Module.symvers ]; then 75 if [ -s Module.symvers ]; then
76 cp Module.symvers $kerneldir/build 76 cp Module.symvers $kerneldir/build
77 fi 77 fi
78 cp System.map* $kerneldir/build 78 cp System.map-* $kerneldir/build
79 ln -s System.map-* $kerneldir/build/System.map
79 if [ -s Module.markers ]; then 80 if [ -s Module.markers ]; then
80 cp Module.markers $kerneldir/build 81 cp Module.markers $kerneldir/build
81 fi 82 fi
diff --git a/meta/recipes-kernel/lttng/babeltrace2/0001-Make-bt_field_blob_get_length-return-size_t-instead-.patch b/meta/recipes-kernel/lttng/babeltrace2/0001-Make-bt_field_blob_get_length-return-size_t-instead-.patch
index d923437a2a..4dffa7bfa5 100644
--- a/meta/recipes-kernel/lttng/babeltrace2/0001-Make-bt_field_blob_get_length-return-size_t-instead-.patch
+++ b/meta/recipes-kernel/lttng/babeltrace2/0001-Make-bt_field_blob_get_length-return-size_t-instead-.patch
@@ -1,8 +1,8 @@
1From 1b514ab2e878216426acc493eeab96088576faf9 Mon Sep 17 00:00:00 2001 1From a73cef80a0d4129f74ab2e160a15693235aad4d1 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com> 2From: Khem Raj <raj.khem@gmail.com>
3Date: Thu, 20 Mar 2025 18:10:08 -0700 3Date: Thu, 20 Mar 2025 18:10:08 -0700
4Subject: [PATCH] Make bt_field_blob_get_length return size_t instead of 4Subject: [PATCH] Cast result of bt_field_blob_get_length to size_t in
5 uint64_t 5 constructor of bt2s::span
6 6
7Fixes errors e.g. 7Fixes errors e.g.
8| ../../git/src/cpp-common/bt2/field.hpp:1139:82: error: non-constant-expression cannot be narrowed from type 'std::uint64_t' (aka 'unsigned long long') to 'size_type' (aka 'unsigned int') in initializer list [-Wc++11-narrowing] 8| ../../git/src/cpp-common/bt2/field.hpp:1139:82: error: non-constant-expression cannot be narrowed from type 'std::uint64_t' (aka 'unsigned long long') to 'size_type' (aka 'unsigned int') in initializer list [-Wc++11-narrowing]
@@ -16,22 +16,23 @@ Fixes errors e.g.
16| | ^~~~~~~~~~~~~~ 16| | ^~~~~~~~~~~~~~
17| | static_cast<size_type>( ) 17| | static_cast<size_type>( )
18 18
19Upstream-Status: Submitted [https://github.com/efficios/babeltrace/pull/120] 19Upstream-Status: Backport [https://github.com/efficios/babeltrace/commit/1e6b34e411c61135ad256047a985a9bad927eae0]
20
20Signed-off-by: Khem Raj <raj.khem@gmail.com> 21Signed-off-by: Khem Raj <raj.khem@gmail.com>
21--- 22---
22 src/cpp-common/bt2/field.hpp | 2 +- 23 src/cpp-common/bt2/field.hpp | 2 +-
23 1 file changed, 1 insertion(+), 1 deletion(-) 24 1 file changed, 1 insertion(+), 1 deletion(-)
24 25
25diff --git a/src/cpp-common/bt2/field.hpp b/src/cpp-common/bt2/field.hpp 26diff --git a/src/cpp-common/bt2/field.hpp b/src/cpp-common/bt2/field.hpp
26index 8b291f7a1..cbfff84f0 100644 27index 8b291f7a..3a7d30a4 100644
27--- a/src/cpp-common/bt2/field.hpp 28--- a/src/cpp-common/bt2/field.hpp
28+++ b/src/cpp-common/bt2/field.hpp 29+++ b/src/cpp-common/bt2/field.hpp
29@@ -1139,7 +1139,7 @@ public: 30@@ -1136,7 +1136,7 @@ public:
30 return {internal::CommonBlobFieldSpec<LibObjT>::data(this->libObjPtr()), this->length()};
31 }
32 31
33- std::uint64_t length() const noexcept 32 bt2s::span<typename internal::CommonBlobFieldSpec<LibObjT>::Data> data() const noexcept
34+ std::size_t length() const noexcept
35 { 33 {
36 return bt_field_blob_get_length(this->libObjPtr()); 34- return {internal::CommonBlobFieldSpec<LibObjT>::data(this->libObjPtr()), this->length()};
35+ return {internal::CommonBlobFieldSpec<LibObjT>::data(this->libObjPtr()), static_cast<std::size_t>(this->length())};
37 } 36 }
37
38 std::uint64_t length() const noexcept
diff --git a/meta/recipes-kernel/lttng/lttng-tools/0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch b/meta/recipes-kernel/lttng/lttng-tools/0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch
new file mode 100644
index 0000000000..7c2b893731
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-tools/0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch
@@ -0,0 +1,55 @@
1From 0b19e10a8a52fab0bfadbac5ce70f1b2d185a1d1 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 21 May 2025 13:09:25 +0800
4Subject: [PATCH] fix lttng-tools fails to compile with libxml2 2.14.0+
5
6Description:
7| In file included from /srv/pokybuild/yocto-worker/qemux86-alt/build/build/tmp/work/core2-32-poky-linux/lttng-tools/2.13.15/recipe-sysroot/usr/include/libxml2/libxml/parser.h:25,
8| from ../../../../lttng-tools-2.13.15/src/common/config/session-config.c:29:
9| /srv/pokybuild/yocto-worker/qemux86-alt/build/build/tmp/work/core2-32-poky-linux/lttng-tools/2.13.15/recipe-sysroot/usr/include/libxml2/libxml/encoding.h:173:7: note: declared here
10| 173 | } input XML_DEPRECATED_MEMBER;
11| | ^~~~~
12| ../../../../lttng-tools-2.13.15/src/common/config/session-config.c:432:15: error: called object is not a function or function pointer
13| 432 | ret = handler->input(out_str, &out_len, (const xmlChar *) in_str, &in_len);
14| | ^~~~~~~
15| At top level:
16| cc1: note: unrecognized command-line option '-Wno-incomplete-setjmp-declaration' may have been intended to silence earlier diagnostics
17
18
19According to [1][2], the UTF-8 handler is
20```
21static xmlCharEncError
22UTF8ToUTF8(void *vctxt ATTRIBUTE_UNUSED,
23 unsigned char* out, int *outlen,
24 const unsigned char* in, int *inlen,
25 int flush ATTRIBUTE_UNUSED)
26```
27
28Update input.func with setting ATTRIBUTE_UNUSED params with NULL and 0
29
30[1] https://gitlab.gnome.org/GNOME/libxml2/-/commit/38f475072aefe032fff1dc058df3e56c1e7062fa
31[2] https://gitlab.gnome.org/GNOME/libxml2/-/commit/69b83bb68e2a8ed0013f80c51b9a358714b00c9a#478024cc18a2cc8dbaed34076e9775f6827f413d_2188_2201
32
33Upstream-Status: Submitted [https://github.com/lttng/lttng-tools/pull/170]
34Signed-off-by: Marko, Peter <Peter.Marko@siemens.com>
35Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
36---
37 src/common/config/session-config.c | 2 +-
38 1 file changed, 1 insertion(+), 1 deletion(-)
39
40diff --git a/src/common/config/session-config.c b/src/common/config/session-config.c
41index bb4e9fe..4042d34 100644
42--- a/src/common/config/session-config.c
43+++ b/src/common/config/session-config.c
44@@ -429,7 +429,7 @@ static xmlChar *encode_string(const char *in_str)
45 goto end;
46 }
47
48- ret = handler->input(out_str, &out_len, (const xmlChar *) in_str, &in_len);
49+ ret = handler->input.func(NULL, out_str, &out_len, (const xmlChar *) in_str, &in_len, 0);
50 if (ret < 0) {
51 xmlFree(out_str);
52 out_str = NULL;
53--
542.34.1
55
diff --git a/meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb b/meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb
index 762d4e5c2f..f39404afa0 100644
--- a/meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb
+++ b/meta/recipes-kernel/lttng/lttng-tools_2.13.15.bb
@@ -39,6 +39,7 @@ SRC_URI = "https://lttng.org/files/lttng-tools/lttng-tools-${PV}.tar.bz2 \
39 file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \ 39 file://0001-compat-Define-off64_t-as-off_t-on-linux.patch \
40 file://0001-tests-add-check_skip_kernel_test-to-check-root-user-.patch \ 40 file://0001-tests-add-check_skip_kernel_test-to-check-root-user-.patch \
41 file://0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch \ 41 file://0001-Fix-rotation-destroy-flush-fix-session-daemon-abort-.patch \
42 file://0001-fix-lttng-tools-fails-to-compile-with-libxml2-2.14.0.patch \
42 " 43 "
43 44
44SRC_URI[sha256sum] = "96ea42351ee112c19dad9fdc7aae93b583d9f1722b2175664a381d2d337703c4" 45SRC_URI[sha256sum] = "96ea42351ee112c19dad9fdc7aae93b583d9f1722b2175664a381d2d337703c4"
diff --git a/meta/recipes-kernel/perf/perf.bb b/meta/recipes-kernel/perf/perf.bb
index d06dd2fa5a..0d19e1bdc2 100644
--- a/meta/recipes-kernel/perf/perf.bb
+++ b/meta/recipes-kernel/perf/perf.bb
@@ -81,6 +81,16 @@ LDFLAGS = "-ldl -lutil"
81# avoiding the 'buildpaths' QA warning. 81# avoiding the 'buildpaths' QA warning.
82TARGET_CC_ARCH += "${SELECTED_OPTIMIZATION} ${DEBUG_PREFIX_MAP}" 82TARGET_CC_ARCH += "${SELECTED_OPTIMIZATION} ${DEBUG_PREFIX_MAP}"
83 83
84#| libbpf.c: In function 'find_kernel_btf_id.constprop':
85#| libbpf.c:10009:33: error: 'mod_len' may be used uninitialized [-Werror=maybe-uninitialized]
86#| 10009 | if (mod_name && strncmp(mod->name, mod_name, mod_len) != 0)
87#| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
88#| libbpf.c:9979:21: note: 'mod_len' was declared here
89#| 9979 | int ret, i, mod_len;
90#| | ^~~~~~~
91#| cc1: all warnings being treated as errors
92TARGET_CC_ARCH:append:toolchain-clang:arm = " -fno-error=maybe-uninitialized"
93
84EXTRA_OEMAKE = '\ 94EXTRA_OEMAKE = '\
85 V=1 \ 95 V=1 \
86 VF=1 \ 96 VF=1 \
diff --git a/meta/recipes-kernel/systemtap/systemtap_git.bb b/meta/recipes-kernel/systemtap/systemtap_git.bb
index 7c9cbe0da0..21d50ffb04 100644
--- a/meta/recipes-kernel/systemtap/systemtap_git.bb
+++ b/meta/recipes-kernel/systemtap/systemtap_git.bb
@@ -36,9 +36,6 @@ PACKAGECONFIG[debuginfod] = "--with-debuginfod, --without-debuginfod"
36inherit autotools gettext pkgconfig systemd 36inherit autotools gettext pkgconfig systemd
37inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)} 37inherit_defer ${@bb.utils.contains('PACKAGECONFIG', 'python3-probes', 'setuptools3-base', '', d)}
38 38
39# | ../git/elaborate.cxx:2601:21: error: storing the address of local variable 'sym' in '*s.systemtap_session::symbol_resolver' [-Werror=dangling-pointer=]
40CXXFLAGS += "-Wno-dangling-pointer"
41
42# exporter comes with python3-probes 39# exporter comes with python3-probes
43PACKAGES =+ "${PN}-exporter" 40PACKAGES =+ "${PN}-exporter"
44FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \ 41FILES:${PN}-exporter = "${sysconfdir}/stap-exporter/* \
diff --git a/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch b/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
index ab93c13244..828c87dc9a 100644
--- a/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
+++ b/meta/recipes-multimedia/gstreamer/gst-examples/0001-Make-player-examples-installable.patch
@@ -13,25 +13,25 @@ https://bugzilla.gnome.org/show_bug.cgi?id=777827
13 playback/player/gtk/meson.build | 1 + 13 playback/player/gtk/meson.build | 1 +
14 2 files changed, 2 insertions(+) 14 2 files changed, 2 insertions(+)
15 15
16diff --git a/playback/player/gst-play/meson.build b/playback/player/gst-play/meson.build 16Index: gst-examples/playback/player/gst-play/meson.build
17index 8ec021d..977cc5c 100644 17===================================================================
18--- a/playback/player/gst-play/meson.build 18--- gst-examples.orig/playback/player/gst-play/meson.build
19+++ b/playback/player/gst-play/meson.build 19+++ gst-examples/playback/player/gst-play/meson.build
20@@ -2,5 +2,6 @@ executable('gst-play', 20@@ -2,5 +2,6 @@ executable('gst-play',
21 ['gst-play.c', 21 ['gst-play.c',
22 'gst-play-kb.c', 22 'gst-play-kb.c',
23 'gst-play-kb.h'], 23 'gst-play-kb.h'],
24+ install: true, 24+ install: true,
25 dependencies : [gst_dep, gstplayer_dep, m_dep]) 25 dependencies : [gst_dep, dependency('gstreamer-play-1.0'), m_dep])
26 26
27diff --git a/playback/player/gtk/meson.build b/playback/player/gtk/meson.build 27Index: gst-examples/playback/player/gtk/meson.build
28index f7a7419..6281130 100644 28===================================================================
29--- a/playback/player/gtk/meson.build 29--- gst-examples.orig/playback/player/gtk/meson.build
30+++ b/playback/player/gtk/meson.build 30+++ gst-examples/playback/player/gtk/meson.build
31@@ -13,5 +13,6 @@ if gtk_dep.found() 31@@ -20,5 +20,6 @@ if gtk_dep.found()
32 gtk_play_resources,
33 'gtk-video-renderer.h', 32 'gtk-video-renderer.h',
34 'gtk-video-renderer.c'], 33 'gtk-video-renderer.c'],
35+ install: true, 34 c_args : extra_c_args,
36 dependencies : [glib_dep, gobject_dep, gmodule_dep, gst_dep, gsttag_dep, gstplayer_dep, gtk_dep, x11_dep]) 35+ install: true,
36 dependencies : [gst_dep, gsttag_dep, gstplay_dep, gtk_dep, x11_dep])
37 endif 37 endif
diff --git a/meta/recipes-multimedia/gstreamer/gst-examples_1.18.6.bb b/meta/recipes-multimedia/gstreamer/gst-examples_1.26.1.bb
index 70b72fd7fb..59c7a4ade1 100644
--- a/meta/recipes-multimedia/gstreamer/gst-examples_1.18.6.bb
+++ b/meta/recipes-multimedia/gstreamer/gst-examples_1.26.1.bb
@@ -5,16 +5,16 @@ BUGTRACKER = "https://gitlab.freedesktop.org/gstreamer/gst-examples/-/issues"
5LICENSE = "LGPL-2.0-or-later" 5LICENSE = "LGPL-2.0-or-later"
6LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9" 6LIC_FILES_CHKSUM = "file://playback/player/gtk/gtk-play.c;beginline=1;endline=20;md5=f8c72dae3d36823ec716a9ebcae593b9"
7 7
8DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 libsoup-2.4 json-glib glib-2.0-native" 8DEPENDS = "glib-2.0 gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad gtk+3 json-glib glib-2.0-native"
9 9
10SRC_URI = "git://gitlab.freedesktop.org/gstreamer/gst-examples.git;protocol=https;branch=1.18 \ 10SRC_URI = "git://gitlab.freedesktop.org/gstreamer/gstreamer.git;protocol=https;branch=1.26 \
11 file://0001-Make-player-examples-installable.patch \ 11 file://0001-Make-player-examples-installable.patch \
12 file://gst-player.desktop \ 12 file://gst-player.desktop \
13 " 13 "
14 14
15SRCREV = "70e4fcf4fc8ae19641aa990de5f37d758cdfcea4" 15SRCREV = "7174e955ec066fb8d1fb683cc82713e0615826b6"
16 16
17S = "${WORKDIR}/git" 17S = "${WORKDIR}/git/subprojects/gst-examples"
18 18
19inherit meson pkgconfig features_check 19inherit meson pkgconfig features_check
20 20
diff --git a/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch b/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch
index d4fac605b6..36f47f9173 100644
--- a/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch
+++ b/meta/recipes-multimedia/libvorbis/libvorbis/0001-configure-Check-for-clang.patch
@@ -12,8 +12,6 @@ Signed-off-by: Khem Raj <raj.khem@gmail.com>
12 configure.ac | 19 +++++++++++++++++-- 12 configure.ac | 19 +++++++++++++++++--
13 1 file changed, 17 insertions(+), 2 deletions(-) 13 1 file changed, 17 insertions(+), 2 deletions(-)
14 14
15diff --git a/configure.ac b/configure.ac
16index 28b0a14..2d4e984 100644
17--- a/configure.ac 15--- a/configure.ac
18+++ b/configure.ac 16+++ b/configure.ac
19@@ -98,6 +98,16 @@ AC_ARG_ENABLE(examples, 17@@ -98,6 +98,16 @@ AC_ARG_ENABLE(examples,
@@ -51,6 +49,20 @@ index 28b0a14..2d4e984 100644
51 49
52 # glibc < 2.1.3 has a serious FP bug in the math inline header 50 # glibc < 2.1.3 has a serious FP bug in the math inline header
53 # that will cripple Vorbis. Look to see if the magic FP stack 51 # that will cripple Vorbis. Look to see if the magic FP stack
54-- 52@@ -178,12 +193,12 @@ else
552.17.0 53 fi;;
56 54 powerpc-*-linux*spe)
55 DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES"
56- CFLAGS="-O3 -Wall -Wextra -ffast-math -mfused-madd -D_REENTRANT"
57- PROFILE="-pg -g -O3 -ffast-math -mfused-madd -D_REENTRANT";;
58+ CFLAGS="-O3 -Wall -Wextra -ffast-math -D_REENTRANT"
59+ PROFILE="-pg -g -O3 -ffast-math -D_REENTRANT";;
60 powerpc-*-linux*)
61 DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES"
62- CFLAGS="-O3 -Wall -Wextra -ffast-math -mfused-madd -mcpu=750 -D_REENTRANT"
63- PROFILE="-pg -g -O3 -ffast-math -mfused-madd -mcpu=750 -D_REENTRANT";;
64+ CFLAGS="-O3 -Wall -Wextra -ffast-math -mcpu=750 -D_REENTRANT"
65+ PROFILE="-pg -g -O3 -ffast-math -mcpu=750 -D_REENTRANT";;
66 *-*-linux*)
67 DEBUG="-g -Wall -Wextra -D_REENTRANT -D__NO_MATH_INLINES -fsigned-char"
68 CFLAGS="-O3 -Wall -Wextra -ffast-math -D_REENTRANT -fsigned-char"
diff --git a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
index 18c12ede63..695f4b676d 100644
--- a/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
+++ b/meta/recipes-multimedia/pulseaudio/pulseaudio.inc
@@ -71,6 +71,14 @@ inherit bash-completion meson pkgconfig useradd gettext perlnative systemd manpa
71# if using --disable-nls 71# if using --disable-nls
72USE_NLS = "yes" 72USE_NLS = "yes"
73 73
74# Helps tests for -msse fail on non-SSE architectures which is all non-x86
75TUNE_CCARGS:append:toolchain-clang = " -Werror=unused-command-line-argument"
76
77# mix_neon.c:179:9: error: invalid operand in inline asm: 'vld1.s32 ${0:h}, [$2]
78# vld1.s32 ${1:h}, [$3] '
79TOOLCHAIN:armv7ve = "gcc"
80TOOLCHAIN:armv7a = "gcc"
81
74EXTRA_OEMESON = "\ 82EXTRA_OEMESON = "\
75 -Dhal-compat=false \ 83 -Dhal-compat=false \
76 -Dorc=disabled \ 84 -Dorc=disabled \
diff --git a/meta/recipes-multimedia/sbc/sbc_2.1.bb b/meta/recipes-multimedia/sbc/sbc_2.1.bb
index 5aaa52313f..8b91e7e65b 100644
--- a/meta/recipes-multimedia/sbc/sbc_2.1.bb
+++ b/meta/recipes-multimedia/sbc/sbc_2.1.bb
@@ -19,5 +19,7 @@ SRC_URI[sha256sum] = "426633cabd7c798236443516dfa8335b47e004b0ef37ff107e0c7ead32
19 19
20inherit autotools pkgconfig 20inherit autotools pkgconfig
21 21
22CFLAGS += "-std=gnu17"
23
22PACKAGES =+ "${PN}-examples" 24PACKAGES =+ "${PN}-examples"
23FILES:${PN}-examples += "${bindir}/*" 25FILES:${PN}-examples += "${bindir}/*"
diff --git a/meta/recipes-sato/webkit/webkitgtk_2.48.1.bb b/meta/recipes-sato/webkit/webkitgtk_2.48.1.bb
index 5b9846a6d6..a58b44440e 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.48.1.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.48.1.bb
@@ -176,3 +176,5 @@ src_package_preprocess () {
176 ${B}/WebKitGTK/DerivedSources/webkit/*.cpp 176 ${B}/WebKitGTK/DerivedSources/webkit/*.cpp
177} 177}
178 178
179# Clang-20 issue - https://github.com/llvm/llvm-project/issues/132322
180TOOLCHAIN:arm = "gcc"
diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc
index ee490cee0a..64a57ddfb2 100644
--- a/meta/recipes-support/boost/boost.inc
+++ b/meta/recipes-support/boost/boost.inc
@@ -32,6 +32,7 @@ BOOST_LIBS = "\
32 json \ 32 json \
33 log \ 33 log \
34 math \ 34 math \
35 process \
35 program_options \ 36 program_options \
36 random \ 37 random \
37 regex \ 38 regex \
diff --git a/meta/recipes-support/ca-certificates/ca-certificates_20250419.bb b/meta/recipes-support/ca-certificates/ca-certificates_20250419.bb
index f06a30bd6d..01f594095e 100644
--- a/meta/recipes-support/ca-certificates/ca-certificates_20250419.bb
+++ b/meta/recipes-support/ca-certificates/ca-certificates_20250419.bb
@@ -60,7 +60,8 @@ do_install:append:class-target () {
60} 60}
61 61
62pkg_postinst:${PN}:class-target () { 62pkg_postinst:${PN}:class-target () {
63 $D${sbindir}/update-ca-certificates --sysroot $D 63 [ -n "$D" ] && sysroot_args="--sysroot $D"
64 $D${sbindir}/update-ca-certificates $sysroot_args
64} 65}
65 66
66CONFFILES:${PN} += "${sysconfdir}/ca-certificates.conf" 67CONFFILES:${PN} += "${sysconfdir}/ca-certificates.conf"
diff --git a/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch b/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch
index f2d11b2983..2cec20b4b1 100644
--- a/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch
+++ b/meta/recipes-support/libcap/files/0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch
@@ -1,4 +1,4 @@
1From 1343e4ee17bb3f72e6b244706cacbeb16463c5d7 Mon Sep 17 00:00:00 2001 1From 969d21aa2bf474d9c5c80a64de1a9fe0e17e31b2 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Thu, 14 Oct 2021 15:57:36 +0800 3Date: Thu, 14 Oct 2021 15:57:36 +0800
4Subject: [PATCH] nativesdk-libcap: Raise the size of arrays containing dl 4Subject: [PATCH] nativesdk-libcap: Raise the size of arrays containing dl
@@ -19,12 +19,12 @@ Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
19 1 file changed, 1 insertion(+), 1 deletion(-) 19 1 file changed, 1 insertion(+), 1 deletion(-)
20 20
21diff --git a/libcap/execable.h b/libcap/execable.h 21diff --git a/libcap/execable.h b/libcap/execable.h
22index 89e61a3..22518dd 100644 22index a68ea24..60d3853 100644
23--- a/libcap/execable.h 23--- a/libcap/execable.h
24+++ b/libcap/execable.h 24+++ b/libcap/execable.h
25@@ -23,7 +23,7 @@ 25@@ -34,7 +34,7 @@ extern const int _IO_stdin_used;
26 #endif 26 const int _IO_stdin_used __attribute__((weak)) = 131073;
27 #define __EXECABLE_H 27 #endif /* def __GLIBC__ */
28 28
29-const char __execable_dl_loader[] __attribute((section(".interp"))) = 29-const char __execable_dl_loader[] __attribute((section(".interp"))) =
30+const char __execable_dl_loader[4096] __attribute((section(".interp"))) = 30+const char __execable_dl_loader[4096] __attribute((section(".interp"))) =
diff --git a/meta/recipes-support/libcap/libcap_2.75.bb b/meta/recipes-support/libcap/libcap_2.76.bb
index 8530f13295..c842246fc0 100644
--- a/meta/recipes-support/libcap/libcap_2.75.bb
+++ b/meta/recipes-support/libcap/libcap_2.76.bb
@@ -16,7 +16,7 @@ SRC_URI = "${KERNELORG_MIRROR}/linux/libs/security/linux-privs/${BPN}2/${BPN}-${
16SRC_URI:append:class-nativesdk = " \ 16SRC_URI:append:class-nativesdk = " \
17 file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \ 17 file://0001-nativesdk-libcap-Raise-the-size-of-arrays-containing.patch \
18 " 18 "
19SRC_URI[sha256sum] = "de4e7e064c9ba451d5234dd46e897d7c71c96a9ebf9a0c445bc04f4742d83632" 19SRC_URI[sha256sum] = "629da4ab29900d0f7fcc36227073743119925fd711c99a1689bbf5c9b40c8e6f"
20 20
21UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/" 21UPSTREAM_CHECK_URI = "https://www.kernel.org/pub/linux/libs/security/linux-privs/${BPN}2/"
22 22
diff --git a/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch b/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch
index 9615611f6e..7b840644d4 100644
--- a/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch
+++ b/meta/recipes-support/libgcrypt/files/0001-libgcrypt-fix-m4-file-for-oe-core.patch
@@ -1,4 +1,4 @@
1From bcfd89abdb5110b93314297120412d4c7f2da313 Mon Sep 17 00:00:00 2001 1From fcb53181b18c00083a8b08625db74829cfd6b4b2 Mon Sep 17 00:00:00 2001
2From: Trevor Gamblin <trevor.gamblin@windriver.com> 2From: Trevor Gamblin <trevor.gamblin@windriver.com>
3Date: Tue, 29 Oct 2019 14:08:32 -0400 3Date: Tue, 29 Oct 2019 14:08:32 -0400
4Subject: [PATCH] libgcrypt: fix m4 file for oe-core 4Subject: [PATCH] libgcrypt: fix m4 file for oe-core
@@ -11,13 +11,12 @@ settings.
11Upstream-Status: Inappropriate [oe-specific] 11Upstream-Status: Inappropriate [oe-specific]
12 12
13Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com> 13Signed-off-by: Trevor Gamblin <trevor.gamblin@windriver.com>
14
15--- 14---
16 src/libgcrypt.m4 | 90 +++--------------------------------------------- 15 src/libgcrypt.m4 | 90 +++---------------------------------------------
17 1 file changed, 4 insertions(+), 86 deletions(-) 16 1 file changed, 4 insertions(+), 86 deletions(-)
18 17
19diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4 18diff --git a/src/libgcrypt.m4 b/src/libgcrypt.m4
20index 353df81b6d..b195e22894 100644 19index 353df81..b195e22 100644
21--- a/src/libgcrypt.m4 20--- a/src/libgcrypt.m4
22+++ b/src/libgcrypt.m4 21+++ b/src/libgcrypt.m4
23@@ -116,41 +116,6 @@ dnl 22@@ -116,41 +116,6 @@ dnl
@@ -144,6 +143,3 @@ index 353df81b6d..b195e22894 100644
144 ifelse([$3], , :, [$3]) 143 ifelse([$3], , :, [$3])
145 fi 144 fi
146 AC_SUBST(LIBGCRYPT_CFLAGS) 145 AC_SUBST(LIBGCRYPT_CFLAGS)
147--
1482.34.1
149
diff --git a/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch b/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
deleted file mode 100644
index 78b02eda9d..0000000000
--- a/meta/recipes-support/libgcrypt/files/0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch
+++ /dev/null
@@ -1,49 +0,0 @@
1From e96df0c82e086bf348753d2d0fa37fa6191b4b14 Mon Sep 17 00:00:00 2001
2From: "simit.ghane" <simit.ghane@lge.com>
3Date: Tue, 11 Jun 2024 07:22:28 +0530
4Subject: [PATCH] random:cipher: handle substitution in sed command
5
6Upstream-Status: Backport [https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=e96df0c82e086bf348753d2d0fa37fa6191b4b14]
7
8* cipher/Makefile.am (o_flag_munging): Add 'g' flag for first sed
9expression.
10* random/Makefile.am (o_flag_munging): Likewise.
11--
12
13It was there earlier and accidentally removed from
14Makefile.am of cipher and random
15
16Signed-off-by: simit.ghane <simit.ghane@lge.com>
17[jk: add changelog to commit message]
18Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
19---
20 cipher/Makefile.am | 2 +-
21 random/Makefile.am | 2 +-
22 2 files changed, 2 insertions(+), 2 deletions(-)
23
24diff --git a/cipher/Makefile.am b/cipher/Makefile.am
25index ea9014cc98..149c9f2101 100644
26--- a/cipher/Makefile.am
27+++ b/cipher/Makefile.am
28@@ -169,7 +169,7 @@ gost-s-box$(EXEEXT_FOR_BUILD): gost-s-box.c
29
30
31 if ENABLE_O_FLAG_MUNGING
32-o_flag_munging = sed -e 's/[[:blank:]]-O\([2-9sgz][2-9sgz]*\)/ -O1 /' -e 's/[[:blank:]]-Ofast/ -O1 /g'
33+o_flag_munging = sed -e 's/[[:blank:]]-O\([2-9sgz][2-9sgz]*\)/ -O1 /g' -e 's/[[:blank:]]-Ofast/ -O1 /g'
34 else
35 o_flag_munging = cat
36 endif
37diff --git a/random/Makefile.am b/random/Makefile.am
38index c7100ef8b8..a42e430649 100644
39--- a/random/Makefile.am
40+++ b/random/Makefile.am
41@@ -56,7 +56,7 @@ jitterentropy-base.c jitterentropy.h jitterentropy-base-user.h
42
43 # The rndjent module needs to be compiled without optimization. */
44 if ENABLE_O_FLAG_MUNGING
45-o_flag_munging = sed -e 's/[[:blank:]]-O\([1-9sgz][1-9sgz]*\)/ -O0 /' -e 's/[[:blank:]]-Ofast/ -O0 /g'
46+o_flag_munging = sed -e 's/[[:blank:]]-O\([1-9sgz][1-9sgz]*\)/ -O0 /g' -e 's/[[:blank:]]-Ofast/ -O0 /g'
47 else
48 o_flag_munging = cat
49 endif
diff --git a/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch b/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch
index 4233fa7877..ccf4e18910 100644
--- a/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch
+++ b/meta/recipes-support/libgcrypt/files/0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch
@@ -1,4 +1,4 @@
1From 9182bc2dc676858a823c477d8f45a578b8c4f69f Mon Sep 17 00:00:00 2001 1From c7a99e7a15f1f703ac90fc2a16b2c2115a66a996 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com> 2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Sun, 12 Jun 2016 04:44:29 -0400 3Date: Sun, 12 Jun 2016 04:44:29 -0400
4Subject: [PATCH] tests/Makefile.am: fix undefined reference to 4Subject: [PATCH] tests/Makefile.am: fix undefined reference to
@@ -9,16 +9,15 @@ Add missing '-lpthread' to CFLAGS
9Upstream-Status: Pending 9Upstream-Status: Pending
10 10
11Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> 11Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
12
13--- 12---
14 tests/Makefile.am | 4 ++-- 13 tests/Makefile.am | 4 ++--
15 1 file changed, 2 insertions(+), 2 deletions(-) 14 1 file changed, 2 insertions(+), 2 deletions(-)
16 15
17diff --git a/tests/Makefile.am b/tests/Makefile.am 16diff --git a/tests/Makefile.am b/tests/Makefile.am
18index e6953fd..f47e1d3 100644 17index 3170a58..9a9e1c2 100644
19--- a/tests/Makefile.am 18--- a/tests/Makefile.am
20+++ b/tests/Makefile.am 19+++ b/tests/Makefile.am
21@@ -76,7 +76,7 @@ t_mpi_bit_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@ 20@@ -93,7 +93,7 @@ t_mpi_bit_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@
22 t_secmem_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@ 21 t_secmem_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@
23 testapi_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@ 22 testapi_LDADD = $(standard_ldadd) @LDADD_FOR_TESTS_KLUDGE@
24 t_lock_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS) @LDADD_FOR_TESTS_KLUDGE@ 23 t_lock_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS) @LDADD_FOR_TESTS_KLUDGE@
@@ -27,7 +26,7 @@ index e6953fd..f47e1d3 100644
27 testdrv_LDADD = $(LDADD_FOR_TESTS_KLUDGE) 26 testdrv_LDADD = $(LDADD_FOR_TESTS_KLUDGE)
28 27
29 # Build a version of the test driver for the build platform. 28 # Build a version of the test driver for the build platform.
30@@ -95,7 +95,7 @@ else 29@@ -112,7 +112,7 @@ else
31 xtestsuite_libs = ../src/.libs/libgcrypt.so* 30 xtestsuite_libs = ../src/.libs/libgcrypt.so*
32 xtestsuite_driver = testdrv 31 xtestsuite_driver = testdrv
33 t_kdf_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS) @LDADD_FOR_TESTS_KLUDGE@ 32 t_kdf_LDADD = $(standard_ldadd) $(GPG_ERROR_MT_LIBS) @LDADD_FOR_TESTS_KLUDGE@
diff --git a/meta/recipes-support/libgcrypt/files/no-bench-slope.patch b/meta/recipes-support/libgcrypt/files/no-bench-slope.patch
index ed65ed4e67..44aac1913e 100644
--- a/meta/recipes-support/libgcrypt/files/no-bench-slope.patch
+++ b/meta/recipes-support/libgcrypt/files/no-bench-slope.patch
@@ -1,3 +1,8 @@
1From eb3a5bc4d5a212da64c0f9396c7f31f83aa6f36c Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@arm.com>
3Date: Fri, 9 Sep 2022 11:13:37 +0100
4Subject: [PATCH] libgcrypt: disable bench-slope test case
5
1The bench-slope test appears to be aborting fairly frequently, which causes 6The bench-slope test appears to be aborting fairly frequently, which causes
2failures on the autobuilder. 7failures on the autobuilder.
3 8
@@ -10,10 +15,10 @@ Signed-off-by: Ross Burton <ross.burton@arm.com>
10 1 file changed, 1 deletion(-) 15 1 file changed, 1 deletion(-)
11 16
12diff --git a/tests/testdrv.c b/tests/testdrv.c 17diff --git a/tests/testdrv.c b/tests/testdrv.c
13index bfca4c2314..5a755f512e 100644 18index 634b718..1e9dddb 100644
14--- a/tests/testdrv.c 19--- a/tests/testdrv.c
15+++ b/tests/testdrv.c 20+++ b/tests/testdrv.c
16@@ -77,7 +77,6 @@ static struct { 21@@ -76,7 +76,6 @@ static struct {
17 { "t-x448" }, 22 { "t-x448" },
18 { "t-ed448" }, 23 { "t-ed448" },
19 { "benchmark" }, 24 { "benchmark" },
@@ -21,4 +26,3 @@ index bfca4c2314..5a755f512e 100644
21 { "hashtest-6g", "hashtest", "--hugeblock --gigs 6 SHA1 SHA256 SHA512 " 26 { "hashtest-6g", "hashtest", "--hugeblock --gigs 6 SHA1 SHA256 SHA512 "
22 "SHA3-512 SM3 BLAKE2S_256 " 27 "SHA3-512 SM3 BLAKE2S_256 "
23 "BLAKE2B_512 CRC32 " 28 "BLAKE2B_512 CRC32 "
24
diff --git a/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch b/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch
index b9a607863d..98874ce12a 100644
--- a/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch
+++ b/meta/recipes-support/libgcrypt/files/no-native-gpg-error.patch
@@ -1,11 +1,19 @@
1From ede03b847038afc294e206ca345d12d75bbba844 Mon Sep 17 00:00:00 2001
2From: Ross Burton <ross.burton@arm.com>
3Date: Fri, 26 Aug 2022 15:23:37 +0100
4Subject: [PATCH] libgcrypt: rewrite ptest
5
1Don't depend on a native libgpg-error to build the test driver, as it's 6Don't depend on a native libgpg-error to build the test driver, as it's
2an optional dependency for some C annotations. 7an optional dependency for some C annotations.
3 8
4Upstream-Status: Inappropriate 9Upstream-Status: Inappropriate
5Signed-off-by: Ross Burton <ross.burton@arm.com> 10Signed-off-by: Ross Burton <ross.burton@arm.com>
11---
12 tests/testdrv.c | 1 -
13 1 file changed, 1 deletion(-)
6 14
7diff --git a/tests/testdrv.c b/tests/testdrv.c 15diff --git a/tests/testdrv.c b/tests/testdrv.c
8index 0ccde326..6d6abd57 100644 16index bfca4c2..634b718 100644
9--- a/tests/testdrv.c 17--- a/tests/testdrv.c
10+++ b/tests/testdrv.c 18+++ b/tests/testdrv.c
11@@ -32,7 +32,6 @@ 19@@ -32,7 +32,6 @@
diff --git a/meta/recipes-support/libgcrypt/libgcrypt_1.11.0.bb b/meta/recipes-support/libgcrypt/libgcrypt_1.11.1.bb
index ea1f34e8ce..e51a20e5bf 100644
--- a/meta/recipes-support/libgcrypt/libgcrypt_1.11.0.bb
+++ b/meta/recipes-support/libgcrypt/libgcrypt_1.11.1.bb
@@ -20,13 +20,12 @@ DEPENDS = "libgpg-error"
20UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html" 20UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html"
21SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \ 21SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.bz2 \
22 file://0001-libgcrypt-fix-m4-file-for-oe-core.patch \ 22 file://0001-libgcrypt-fix-m4-file-for-oe-core.patch \
23 file://0002-libgcrypt-fix-building-error-with-O2-in-sysroot-path.patch \
24 file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \ 23 file://0004-tests-Makefile.am-fix-undefined-reference-to-pthread.patch \
25 file://no-native-gpg-error.patch \ 24 file://no-native-gpg-error.patch \
26 file://no-bench-slope.patch \ 25 file://no-bench-slope.patch \
27 file://run-ptest \ 26 file://run-ptest \
28 " 27 "
29SRC_URI[sha256sum] = "09120c9867ce7f2081d6aaa1775386b98c2f2f246135761aae47d81f58685b9c" 28SRC_URI[sha256sum] = "24e91c9123a46c54e8371f3a3a2502f1198f2893fbfbf59af95bc1c21499b00e"
30 29
31BINCONFIG = "${bindir}/libgcrypt-config" 30BINCONFIG = "${bindir}/libgcrypt-config"
32 31
diff --git a/meta/recipes-support/libsoup/libsoup-2.4/0001-CVE-2025-32911.patch b/meta/recipes-support/libsoup/libsoup-2.4/0001-CVE-2025-32911.patch
deleted file mode 100644
index 9ef0643837..0000000000
--- a/meta/recipes-support/libsoup/libsoup-2.4/0001-CVE-2025-32911.patch
+++ /dev/null
@@ -1,74 +0,0 @@
1From 52c5859b82fe79f2c32d883e048d218e0d7f2182 Mon Sep 17 00:00:00 2001
2From: Changqing Li <changqing.li@windriver.com>
3Date: Wed, 30 Apr 2025 14:59:55 +0800
4Subject: [PATCH] CVE-2025-32911
5
6CVE: CVE-2025-32911
7Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/422/commits]
8
9Signed-off-by: Changqing Li <changqing.li@windriver.com>
10---
11 libsoup/soup-message-headers.c | 13 +++++++++----
12 tests/header-parsing-test.c | 15 +++++++++++++++
13 2 files changed, 24 insertions(+), 4 deletions(-)
14
15diff --git a/libsoup/soup-message-headers.c b/libsoup/soup-message-headers.c
16index 39ad14a..78b2455 100644
17--- a/libsoup/soup-message-headers.c
18+++ b/libsoup/soup-message-headers.c
19@@ -1454,10 +1454,15 @@ soup_message_headers_get_content_disposition (SoupMessageHeaders *hdrs,
20 */
21 if (params && g_hash_table_lookup_extended (*params, "filename",
22 &orig_key, &orig_value)) {
23- char *filename = strrchr (orig_value, '/');
24-
25- if (filename)
26- g_hash_table_insert (*params, g_strdup (orig_key), filename + 1);
27+ if (orig_value) {
28+ char *filename = strrchr (orig_value, '/');
29+
30+ if (filename)
31+ g_hash_table_insert (*params, g_strdup (orig_key), g_strdup(filename + 1));
32+ } else {
33+ /* filename with no value isn't valid. */
34+ g_hash_table_remove (*params, "filename");
35+ }
36 }
37 return TRUE;
38 }
39diff --git a/tests/header-parsing-test.c b/tests/header-parsing-test.c
40index 946f118..752196e 100644
41--- a/tests/header-parsing-test.c
42+++ b/tests/header-parsing-test.c
43@@ -1034,6 +1034,7 @@ do_param_list_tests (void)
44 #define RFC5987_TEST_HEADER_FALLBACK "attachment; filename*=Unknown''t%FF%FF%FFst.txt; filename=\"test.txt\""
45 #define RFC5987_TEST_HEADER_NO_TYPE "filename=\"test.txt\""
46 #define RFC5987_TEST_HEADER_NO_TYPE_2 "filename=\"test.txt\"; foo=bar"
47+#define RFC5987_TEST_HEADER_EMPTY_FILENAME ";filename"
48
49 static void
50 do_content_disposition_tests (void)
51@@ -1133,6 +1134,20 @@ do_content_disposition_tests (void)
52 g_assert_cmpstr (filename, ==, RFC5987_TEST_FALLBACK_FILENAME);
53 parameter2 = g_hash_table_lookup (params, "foo");
54 g_assert_cmpstr (parameter2, ==, "bar");
55+ g_hash_table_destroy (params);
56+
57+ /* Empty filename */
58+ soup_message_headers_clear (hdrs);
59+ soup_message_headers_append (hdrs, "Content-Disposition",
60+ RFC5987_TEST_HEADER_EMPTY_FILENAME);
61+ if (!soup_message_headers_get_content_disposition (hdrs,
62+ &disposition,
63+ &params)) {
64+ soup_test_assert (FALSE, "empty filename decoding FAILED");
65+ return;
66+ }
67+ g_free (disposition);
68+ g_assert_false (g_hash_table_contains (params, "filename"));
69 g_hash_table_destroy (params);
70
71 soup_message_headers_free (hdrs);
72--
732.34.1
74
diff --git a/meta/recipes-support/libsoup/libsoup-2.4/0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch b/meta/recipes-support/libsoup/libsoup-2.4/0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch
deleted file mode 100644
index d867e5bc17..0000000000
--- a/meta/recipes-support/libsoup/libsoup-2.4/0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch
+++ /dev/null
@@ -1,44 +0,0 @@
1From ced3c5d8cad0177b297666343f1561799dfefb0d Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Wed, 22 Nov 2023 18:49:10 -0800
4Subject: [PATCH] Fix build with libxml2-2.12.0 and clang-17
5
6Fixes build errors about missing function prototypes with clang-17
7
8Fixes
9| ../libsoup-2.74.3/libsoup/soup-xmlrpc-old.c:512:8: error: call to undeclared function 'xmlParseMemory'; ISO C99 and later do not support implicit function declarations
10
11Upstream-Status: Submitted [https://gitlab.gnome.org/GNOME/libsoup/-/merge_requests/385]
12Signed-off-by: Khem Raj <raj.khem@gmail.com>
13---
14 libsoup/soup-xmlrpc-old.c | 1 +
15 libsoup/soup-xmlrpc.c | 1 +
16 2 files changed, 2 insertions(+)
17
18diff --git a/libsoup/soup-xmlrpc-old.c b/libsoup/soup-xmlrpc-old.c
19index c57086b6..527e3b23 100644
20--- a/libsoup/soup-xmlrpc-old.c
21+++ b/libsoup/soup-xmlrpc-old.c
22@@ -11,6 +11,7 @@
23
24 #include <string.h>
25
26+#include <libxml/parser.h>
27 #include <libxml/tree.h>
28
29 #include "soup-xmlrpc-old.h"
30diff --git a/libsoup/soup-xmlrpc.c b/libsoup/soup-xmlrpc.c
31index 42dcda9c..e991cbf0 100644
32--- a/libsoup/soup-xmlrpc.c
33+++ b/libsoup/soup-xmlrpc.c
34@@ -17,6 +17,7 @@
35
36 #include <string.h>
37 #include <errno.h>
38+#include <libxml/parser.h>
39 #include <libxml/tree.h>
40 #include "soup-xmlrpc.h"
41 #include "soup.h"
42--
432.43.0
44
diff --git a/meta/recipes-support/libsoup/libsoup-2.4/0001-Fix-possibly-uninitialized-warnings.patch b/meta/recipes-support/libsoup/libsoup-2.4/0001-Fix-possibly-uninitialized-warnings.patch
deleted file mode 100644
index fcd442c13a..0000000000
--- a/meta/recipes-support/libsoup/libsoup-2.4/0001-Fix-possibly-uninitialized-warnings.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From 1159686379184a1c899eabb2174258aba5e0fd79 Mon Sep 17 00:00:00 2001
2From: Patrick Griffis <pgriffis@igalia.com>
3Date: Mon, 20 Sep 2021 15:41:31 -0500
4Subject: [PATCH] Fix possibly uninitialized warnings
5
6Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/fb98e9a8c3062c75357b961543af091de2dd5459]
7
8Signed-off-by: Changqing Li <changqing.li@windriver.com>
9---
10 libsoup/soup-websocket-connection.c | 2 +-
11 tests/samesite-test.c | 3 +++
12 2 files changed, 4 insertions(+), 1 deletion(-)
13
14diff --git a/libsoup/soup-websocket-connection.c b/libsoup/soup-websocket-connection.c
15index 65c1492..585d45c 100644
16--- a/libsoup/soup-websocket-connection.c
17+++ b/libsoup/soup-websocket-connection.c
18@@ -471,7 +471,7 @@ send_message (SoupWebsocketConnection *self,
19 GByteArray *bytes;
20 gsize frame_len;
21 guint8 *outer;
22- guint8 mask_offset;
23+ guint8 mask_offset = 0;
24 GBytes *filtered_bytes;
25 GList *l;
26 GError *error = NULL;
27diff --git a/tests/samesite-test.c b/tests/samesite-test.c
28index 0b081b2..60c9b8e 100644
29--- a/tests/samesite-test.c
30+++ b/tests/samesite-test.c
31@@ -60,6 +60,9 @@ assert_highest_policy_visible (GSList *cookies, SoupSameSitePolicy policy)
32 case SOUP_SAME_SITE_POLICY_NONE:
33 expected_count = 1;
34 break;
35+ default:
36+ g_assert_not_reached ();
37+ break;
38 }
39
40 g_assert_cmpuint (size, ==, expected_count);
41--
422.34.1
43
diff --git a/meta/recipes-support/libsoup/libsoup-2.4/0001-Remove-http-and-https-aliases-support-test.patch b/meta/recipes-support/libsoup/libsoup-2.4/0001-Remove-http-and-https-aliases-support-test.patch
deleted file mode 100644
index 0d4139ec08..0000000000
--- a/meta/recipes-support/libsoup/libsoup-2.4/0001-Remove-http-and-https-aliases-support-test.patch
+++ /dev/null
@@ -1,145 +0,0 @@
1From 0e3bfa22b23451531caf8cc30b1771ac6a41fcad Mon Sep 17 00:00:00 2001
2From: Carlos Garcia Campos <cgarcia@igalia.com>
3Date: Thu, 11 Feb 2021 10:47:09 +0100
4Subject: [PATCH] Remove http and https aliases support test
5
6Upstream has removed the whole function of http and https aliases
7support, this commit partially cherry pick it, only remove the test to
8mute the warning:
9| ../libsoup-2.74.3/tests/server-test.c: In function 'do_one_server_aliases_test':
10| ../libsoup-2.74.3/tests/server-test.c:180:17: warning: 'g_socket_client_set_tls_validation_flags' is deprecated [-Wdeprecated-declarations]
11| 180 | g_socket_client_set_tls_validation_flags (client, 0);
12| | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13
14Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/111ae4ebe7cc2e389573cff5b9ac76509d6cbac0]
15
16Signed-off-by: Changqing Li <changqing.li@windriver.com>
17---
18 tests/server-test.c | 104 --------------------------------------------
19 1 file changed, 104 deletions(-)
20
21diff --git a/tests/server-test.c b/tests/server-test.c
22index 8976103..cb7e815 100644
23--- a/tests/server-test.c
24+++ b/tests/server-test.c
25@@ -154,108 +154,6 @@ do_star_test (ServerData *sd, gconstpointer test_data)
26 soup_uri_free (star_uri);
27 }
28
29-static void
30-do_one_server_aliases_test (SoupURI *uri,
31- const char *alias,
32- gboolean succeed)
33-{
34- GSocketClient *client;
35- GSocketConnectable *addr;
36- GSocketConnection *conn;
37- GInputStream *in;
38- GOutputStream *out;
39- GError *error = NULL;
40- GString *req;
41- static char buf[1024];
42-
43- debug_printf (1, " %s via %s\n", alias, uri->scheme);
44-
45- /* There's no way to make libsoup's client side send an absolute
46- * URI (to a non-proxy server), so we have to fake this.
47- */
48-
49- client = g_socket_client_new ();
50- if (uri->scheme == SOUP_URI_SCHEME_HTTPS) {
51- g_socket_client_set_tls (client, TRUE);
52- g_socket_client_set_tls_validation_flags (client, 0);
53- }
54- addr = g_network_address_new (uri->host, uri->port);
55-
56- conn = g_socket_client_connect (client, addr, NULL, &error);
57- g_object_unref (addr);
58- g_object_unref (client);
59- if (!conn) {
60- g_assert_no_error (error);
61- g_error_free (error);
62- return;
63- }
64-
65- in = g_io_stream_get_input_stream (G_IO_STREAM (conn));
66- out = g_io_stream_get_output_stream (G_IO_STREAM (conn));
67-
68- req = g_string_new (NULL);
69- g_string_append_printf (req, "GET %s://%s:%d HTTP/1.1\r\n",
70- alias, uri->host, uri->port);
71- g_string_append_printf (req, "Host: %s:%d\r\n",
72- uri->host, uri->port);
73- g_string_append (req, "Connection: close\r\n\r\n");
74-
75- if (!g_output_stream_write_all (out, req->str, req->len, NULL, NULL, &error)) {
76- g_assert_no_error (error);
77- g_error_free (error);
78- g_object_unref (conn);
79- g_string_free (req, TRUE);
80- return;
81- }
82- g_string_free (req, TRUE);
83-
84- if (!g_input_stream_read_all (in, buf, sizeof (buf), NULL, NULL, &error)) {
85- g_assert_no_error (error);
86- g_error_free (error);
87- g_object_unref (conn);
88- return;
89- }
90-
91- if (succeed)
92- g_assert_true (g_str_has_prefix (buf, "HTTP/1.1 200 "));
93- else
94- g_assert_true (g_str_has_prefix (buf, "HTTP/1.1 400 "));
95-
96- g_io_stream_close (G_IO_STREAM (conn), NULL, NULL);
97- g_object_unref (conn);
98-}
99-
100-static void
101-do_server_aliases_test (ServerData *sd, gconstpointer test_data)
102-{
103- char *http_aliases[] = { "dav", NULL };
104- char *https_aliases[] = { "davs", NULL };
105- char *http_good[] = { "http", "dav", NULL };
106- char *http_bad[] = { "https", "davs", "fred", NULL };
107- char *https_good[] = { "https", "davs", NULL };
108- char *https_bad[] = { "http", "dav", "fred", NULL };
109- int i;
110-
111- g_test_bug ("703694");
112-
113- g_object_set (G_OBJECT (sd->server),
114- SOUP_SERVER_HTTP_ALIASES, http_aliases,
115- SOUP_SERVER_HTTPS_ALIASES, https_aliases,
116- NULL);
117-
118- for (i = 0; http_good[i]; i++)
119- do_one_server_aliases_test (sd->base_uri, http_good[i], TRUE);
120- for (i = 0; http_bad[i]; i++)
121- do_one_server_aliases_test (sd->base_uri, http_bad[i], FALSE);
122-
123- if (tls_available) {
124- for (i = 0; https_good[i]; i++)
125- do_one_server_aliases_test (sd->ssl_base_uri, https_good[i], TRUE);
126- for (i = 0; https_bad[i]; i++)
127- do_one_server_aliases_test (sd->ssl_base_uri, https_bad[i], FALSE);
128- }
129-}
130-
131 static void
132 do_dot_dot_test (ServerData *sd, gconstpointer test_data)
133 {
134@@ -1382,8 +1280,6 @@ main (int argc, char **argv)
135
136 g_test_add ("/server/OPTIONS *", ServerData, NULL,
137 server_setup, do_star_test, server_teardown);
138- g_test_add ("/server/aliases", ServerData, NULL,
139- server_setup, do_server_aliases_test, server_teardown);
140 g_test_add ("/server/..-in-path", ServerData, NULL,
141 server_setup, do_dot_dot_test, server_teardown);
142 g_test_add ("/server/ipv6", ServerData, NULL,
143--
1442.34.1
145
diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-1.patch b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-1.patch
deleted file mode 100644
index cb1f096110..0000000000
--- a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-1.patch
+++ /dev/null
@@ -1,37 +0,0 @@
1From a693d49bff058fc20a448dc4e7d324ff0dc6597e Mon Sep 17 00:00:00 2001
2From: Ignacio Casal Quinteiro <qignacio@amazon.com>
3Date: Wed, 11 Sep 2024 11:52:11 +0200
4Subject: [PATCH 1/3] websocket: process the frame as soon as we read data
5
6Otherwise we can enter in a read loop because we were not
7validating the data until the all the data was read.
8
9Fixes #391
10
11CVE: CVE-2024-52532
12Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/6adc0e3eb74c257ed4e2a23eb4b2774fdb0d67be#f1d67ca0386b145ea201cf88d27f72724d7c6715]
13
14Signed-off-by: Changqing Li <changqing.li@windriver.com>
15---
16 libsoup/soup-websocket-connection.c | 5 ++---
17 1 file changed, 2 insertions(+), 3 deletions(-)
18
19diff --git a/libsoup/soup-websocket-connection.c b/libsoup/soup-websocket-connection.c
20index a4095e1..65c1492 100644
21--- a/libsoup/soup-websocket-connection.c
22+++ b/libsoup/soup-websocket-connection.c
23@@ -1140,9 +1140,8 @@ soup_websocket_connection_read (SoupWebsocketConnection *self)
24 }
25
26 pv->incoming->len = len + count;
27- } while (count > 0);
28-
29- process_incoming (self);
30+ process_incoming (self);
31+ } while (count > 0 && !pv->close_sent && !pv->io_closing);
32
33 if (end) {
34 if (!pv->close_sent || !pv->close_received) {
35--
362.34.1
37
diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-2.patch b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-2.patch
deleted file mode 100644
index dcadafe944..0000000000
--- a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-2.patch
+++ /dev/null
@@ -1,43 +0,0 @@
1From f5b76410de1318f49844dacf6e68692522b6c856 Mon Sep 17 00:00:00 2001
2From: Ignacio Casal Quinteiro <qignacio@amazon.com>
3Date: Wed, 2 Oct 2024 11:17:19 +0200
4Subject: [PATCH] websocket-test: disconnect error copy after the test ends
5
6Otherwise the server will have already sent a few more wrong
7bytes and the client will continue getting errors to copy
8but the error is already != NULL and it will assert
9
10CVE: CVE-2024-52532
11Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libsoup/-/commit/29b96fab2512666d7241e46c98cc45b60b795c0c]
12
13Signed-off-by: Changqing Li <changqing.li@windriver.com>
14---
15 tests/websocket-test.c | 5 ++++-
16 1 file changed, 4 insertions(+), 1 deletion(-)
17
18diff --git a/tests/websocket-test.c b/tests/websocket-test.c
19index 5e40cf3..1ec9ff6 100644
20--- a/tests/websocket-test.c
21+++ b/tests/websocket-test.c
22@@ -1331,8 +1331,9 @@ test_receive_invalid_encode_length_64 (Test *test,
23 GError *error = NULL;
24 InvalidEncodeLengthTest context = { test, NULL };
25 guint i;
26+ guint error_id;
27
28- g_signal_connect (test->client, "error", G_CALLBACK (on_error_copy), &error);
29+ error_id = g_signal_connect (test->client, "error", G_CALLBACK (on_error_copy), &error);
30 g_signal_connect (test->client, "message", G_CALLBACK (on_binary_message), &received);
31
32 /* We use 127(\x7f) as payload length with 65535 extended length */
33@@ -1345,6 +1346,7 @@ test_receive_invalid_encode_length_64 (Test *test,
34 WAIT_UNTIL (error != NULL || received != NULL);
35 g_assert_error (error, SOUP_WEBSOCKET_ERROR, SOUP_WEBSOCKET_CLOSE_PROTOCOL_ERROR);
36 g_clear_error (&error);
37+ g_signal_handler_disconnect (test->client, error_id);
38 g_assert_null (received);
39
40 g_thread_join (thread);
41--
422.34.1
43
diff --git a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-3.patch b/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-3.patch
deleted file mode 100644
index ab6af72291..0000000000
--- a/meta/recipes-support/libsoup/libsoup-2.4/CVE-2024-52532-3.patch
+++ /dev/null
@@ -1,48 +0,0 @@
1From d97bb2e340f5a6d7e56a7738403f9d18bc406b70 Mon Sep 17 00:00:00 2001
2From: Simon McVittie <smcv@debian.org>
3Date: Wed, 13 Nov 2024 14:14:23 +0000
4Subject: [PATCH 3/3] websocket-test: Disconnect error signal in another place
5
6This is the same change as commit 29b96fab "websocket-test: disconnect
7error copy after the test ends", and is done for the same reason, but
8replicating it into a different function.
9
10Fixes: 6adc0e3e "websocket: process the frame as soon as we read data"
11Resolves: https://gitlab.gnome.org/GNOME/libsoup/-/issues/399
12Signed-off-by: Simon McVittie <smcv@debian.org>
13
14CVE: CVE-2024-52532
15Upstream-Status: Backport
16[https://gitlab.gnome.org/GNOME/libsoup/-/commit/4c9e75c6676a37b6485620c332e568e1a3f530ff]
17
18Signed-off-by: Changqing Li <changqing.li@windriver.com>
19---
20 tests/websocket-test.c | 4 +++-
21 1 file changed, 3 insertions(+), 1 deletion(-)
22
23diff --git a/tests/websocket-test.c b/tests/websocket-test.c
24index 2b19a7b..0699a06 100644
25--- a/tests/websocket-test.c
26+++ b/tests/websocket-test.c
27@@ -1300,8 +1300,9 @@ test_receive_invalid_encode_length_16 (Test *test,
28 GError *error = NULL;
29 InvalidEncodeLengthTest context = { test, NULL };
30 guint i;
31+ guint error_id;
32
33- g_signal_connect (test->client, "error", G_CALLBACK (on_error_copy), &error);
34+ error_id = g_signal_connect (test->client, "error", G_CALLBACK (on_error_copy), &error);
35 g_signal_connect (test->client, "message", G_CALLBACK (on_binary_message), &received);
36
37 /* We use 126(~) as payload length with 125 extended length */
38@@ -1314,6 +1315,7 @@ test_receive_invalid_encode_length_16 (Test *test,
39 WAIT_UNTIL (error != NULL || received != NULL);
40 g_assert_error (error, SOUP_WEBSOCKET_ERROR, SOUP_WEBSOCKET_CLOSE_PROTOCOL_ERROR);
41 g_clear_error (&error);
42+ g_signal_handler_disconnect (test->client, error_id);
43 g_assert_null (received);
44
45 g_thread_join (thread);
46--
472.34.1
48
diff --git a/meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb b/meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb
deleted file mode 100644
index 7e275a48f4..0000000000
--- a/meta/recipes-support/libsoup/libsoup-2.4_2.74.3.bb
+++ /dev/null
@@ -1,66 +0,0 @@
1SUMMARY = "An HTTP library implementation in C"
2DESCRIPTION = "libsoup is an HTTP client/server library for GNOME. It uses GObjects \
3and the glib main loop, to integrate well with GNOME applications."
4HOMEPAGE = "https://wiki.gnome.org/Projects/libsoup"
5BUGTRACKER = "https://bugzilla.gnome.org/"
6SECTION = "x11/gnome/libs"
7LICENSE = "LGPL-2.0-only"
8LIC_FILES_CHKSUM = "file://COPYING;md5=5f30f0716dfdd0d91eb439ebec522ec2"
9
10DEPENDS = "glib-2.0 glib-2.0-native libxml2 sqlite3 libpsl"
11
12SHRT_VER = "${@d.getVar('PV').split('.')[0]}.${@d.getVar('PV').split('.')[1]}"
13
14SRC_URI = "${GNOME_MIRROR}/libsoup/${SHRT_VER}/libsoup-${PV}.tar.xz \
15 file://0001-Fix-build-with-libxml2-2.12.0-and-clang-17.patch \
16 file://0001-CVE-2025-32911.patch \
17 file://0001-Fix-possibly-uninitialized-warnings.patch \
18 file://0001-Remove-http-and-https-aliases-support-test.patch \
19 file://CVE-2024-52532-1.patch \
20 file://CVE-2024-52532-2.patch \
21 file://CVE-2024-52532-3.patch"
22
23SRC_URI[sha256sum] = "e4b77c41cfc4c8c5a035fcdc320c7bc6cfb75ef7c5a034153df1413fa1d92f13"
24
25CVE_PRODUCT = "libsoup"
26
27S = "${WORKDIR}/libsoup-${PV}"
28
29inherit meson gettext pkgconfig upstream-version-is-even gobject-introspection gtk-doc
30
31UPSTREAM_CHECK_REGEX = "libsoup-(?P<pver>2(\.(?!99)\d+)+)\.tar"
32
33GIR_MESON_ENABLE_FLAG = 'enabled'
34GIR_MESON_DISABLE_FLAG = 'disabled'
35
36PACKAGECONFIG ??= ""
37PACKAGECONFIG[brotli] = "-Dbrotli=enabled,-Dbrotli=disabled,brotli"
38# libsoup-gnome is entirely deprecated and just stubs in 2.42 onwards
39PACKAGECONFIG[gnome] = "-Dgnome=true,-Dgnome=false"
40PACKAGECONFIG[gssapi] = "-Dgssapi=enabled,-Dgssapi=disabled,krb5"
41PACKAGECONFIG[ntlm] = "-Dntlm=enabled,-Dntlm=disabled"
42PACKAGECONFIG[sysprof] = "-Dsysprof=enabled,-Dsysprof=disabled,sysprof"
43
44# Tell libsoup where the target ntlm_auth is installed
45do_write_config:append:class-target() {
46 cat >${WORKDIR}/soup.cross <<EOF
47[binaries]
48ntlm_auth = '${bindir}/ntlm_auth'
49EOF
50}
51EXTRA_OEMESON:append:class-target = " --cross-file ${WORKDIR}/soup.cross"
52
53EXTRA_OEMESON += "-Dvapi=disabled -Dtls_check=false"
54
55GTKDOC_MESON_OPTION = "gtk_doc"
56
57# When built without gnome support, libsoup-2.4 will contain only one shared lib
58# and will therefore become subject to renaming by debian.bbclass. Prevent
59# renaming in order to keep the package name consistent regardless of whether
60# gnome support is enabled or disabled.
61DEBIAN_NOAUTONAME:${PN} = "1"
62
63# glib-networking is needed for SSL, proxies, etc.
64RRECOMMENDS:${PN} = "glib-networking"
65
66BBCLASSEXTEND = "native nativesdk"
diff --git a/meta/recipes-support/libunwind/libunwind_1.8.1.bb b/meta/recipes-support/libunwind/libunwind_1.8.1.bb
index 68d7a98ee4..10714ea247 100644
--- a/meta/recipes-support/libunwind/libunwind_1.8.1.bb
+++ b/meta/recipes-support/libunwind/libunwind_1.8.1.bb
@@ -28,7 +28,7 @@ PACKAGECONFIG[lzma] = "--enable-minidebuginfo,--disable-minidebuginfo,xz"
28PACKAGECONFIG[zlib] = "--enable-zlibdebuginfo,--disable-zlibdebuginfo,zlib" 28PACKAGECONFIG[zlib] = "--enable-zlibdebuginfo,--disable-zlibdebuginfo,zlib"
29PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, latex2man-native" 29PACKAGECONFIG[latexdocs] = "--enable-documentation, --disable-documentation, latex2man-native"
30 30
31EXTRA_OECONF = "--enable-static" 31EXTRA_OECONF = "--enable-static --disable-tests"
32 32
33# http://errors.yoctoproject.org/Errors/Details/20487/ 33# http://errors.yoctoproject.org/Errors/Details/20487/
34ARM_INSTRUCTION_SET:armv4 = "arm" 34ARM_INSTRUCTION_SET:armv4 = "arm"