rust: drop PV from include file names
PATCH 1/13 rust: drop PV from include file names
This complicates (semi) automated upgrades, and isn't necessary as we carry only a single version of the toolchain.
---
.../cargo/cargo-cross-canadian_1.54.0.bb | 4 ++--
meta/recipes-devtools/cargo/cargo_1.54.0.bb | 4 ++--
...initions-for-riscv64-musl-libc-0.2.93.patch | 0
...l-mod.rs-add-riscv64-to-b64-set-libc-.patch | 0
...definitions-to-match-musl-libc-0.2.93.patch | 0
...s-for-modified-files-for-rust-1.54.0-.patch | 0
meta/recipes-devtools/rust/libstd-rs_1.54.0.bb | 2 +-
.../rust/rust-cross-canadian_1.54.0.bb | 4 ++--
.../recipes-devtools/rust/rust-cross_1.54.0.bb | 2 +-
meta/recipes-devtools/rust/rust-llvm_1.54.0.bb | 2 +-
.../rust/rust-snapshot-1.54.0.inc | 18 ------------------
meta/recipes-devtools/rust/rust-snapshot.inc | 16 ++++++++++++++++
.../rust/rust-source-1.54.0.inc | 3 ---
meta/recipes-devtools/rust/rust-source.inc | 1 +
.../rust/rust-tools-cross-canadian_1.54.0.bb | 4 ++--
meta/recipes-devtools/rust/rust_1.54.0.bb | 4 ++--
16 files changed, 30 insertions(+), 34 deletions(-)
rename meta/recipes-devtools/rust/{libstd-rs-1.54.0 => libstd-rs}/0005-Add-base-definitions-for-riscv64-musl-libc-0.2.93.patch (100%)
rename meta/recipes-devtools/rust/{libstd-rs-1.54.0 => libstd-rs}/0006-FIXUP-linux-musl-mod.rs-add-riscv64-to-b64-set-libc-.patch (100%)
rename meta/recipes-devtools/rust/{libstd-rs-1.54.0 => libstd-rs}/0007-FIXUP-Correct-definitions-to-match-musl-libc-0.2.93.patch (100%)
rename meta/recipes-devtools/rust/{libstd-rs-1.54.0 => libstd-rs}/0008-Update-checksums-for-modified-files-for-rust-1.54.0-.patch (100%)
delete mode 100644 meta/recipes-devtools/rust/rust-snapshot-1.54.0.inc
delete mode 100644 meta/recipes-devtools/rust/rust-source-1.54.0.incmeta/recipes-devtools/cargo/cargo-cross-canadian_1.54.0.bb +2 -2
@@ -1,5 +1,5 @@ -require recipes-devtools/rust/rust-source-${PV}.inc -require recipes-devtools/rust/rust-snapshot-${PV}.inc +require recipes-devtools/rust/rust-source.inc +require recipes-devtools/rust/rust-snapshot.inc FILESEXTRAPATHS:prepend := "${THISDIR}/cargo-${PV}:"
meta/recipes-devtools/cargo/cargo_1.54.0.bb +2 -2
@@ -1,4 +1,4 @@ -require recipes-devtools/rust/rust-source-${PV}.inc -require recipes-devtools/rust/rust-snapshot-${PV}.inc +require recipes-devtools/rust/rust-source.inc +require recipes-devtools/rust/rust-snapshot.inc require cargo.inc BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/rust/libstd-rs/0005-Add-base-definitions-for-riscv64-musl-libc-0.2.93.patch renamed from meta/recipes-devtools/rust/libstd-rs-1.54.0/0005-Add-base-definitions-for-riscv64-musl-libc-0.2.93.patch +0 -0
meta/recipes-devtools/rust/libstd-rs/0006-FIXUP-linux-musl-mod.rs-add-riscv64-to-b64-set-libc-.patch renamed from meta/recipes-devtools/rust/libstd-rs-1.54.0/0006-FIXUP-linux-musl-mod.rs-add-riscv64-to-b64-set-libc-.patch +0 -0
meta/recipes-devtools/rust/libstd-rs/0007-FIXUP-Correct-definitions-to-match-musl-libc-0.2.93.patch renamed from meta/recipes-devtools/rust/libstd-rs-1.54.0/0007-FIXUP-Correct-definitions-to-match-musl-libc-0.2.93.patch +0 -0
meta/recipes-devtools/rust/libstd-rs/0008-Update-checksums-for-modified-files-for-rust-1.54.0-.patch renamed from meta/recipes-devtools/rust/libstd-rs-1.54.0/0008-Update-checksums-for-modified-files-for-rust-1.54.0-.patch +0 -0
meta/recipes-devtools/rust/libstd-rs_1.54.0.bb +1 -1
@@ -1,4 +1,4 @@ -require rust-source-${PV}.inc +require rust-source.inc require libstd-rs.inc SRC_URI += " \
meta/recipes-devtools/rust/rust-cross-canadian_1.54.0.bb +2 -2
@@ -1,6 +1,6 @@ require rust-cross-canadian.inc -require rust-source-${PV}.inc -require rust-snapshot-${PV}.inc +require rust-source.inc +require rust-snapshot.inc FILESEXTRAPATHS:prepend := "${THISDIR}/rust:"
meta/recipes-devtools/rust/rust-cross_1.54.0.bb +1 -1
@@ -1,2 +1,2 @@ require rust-cross.inc -require rust-source-${PV}.inc +require rust-source.inc
meta/recipes-devtools/rust/rust-llvm_1.54.0.bb +1 -1
@@ -1,5 +1,5 @@ # check src/llvm-project/llvm/CMakeLists.txt for llvm version in use # LLVM_RELEASE = "12.0.1" -require rust-source-${PV}.inc +require rust-source.inc require rust-llvm.inc
meta/recipes-devtools/rust/rust-snapshot-1.54.0.inc deleted +0 -18
@@ -1,18 +0,0 @@ -require rust-snapshot.inc - -## This is information on the rust-snapshot (binary) used to build our current release. -## snapshot info is taken from rust/src/stage0.txt -## TODO: find a way to add additional SRC_URIs based on the contents of an -## earlier SRC_URI. -RS_VERSION = "1.53.0" -CARGO_VERSION = "1.53.0" - -# TODO: Add hashes for other architecture toolchains as well. Make a script? -SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "66d5257bbd194db08e67ca63a74cc80cdc4a36eaa30bf7dfe65861d9deaff7f7" -SRC_URI[rustc-snapshot-x86_64.sha256sum] = "9c2f0443a546dd18f1f020c7711a7b9864432545ceb812e79315c1e76508b193" -SRC_URI[cargo-snapshot-x86_64.sha256sum] = "e4437f6c83574fc60e183f4df439190f7610e4a669476802795645da66fbb83b" - -SRC_URI[rust-std-snapshot-aarch64.sha256sum] = "fc261d0ff057c58b36057c30217bad1a29a9a3f257c70f5df88ad3f1d982386e" -SRC_URI[rustc-snapshot-aarch64.sha256sum] = "a857e5c615f6b5b3afc6b707ae007b3b4624585b0b2ba9b38b553114db37f8d5" -SRC_URI[cargo-snapshot-aarch64.sha256sum] = "4fa425a2d4633aeca67fa42695b3b9100f8b988dd1c21e60d6b2aa1164e55c0c" -
meta/recipes-devtools/rust/rust-snapshot.inc +16 -0
@@ -1,3 +1,19 @@ +## This is information on the rust-snapshot (binary) used to build our current release. +## snapshot info is taken from rust/src/stage0.txt +## TODO: find a way to add additional SRC_URIs based on the contents of an +## earlier SRC_URI. +RS_VERSION = "1.53.0" +CARGO_VERSION = "1.53.0" + +# TODO: Add hashes for other architecture toolchains as well. Make a script? +SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "66d5257bbd194db08e67ca63a74cc80cdc4a36eaa30bf7dfe65861d9deaff7f7" +SRC_URI[rustc-snapshot-x86_64.sha256sum] = "9c2f0443a546dd18f1f020c7711a7b9864432545ceb812e79315c1e76508b193" +SRC_URI[cargo-snapshot-x86_64.sha256sum] = "e4437f6c83574fc60e183f4df439190f7610e4a669476802795645da66fbb83b" + +SRC_URI[rust-std-snapshot-aarch64.sha256sum] = "fc261d0ff057c58b36057c30217bad1a29a9a3f257c70f5df88ad3f1d982386e" +SRC_URI[rustc-snapshot-aarch64.sha256sum] = "a857e5c615f6b5b3afc6b707ae007b3b4624585b0b2ba9b38b553114db37f8d5" +SRC_URI[cargo-snapshot-aarch64.sha256sum] = "4fa425a2d4633aeca67fa42695b3b9100f8b988dd1c21e60d6b2aa1164e55c0c" + SRC_URI += " \ https://static.rust-lang.org/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \ https://static.rust-lang.org/dist/${RUSTC_SNAPSHOT}.tar.xz;name=rustc-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
meta/recipes-devtools/rust/rust-source-1.54.0.inc deleted +0 -3
@@ -1,3 +0,0 @@ -require rust-source.inc - -SRC_URI[rust.sha256sum] = "a2934f85f76a35a3796c0fefd31e91f5b6dd8377cd8c3769c1c10e7ce7a495f4"
meta/recipes-devtools/rust/rust-source.inc +1 -0
@@ -1,3 +1,4 @@ +SRC_URI[rust.sha256sum] = "a2934f85f76a35a3796c0fefd31e91f5b6dd8377cd8c3769c1c10e7ce7a495f4" SRC_URI += "https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz;name=rust" RUSTSRC = "${WORKDIR}/rustc-${PV}-src"
meta/recipes-devtools/rust/rust-tools-cross-canadian_1.54.0.bb +2 -2
@@ -1,6 +1,6 @@ require rust-tools-cross-canadian.inc -require rust-source-${PV}.inc -require rust-snapshot-${PV}.inc +require rust-source.inc +require rust-snapshot.inc FILESEXTRAPATHS:prepend := "${THISDIR}/rust:"
meta/recipes-devtools/rust/rust_1.54.0.bb +2 -2
@@ -1,6 +1,6 @@ require rust-target.inc -require rust-source-${PV}.inc -require rust-snapshot-${PV}.inc +require rust-source.inc +require rust-snapshot.inc INSANE_SKIP:${PN}:class-native = "already-stripped"
Signature · 1 line
2.20.1
PATCH 2/13 rust: update 1.54.0 -> 1.55.0
---
meta/conf/distro/include/tcmode-default.inc | 2 +-
..._1.54.0.bb => cargo-cross-canadian_1.55.0.bb} | 0
.../cargo/{cargo_1.54.0.bb => cargo_1.55.0.bb} | 0
.../{libstd-rs_1.54.0.bb => libstd-rs_1.55.0.bb} | 0
...n_1.54.0.bb => rust-cross-canadian_1.55.0.bb} | 0
...rust-cross_1.54.0.bb => rust-cross_1.55.0.bb} | 0
.../{rust-llvm_1.54.0.bb => rust-llvm_1.55.0.bb} | 0
meta/recipes-devtools/rust/rust-snapshot.inc | 16 ++++++++--------
meta/recipes-devtools/rust/rust-source.inc | 2 +-
....0.bb => rust-tools-cross-canadian_1.55.0.bb} | 0
.../rust/{rust_1.54.0.bb => rust_1.55.0.bb} | 0
11 files changed, 10 insertions(+), 10 deletions(-)
rename meta/recipes-devtools/cargo/{cargo-cross-canadian_1.54.0.bb => cargo-cross-canadian_1.55.0.bb} (100%)
rename meta/recipes-devtools/cargo/{cargo_1.54.0.bb => cargo_1.55.0.bb} (100%)
rename meta/recipes-devtools/rust/{libstd-rs_1.54.0.bb => libstd-rs_1.55.0.bb} (100%)
rename meta/recipes-devtools/rust/{rust-cross-canadian_1.54.0.bb => rust-cross-canadian_1.55.0.bb} (100%)
rename meta/recipes-devtools/rust/{rust-cross_1.54.0.bb => rust-cross_1.55.0.bb} (100%)
rename meta/recipes-devtools/rust/{rust-llvm_1.54.0.bb => rust-llvm_1.55.0.bb} (100%)
rename meta/recipes-devtools/rust/{rust-tools-cross-canadian_1.54.0.bb => rust-tools-cross-canadian_1.55.0.bb} (100%)
rename meta/recipes-devtools/rust/{rust_1.54.0.bb => rust_1.55.0.bb} (100%)meta/conf/distro/include/tcmode-default.inc +1 -1
@@ -27,7 +27,7 @@ GOVERSION ?= "1.16%" # This can not use wildcards like 8.0.% since it is also used in mesa to denote # llvm version being used, so always bump it with llvm recipe version bump LLVMVERSION ?= "12.0.1" -RUSTVERSION ?= "1.54.0" +RUSTVERSION ?= "1.55.0" PREFERRED_VERSION_gcc ?= "${GCCVERSION}" PREFERRED_VERSION_gcc-cross-${TARGET_ARCH} ?= "${GCCVERSION}"
meta/recipes-devtools/cargo/cargo-cross-canadian_1.55.0.bb renamed from meta/recipes-devtools/cargo/cargo-cross-canadian_1.54.0.bb +0 -0
meta/recipes-devtools/cargo/cargo_1.55.0.bb renamed from meta/recipes-devtools/cargo/cargo_1.54.0.bb +0 -0
meta/recipes-devtools/rust/libstd-rs_1.55.0.bb renamed from meta/recipes-devtools/rust/libstd-rs_1.54.0.bb +0 -0
meta/recipes-devtools/rust/rust-cross-canadian_1.55.0.bb renamed from meta/recipes-devtools/rust/rust-cross-canadian_1.54.0.bb +0 -0
meta/recipes-devtools/rust/rust-cross_1.55.0.bb renamed from meta/recipes-devtools/rust/rust-cross_1.54.0.bb +0 -0
meta/recipes-devtools/rust/rust-llvm_1.55.0.bb renamed from meta/recipes-devtools/rust/rust-llvm_1.54.0.bb +0 -0
meta/recipes-devtools/rust/rust-snapshot.inc +8 -8
@@ -2,17 +2,17 @@ ## snapshot info is taken from rust/src/stage0.txt ## TODO: find a way to add additional SRC_URIs based on the contents of an ## earlier SRC_URI. -RS_VERSION = "1.53.0" -CARGO_VERSION = "1.53.0" +RS_VERSION = "1.54.0" +CARGO_VERSION = "1.54.0" # TODO: Add hashes for other architecture toolchains as well. Make a script? -SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "66d5257bbd194db08e67ca63a74cc80cdc4a36eaa30bf7dfe65861d9deaff7f7" -SRC_URI[rustc-snapshot-x86_64.sha256sum] = "9c2f0443a546dd18f1f020c7711a7b9864432545ceb812e79315c1e76508b193" -SRC_URI[cargo-snapshot-x86_64.sha256sum] = "e4437f6c83574fc60e183f4df439190f7610e4a669476802795645da66fbb83b" +SRC_URI[rust-std-snapshot-x86_64.sha256sum] = "a22e19859b3c5032daac1633637546a986c51bdfa3ad0db6e394e6cc461f466b" +SRC_URI[rustc-snapshot-x86_64.sha256sum] = "eafc06aba7128ee8592c16d7e3ae7b877e82c5d9779c9d07099558ed7e286296" +SRC_URI[cargo-snapshot-x86_64.sha256sum] = "8a9c80b7dc5d47e6eafe173b81ad96244522c97d74214ba7da57a502d49b231c" -SRC_URI[rust-std-snapshot-aarch64.sha256sum] = "fc261d0ff057c58b36057c30217bad1a29a9a3f257c70f5df88ad3f1d982386e" -SRC_URI[rustc-snapshot-aarch64.sha256sum] = "a857e5c615f6b5b3afc6b707ae007b3b4624585b0b2ba9b38b553114db37f8d5" -SRC_URI[cargo-snapshot-aarch64.sha256sum] = "4fa425a2d4633aeca67fa42695b3b9100f8b988dd1c21e60d6b2aa1164e55c0c" +SRC_URI[rust-std-snapshot-aarch64.sha256sum] = "a1a77737d218087eb7d3613adcde2c9e383d758cdf128646a0ee63396145270b" +SRC_URI[rustc-snapshot-aarch64.sha256sum] = "0e771c06435b6fa3087ce054c7f2f94b8ee36717997f32f97e2e3425739ac2b4" +SRC_URI[cargo-snapshot-aarch64.sha256sum] = "b3b6e5358bf1ecd5d8d7e258a5632dac7d923b2aa8ab1c8c0f6aad62d9307b37" SRC_URI += " \ https://static.rust-lang.org/dist/${RUST_STD_SNAPSHOT}.tar.xz;name=rust-std-snapshot-${BUILD_ARCH};subdir=rust-snapshot-components \
meta/recipes-devtools/rust/rust-source.inc +1 -1
@@ -1,4 +1,4 @@ -SRC_URI[rust.sha256sum] = "a2934f85f76a35a3796c0fefd31e91f5b6dd8377cd8c3769c1c10e7ce7a495f4" +SRC_URI[rust.sha256sum] = "aec85a7c1f40b7a40818a58ae13632f8a12cfaa4d3e2a10957d0e9d16dfdd556" SRC_URI += "https://static.rust-lang.org/dist/rustc-${PV}-src.tar.xz;name=rust" RUSTSRC = "${WORKDIR}/rustc-${PV}-src"
meta/recipes-devtools/rust/rust-tools-cross-canadian_1.55.0.bb renamed from meta/recipes-devtools/rust/rust-tools-cross-canadian_1.54.0.bb +0 -0
meta/recipes-devtools/rust/rust_1.55.0.bb renamed from meta/recipes-devtools/rust/rust_1.54.0.bb +0 -0
Signature · 1 line
2.20.1
PATCH 3/13 librsvg: update 2.40.21 -> 2.52.0 (transition to rust!)
In reply to Alexander KanavinAfter some poking and hacking I have arrived to the settings that work. Please refer to the commit for details.
Some of these issues may re-occur in other components; in that case we need to come up with more generic solutions or upstream fixes.
So far, it's a learning exercise for everybody in getting to know the rust toolchain.
---
...t-Bsymbolic-fixes-configure-on-macOS.patch | 35 -----------
...-rust-target-to-cargo-also-when-not-.patch | 47 +++++++++++++++
.../0001-Remove-non-reproducible-SRCDIR.patch | 30 ----------
...lib.rs-do-not-probe-into-harcoded-li.patch | 53 ++++++++++++++++
.../librsvg/librsvg/gtk-option.patch | 60 -------------------
.../{librsvg_2.40.21.bb => librsvg_2.52.0.bb} | 42 +++++++++----
6 files changed, 130 insertions(+), 137 deletions(-)
delete mode 100644 meta/recipes-gnome/librsvg/librsvg/0001-Auto-detect-Bsymbolic-fixes-configure-on-macOS.patch
create mode 100644 meta/recipes-gnome/librsvg/librsvg/0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.patch
delete mode 100644 meta/recipes-gnome/librsvg/librsvg/0001-Remove-non-reproducible-SRCDIR.patch
create mode 100644 meta/recipes-gnome/librsvg/librsvg/0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch
delete mode 100644 meta/recipes-gnome/librsvg/librsvg/gtk-option.patch
rename meta/recipes-gnome/librsvg/{librsvg_2.40.21.bb => librsvg_2.52.0.bb} (51%)meta/recipes-gnome/librsvg/librsvg/0001-Auto-detect-Bsymbolic-fixes-configure-on-macOS.patch deleted +0 -35
@@ -1,35 +0,0 @@ -From b99891e31eb6ce550e7e1cb2ca592095b3050a93 Mon Sep 17 00:00:00 2001 -From: Brion Vibber <[email protected]> -Date: Sun, 25 Feb 2018 18:42:36 -0800 -Subject: Auto-detect -Bsymbolic, fixes configure on macOS - -The -Bsymbolic linker option is ELF-specific, and was breaking -configure on macOS unless --disable-Bsymbolic was explicitly passed. - -Switching the behavior from requiring -Bsymbolic to be available -by default to just warning and continuing on without. - -Fixes https://gitlab.gnome.org/GNOME/librsvg/issues/211 - -Upstream-Status: Backport -Signed-off-by: Adrian Bunk <[email protected]> ---- - configure.ac | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 15b26b2d..9f8dce29 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -216,7 +216,7 @@ AM_CONDITIONAL([ENABLE_PIXBUF_LOADER],[test "$enable_pixbuf_loader" = "yes"]) - AC_ARG_ENABLE([Bsymbolic], - [AS_HELP_STRING([--disable-Bsymbolic], - [disable linking with -Bsymbolic])], -- [],[enable_Bsymbolic=yes]) -+ [enable_Bsymbolic=no],[enable_Bsymbolic=auto]) - - BSYMBOLIC_LDFLAG= - if test "$enable_Bsymbolic" != "no"; then --- -2.20.1 -
meta/recipes-gnome/librsvg/librsvg/0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.patch new file +47 -0
47 lines not on this page · raw message
meta/recipes-gnome/librsvg/librsvg/0001-Remove-non-reproducible-SRCDIR.patch deleted +0 -30
@@ -1,30 +0,0 @@ -From bea5156cd7e7122715b26c769c35928141a1da2c Mon Sep 17 00:00:00 2001 -From: Joshua Watt <[email protected]> -Date: Mon, 18 Nov 2019 14:46:34 -0600 -Subject: [PATCH] Remove non-reproducible SRCDIR - -Removes SRCDIR as the prefix for finding the test font. This wouldn't -work anyway, since that path is not present on the target. - -This patch is specific to OE, since it appears that this entire method -of testing was removed when upstream was re-written in rust - -Upstream-Status: Inappropriate [OE-specific, no longer present upstream] -Signed-off-by: Joshua Watt <[email protected]> ---- - rsvg-cairo-draw.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/rsvg-cairo-draw.c b/rsvg-cairo-draw.c -index caa9104..cfb7ed2 100644 ---- a/rsvg-cairo-draw.c -+++ b/rsvg-cairo-draw.c -@@ -398,7 +398,7 @@ set_font_options_for_testing (PangoContext *context) - static void - create_font_config_for_testing (RsvgCairoRender *render) - { -- const char *font_path = SRCDIR "/tests/resources/LiberationSans-Regular.ttf"; -+ const char *font_path = "/tests/resources/LiberationSans-Regular.ttf"; - - if (render->font_config_for_testing != NULL) - return;
meta/recipes-gnome/librsvg/librsvg/0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch new file +53 -0
53 lines not on this page · raw message
meta/recipes-gnome/librsvg/librsvg/gtk-option.patch deleted +0 -60
60 lines not on this page · raw message
meta/recipes-gnome/librsvg/librsvg_2.52.0.bb renamed from meta/recipes-gnome/librsvg/librsvg_2.40.21.bb +30 -12
62 lines not on this page · raw message
Signature · 1 line
2.20.1
PATCH 4/13 librsvg: do not enable nativesdk
In reply to Alexander KanavinFrom: Alexander Kanavin <[email protected]>
rust is not currently available for nativesdk builds:
WARNING: Nothing PROVIDES 'nativesdk-libstd-rs' (but virtual:nativesdk:/home/pokybuild/yocto-worker/a-full/build/meta/recipes-gnome/librsvg/librsvg_2.52.0.bb DEPENDS on or otherwise requires it). Close matches:
WARNING: Nothing PROVIDES 'virtual/nativesdk-x86_64-pokysdk-linux-rust' (but virtual:nativesdk:/home/pokybuild/yocto-worker/a-full/build/meta/recipes-gnome/librsvg/librsvg_2.52.0.bb DEPENDS on or otherwise requires it). Close matches:
--- meta/recipes-gnome/librsvg/librsvg_2.52.0.bb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-gnome/librsvg/librsvg_2.52.0.bb +1 -1
@@ -12,7 +12,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \ SECTION = "x11/utils" DEPENDS = "cairo gdk-pixbuf glib-2.0 libcroco libxml2 pango" -BBCLASSEXTEND = "native nativesdk" +BBCLASSEXTEND = "native" inherit gnomebase gtk-doc pixbufcache upstream-version-is-even gobject-introspection rust
Signature · 1 line
2.20.1
PATCH 5/13 librsvg: add backports to fix big endian targets (e.g. mips)
In reply to Alexander Kanavin--- ...GdkPixbufRGBA-start-naming-types-and.patch | 81 ++++++++++++++ .../librsvg/0002-New-ToPixel-trait.patch | 100 ++++++++++++++++++ .../librsvg/0003-New-ToCairoARGB-trait.patch | 81 ++++++++++++++ .../0004-impl-ToPixel-for-CairoARGB.patch | 49 +++++++++ meta/recipes-gnome/librsvg/librsvg_2.52.0.bb | 10 +- 5 files changed, 318 insertions(+), 3 deletions(-) create mode 100644 meta/recipes-gnome/librsvg/librsvg/0001-GdkPixbufRGBA-ToGdkPixbufRGBA-start-naming-types-and.patch create mode 100644 meta/recipes-gnome/librsvg/librsvg/0002-New-ToPixel-trait.patch create mode 100644 meta/recipes-gnome/librsvg/librsvg/0003-New-ToCairoARGB-trait.patch create mode 100644 meta/recipes-gnome/librsvg/librsvg/0004-impl-ToPixel-for-CairoARGB.patch
meta/recipes-gnome/librsvg/librsvg/0001-GdkPixbufRGBA-ToGdkPixbufRGBA-start-naming-types-and.patch new file +81 -0
@@ -0,0 +1,81 @@ +From c175ac8344aa465ffc2c2f3a9d02a7889f597f7f Mon Sep 17 00:00:00 2001 +From: Federico Mena Quintero <[email protected]> +Date: Tue, 21 Sep 2021 12:05:27 -0500 +Subject: [PATCH] GdkPixbufRGBA, ToGdkPixbufRGBA - start naming types and + conversion traits for pixel formats + +The code assumes that struct Pixel is always the layout that GdkPixbuf +uses. This is true right now, but is a hidden assumption. Let's +start giving better names to pixel formats. + +Part-of: <https://gitlab.gnome.org/GNOME/librsvg/-/merge_requests/592> +Upstream-Status: Backport +Signed-off-by: Alexander Kanavin <[email protected]> +--- + src/surface_utils/mod.rs | 23 +++++++++++++++++++++++ + src/surface_utils/shared_surface.rs | 4 ++-- + 2 files changed, 25 insertions(+), 2 deletions(-) + +diff --git a/src/surface_utils/mod.rs b/src/surface_utils/mod.rs +index 53bbd00bb..93d3b4f79 100644 +--- a/src/surface_utils/mod.rs ++++ b/src/surface_utils/mod.rs +@@ -22,6 +22,9 @@ use rgb::alt::ARGB8; + #[allow(clippy::upper_case_acronyms)] + pub type CairoARGB = ARGB8; + ++/// GdkPixbuf's endian-independent RGBA8 pixel layout. ++pub type GdkPixbufRGBA = rgb::RGBA8; ++ + /// Analogous to `rgb::FromSlice`, to convert from `[T]` to `[CairoARGB]` + #[allow(clippy::upper_case_acronyms)] + pub trait AsCairoARGB<T: Copy> { +@@ -57,6 +60,26 @@ pub enum EdgeMode { + None, + } + ++/// Trait to convert pixels in various formats to RGBA, for GdkPixbuf. ++/// ++/// GdkPixbuf unconditionally uses RGBA ordering regardless of endianness, ++/// but we need to convert to it from Cairo's endian-dependent 0xaarrggbb. ++pub trait ToGdkPixbufRGBA { ++ fn to_pixbuf_rgba(&self) -> GdkPixbufRGBA; ++} ++ ++impl ToGdkPixbufRGBA for Pixel { ++ #[inline] ++ fn to_pixbuf_rgba(&self) -> GdkPixbufRGBA { ++ GdkPixbufRGBA { ++ r: self.r, ++ g: self.g, ++ b: self.b, ++ a: self.a, ++ } ++ } ++} ++ + /// Extension methods for `cairo::ImageSurfaceData`. + pub trait ImageSurfaceDataExt: DerefMut<Target = [u8]> { + /// Sets the pixel at the given coordinates. Assumes the `ARgb32` format. +diff --git a/src/surface_utils/shared_surface.rs b/src/surface_utils/shared_surface.rs +index 9d3289230..476a6f776 100644 +--- a/src/surface_utils/shared_surface.rs ++++ b/src/surface_utils/shared_surface.rs +@@ -15,7 +15,7 @@ use crate::util::clamp; + + use super::{ + iterators::{PixelRectangle, Pixels}, +- AsCairoARGB, CairoARGB, EdgeMode, ImageSurfaceDataExt, Pixel, PixelOps, ++ AsCairoARGB, CairoARGB, EdgeMode, ImageSurfaceDataExt, Pixel, PixelOps, ToGdkPixbufRGBA, + }; + + /// Types of pixel data in a `ImageSurface`. +@@ -342,7 +342,7 @@ impl ImageSurface<Shared> { + .map(|row| row.as_rgba_mut()) + .zip(self.rows()) + .flat_map(|(dest_row, src_row)| src_row.iter().zip(dest_row.iter_mut())) +- .for_each(|(src, dest)| *dest = Pixel::from(*src).unpremultiply()); ++ .for_each(|(src, dest)| *dest = Pixel::from(*src).unpremultiply().to_pixbuf_rgba()); + + Some(pixbuf) + }
meta/recipes-gnome/librsvg/librsvg/0002-New-ToPixel-trait.patch new file +100 -0
100 lines not on this page · raw message
meta/recipes-gnome/librsvg/librsvg/0003-New-ToCairoARGB-trait.patch new file +81 -0
81 lines not on this page · raw message
meta/recipes-gnome/librsvg/librsvg/0004-impl-ToPixel-for-CairoARGB.patch new file +49 -0
49 lines not on this page · raw message
meta/recipes-gnome/librsvg/librsvg_2.52.0.bb +7 -3
@@ -16,9 +16,13 @@ BBCLASSEXTEND = "native" inherit gnomebase gtk-doc pixbufcache upstream-version-is-even gobject-introspection rust -SRC_URI += " file://0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.patch \ - file://0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch \ -" +SRC_URI += "file://0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.patch \ + file://0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch \ + file://0001-GdkPixbufRGBA-ToGdkPixbufRGBA-start-naming-types-and.patch \ + file://0002-New-ToPixel-trait.patch \ + file://0003-New-ToCairoARGB-trait.patch \ + file://0004-impl-ToPixel-for-CairoARGB.patch \ + " SRC_URI[archive.sha256sum] = "bd821fb3e16494b61f5185addd23b726b064f203122b3ab4b3d5d7a44e6bf393"
Signature · 1 line
2.20.1
PATCH 6/13 librsvg: use only the target architecture to determine availability of atomic primitives
In reply to Alexander KanavinThis eliminates the hardcoded list of rust targets which can't possibly include everything from OE universe.
--- ...check-only-the-architecture-not-the-.patch | 148 ++++++++++++++++++ meta/recipes-gnome/librsvg/librsvg_2.52.0.bb | 1 + 2 files changed, 149 insertions(+) create mode 100644 meta/recipes-gnome/librsvg/librsvg/0001-crossbeam-utils-check-only-the-architecture-not-the-.patch
meta/recipes-gnome/librsvg/librsvg/0001-crossbeam-utils-check-only-the-architecture-not-the-.patch new file +148 -0
@@ -0,0 +1,148 @@ +From 70557b217644901daaf9d8ef793f5e84c937762e Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +Date: Tue, 5 Oct 2021 23:41:59 +0200 +Subject: [PATCH] crossbeam-utils: check only the architecture, not the whole + target string + +There can be custom targets in use, and it's not possible to make a list +of them; for the check only the first item in the target string is actually +relevant (the architecture of the target). + +Upstream-Status: Pending [needs an upstream ticket and possibly a rework of list generator script] +Signed-off-by: Alexander Kanavin <[email protected]> +--- + vendor/crossbeam-utils/.cargo-checksum.json | 4 +- + vendor/crossbeam-utils/build.rs | 8 ++- + vendor/crossbeam-utils/no_atomic.rs | 78 ++++++++------------- + 3 files changed, 38 insertions(+), 52 deletions(-) + +diff --git a/vendor/crossbeam-utils/.cargo-checksum.json b/vendor/crossbeam-utils/.cargo-checksum.json +index 4ffc417..2d476df 100644 +--- a/vendor/crossbeam-utils/.cargo-checksum.json ++++ b/vendor/crossbeam-utils/.cargo-checksum.json +@@ -1 +1,3 @@ +-{"files":{"CHANGELOG.md":"5242f1740c65509c465c9a36326d344722facff5f5e58dd064f7b77806b83a46","Cargo.toml":"ac35a7b8ccb16f1ab256951576537aa4179a316c068929c2acef89e0adc12319","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"dfa9fbed47c344c134a63c84b7c0e4651baeac1554b7b3266d0e38643743fc33","benches/atomic_cell.rs":"c927eb3cd1e5ecc4b91adbc3bde98af15ffab4086190792ba64d5cde0e24df3d","build.rs":"68cfc4be02429834a19411fba29cb1cb52c841f03ac8104d1bae59a8b2184f9c","no_atomic.rs":"a2621c1b029c614fb0ab8e3f5cda2e839df88d90d26133181c1b901965f7eec4","src/atomic/atomic_cell.rs":"1a3a1e073340317b5ce7a94e29c6a87db89ff7e00da6b92cb3c0339364c3b084","src/atomic/consume.rs":"7a7736fcd64f6473dfea7653559ffc5e1a2a234df43835f8aa8734862145ac15","src/atomic/mod.rs":"7f6afd5bd0da1f7b51765ab04da4e5f683588ac2d23506e61bf7007bb1e61ba2","src/atomic/seq_lock.rs":"27182e6b87a9db73c5f6831759f8625f9fcdec3c2828204c444aef04f427735a","src/atomic/seq_lock_wide.rs":"9888dd03116bb89ca36d4ab8d5a0b5032107a2983a7eb8024454263b09080088","src/backoff.rs":"7cc7754e15f69b52e92a70d4f49d1bc274693455a0933a2d7eb0605806566af3","src/cache_padded.rs":"6a512698115ad0d5a5b163dbd7a83247e1f1c146c4a30f3fc74b952e3b767b59","src/lib.rs":"6f1bcf157abe06ad8458a53e865bf8efab9fad4a9424790147cee8fefb3795d8","src/sync/mod.rs":"59986f559a8f170a4b3247ab2eea2460b09809d87c8110ed88e4e7103d3519dc","src/sync/parker.rs":"ba8f75bff31b8be9275808e8f393e71cc682dfc1109ceccb12f69a3700cff5be","src/sync/sharded_lock.rs":"14be659744918d0b27db24c56b41c618b0f0484b6761da46561023d96c4c120f","src/sync/wait_group.rs":"32e946a7581c55f8aa9904527b92b177c538fa0cf7cbcfa1d1f25990582cb6ea","src/thread.rs":"0eb5ec1d3c1b40600d88eb70539d14276e32307f5bed2b679f50f6a20777a01e","tests/atomic_cell.rs":"6c9453384ecbbe76f8b97b62f022d478d3a76b4eae1e960f49790970f5d52158","tests/cache_padded.rs":"1bfaff8354c8184e1ee1f902881ca9400b60effb273b0d3f752801a483d2b66d","tests/parker.rs":"6def4721287d9d70b1cfd63ebb34e1c83fbb3376edbad2bc8aac6ef69dd99d20","tests/sharded_lock.rs":"726025ce6351fb56ed629d5a56bdf6e833b7afc5dedfa08de0b056c726b6c26d","tests/thread.rs":"9a7d7d3028c552fd834c68598b04a1cc252a816bc20ab62cec060d6cd09cab10","tests/wait_group.rs":"ad8f0cdfed31f9594a2e0737234d418f8b924d784a4db8d7e469deab8c95f5f8"},"package":"d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db"} +\ No newline at end of file ++{"files":{"CHANGELOG.md":"5242f1740c65509c465c9a36326d344722facff5f5e58dd064f7b77806b83a46","Cargo.toml":"ac35a7b8ccb16f1ab256951576537aa4179a316c068929c2acef89e0adc12319","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"5734ed989dfca1f625b40281ee9f4530f91b2411ec01cb748223e7eb87e201ab","README.md":"dfa9fbed47c344c134a63c84b7c0e4651baeac1554b7b3266d0e38643743fc33","benches/atomic_cell.rs":"c927eb3cd1e5ecc4b91adbc3bde98af15ffab4086190792ba64d5cde0e24df3d", ++"build.rs":"15c1a41a88373231cbc17c7de5ade07c6098455af9cdeef81b576f37ed923354", ++"no_atomic.rs":"fda07862ab8c3ac999b58b494fa963e4024a0979037f4c37cf2069d78ab6e5ba","src/atomic/atomic_cell.rs":"1a3a1e073340317b5ce7a94e29c6a87db89ff7e00da6b92cb3c0339364c3b084","src/atomic/consume.rs":"7a7736fcd64f6473dfea7653559ffc5e1a2a234df43835f8aa8734862145ac15","src/atomic/mod.rs":"7f6afd5bd0da1f7b51765ab04da4e5f683588ac2d23506e61bf7007bb1e61ba2","src/atomic/seq_lock.rs":"27182e6b87a9db73c5f6831759f8625f9fcdec3c2828204c444aef04f427735a","src/atomic/seq_lock_wide.rs":"9888dd03116bb89ca36d4ab8d5a0b5032107a2983a7eb8024454263b09080088","src/backoff.rs":"7cc7754e15f69b52e92a70d4f49d1bc274693455a0933a2d7eb0605806566af3","src/cache_padded.rs":"6a512698115ad0d5a5b163dbd7a83247e1f1c146c4a30f3fc74b952e3b767b59","src/lib.rs":"6f1bcf157abe06ad8458a53e865bf8efab9fad4a9424790147cee8fefb3795d8","src/sync/mod.rs":"59986f559a8f170a4b3247ab2eea2460b09809d87c8110ed88e4e7103d3519dc","src/sync/parker.rs":"ba8f75bff31b8be9275808e8f393e71cc682dfc1109ceccb12f69a3700cff5be","src/sync/sharded_lock.rs":"14be659744918d0b27db24c56b41c618b0f0484b6761da46561023d96c4c120f","src/sync/wait_group.rs":"32e946a7581c55f8aa9904527b92b177c538fa0cf7cbcfa1d1f25990582cb6ea","src/thread.rs":"0eb5ec1d3c1b40600d88eb70539d14276e32307f5bed2b679f50f6a20777a01e","tests/atomic_cell.rs":"6c9453384ecbbe76f8b97b62f022d478d3a76b4eae1e960f49790970f5d52158","tests/cache_padded.rs":"1bfaff8354c8184e1ee1f902881ca9400b60effb273b0d3f752801a483d2b66d","tests/parker.rs":"6def4721287d9d70b1cfd63ebb34e1c83fbb3376edbad2bc8aac6ef69dd99d20","tests/sharded_lock.rs":"726025ce6351fb56ed629d5a56bdf6e833b7afc5dedfa08de0b056c726b6c26d","tests/thread.rs":"9a7d7d3028c552fd834c68598b04a1cc252a816bc20ab62cec060d6cd09cab10","tests/wait_group.rs":"ad8f0cdfed31f9594a2e0737234d418f8b924d784a4db8d7e469deab8c95f5f8"},"package":"d82cfc11ce7f2c3faef78d8a684447b40d503d9681acebed6cb728d45940c4db"} +diff --git a/vendor/crossbeam-utils/build.rs b/vendor/crossbeam-utils/build.rs +index 9c924ad..e97953c 100644 +--- a/vendor/crossbeam-utils/build.rs ++++ b/vendor/crossbeam-utils/build.rs +@@ -20,17 +20,19 @@ fn main() { + } + }; + ++ let target_arch = target.split('-').next().unwrap_or_default(); ++ + // Note that this is `no_*`, not `has_*`. This allows treating + // `cfg(target_has_atomic = "ptr")` as true when the build script doesn't + // run. This is needed for compatibility with non-cargo build systems that + // don't run the build script. +- if NO_ATOMIC_CAS.contains(&&*target) { ++ if NO_ATOMIC_CAS.contains(&&*target_arch) { + println!("cargo:rustc-cfg=crossbeam_no_atomic_cas"); + } +- if NO_ATOMIC.contains(&&*target) { ++ if NO_ATOMIC.contains(&&*target_arch) { + println!("cargo:rustc-cfg=crossbeam_no_atomic"); + println!("cargo:rustc-cfg=crossbeam_no_atomic_64"); +- } else if NO_ATOMIC_64.contains(&&*target) { ++ } else if NO_ATOMIC_64.contains(&&*target_arch) { + println!("cargo:rustc-cfg=crossbeam_no_atomic_64"); + } else { + // Otherwise, assuming `"max-atomic-width" == 64`. +diff --git a/vendor/crossbeam-utils/no_atomic.rs b/vendor/crossbeam-utils/no_atomic.rs +index 522b3b8..8096630 100644 +--- a/vendor/crossbeam-utils/no_atomic.rs ++++ b/vendor/crossbeam-utils/no_atomic.rs +@@ -2,58 +2,40 @@ + // It is not intended for manual editing. + + const NO_ATOMIC_CAS: &[&str] = &[ +- "avr-unknown-gnu-atmega328", +- "msp430-none-elf", +- "riscv32i-unknown-none-elf", +- "riscv32imc-unknown-none-elf", +- "thumbv4t-none-eabi", +- "thumbv6m-none-eabi", ++ "avr", ++ "msp430", ++ "riscv32i", ++ "riscv32imc", ++ "thumbv4t", ++ "thumbv6m", + ]; + #[allow(dead_code)] + const NO_ATOMIC_64: &[&str] = &[ +- "arm-linux-androideabi", +- "armebv7r-none-eabi", +- "armebv7r-none-eabihf", +- "armv4t-unknown-linux-gnueabi", +- "armv5te-unknown-linux-gnueabi", +- "armv5te-unknown-linux-musleabi", +- "armv5te-unknown-linux-uclibceabi", +- "armv7r-none-eabi", +- "armv7r-none-eabihf", +- "hexagon-unknown-linux-musl", +- "mips-unknown-linux-gnu", +- "mips-unknown-linux-musl", +- "mips-unknown-linux-uclibc", +- "mipsel-unknown-linux-gnu", +- "mipsel-unknown-linux-musl", +- "mipsel-unknown-linux-uclibc", +- "mipsel-unknown-none", +- "mipsisa32r6-unknown-linux-gnu", +- "mipsisa32r6el-unknown-linux-gnu", +- "powerpc-unknown-linux-gnu", +- "powerpc-unknown-linux-gnuspe", +- "powerpc-unknown-linux-musl", +- "powerpc-unknown-netbsd", +- "powerpc-unknown-openbsd", +- "powerpc-wrs-vxworks", +- "powerpc-wrs-vxworks-spe", +- "riscv32gc-unknown-linux-gnu", +- "riscv32gc-unknown-linux-musl", +- "riscv32imac-unknown-none-elf", +- "thumbv7em-none-eabi", +- "thumbv7em-none-eabihf", +- "thumbv7m-none-eabi", +- "thumbv8m.base-none-eabi", +- "thumbv8m.main-none-eabi", +- "thumbv8m.main-none-eabihf", +- "mipsel-sony-psp", +- "thumbv4t-none-eabi", +- "thumbv6m-none-eabi", ++ "arm", ++ "armebv7r", ++ "armv4t", ++ "armv5te", ++ "armv7r", ++ "hexagon", ++ "mips", ++ "mipsel", ++ "mipsisa32r6", ++ "mipsisa32r6el", ++ "powerpc", ++ "riscv32gc", ++ "riscv32imac", ++ "thumbv7em", ++ "thumbv7m", ++ "thumbv8m.base", ++ "thumbv8m.main", ++ "mipsel", ++ "thumbv4t", ++ "thumbv6m", + ]; + #[allow(dead_code)] + const NO_ATOMIC: &[&str] = &[ +- "avr-unknown-gnu-atmega328", +- "msp430-none-elf", +- "riscv32i-unknown-none-elf", +- "riscv32imc-unknown-none-elf", ++ "avr", ++ "msp430", ++ "riscv32i", ++ "riscv32imc", + ];
meta/recipes-gnome/librsvg/librsvg_2.52.0.bb +1 -0
@@ -22,6 +22,7 @@ SRC_URI += "file://0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.pat file://0002-New-ToPixel-trait.patch \ file://0003-New-ToCairoARGB-trait.patch \ file://0004-impl-ToPixel-for-CairoARGB.patch \ + file://0001-crossbeam-utils-check-only-the-architecture-not-the-.patch \ " SRC_URI[archive.sha256sum] = "bd821fb3e16494b61f5185addd23b726b064f203122b3ab4b3d5d7a44e6bf393"
Signature · 1 line
2.20.1
PATCH 7/13 librsvg: restore reproducibility
In reply to Alexander Kanavin--- ...ps-sort-dependencies-before-using-th.patch | 53 +++++++++++++++++++ meta/recipes-gnome/librsvg/librsvg_2.52.0.bb | 1 + 2 files changed, 54 insertions(+) create mode 100644 meta/recipes-gnome/librsvg/librsvg/0001-vendor-system-deps-sort-dependencies-before-using-th.patch
meta/recipes-gnome/librsvg/librsvg/0001-vendor-system-deps-sort-dependencies-before-using-th.patch new file +53 -0
@@ -0,0 +1,53 @@ +From 9c20757ef8055535579ca3b7e69834e6917200e2 Mon Sep 17 00:00:00 2001 +From: Alexander Kanavin <[email protected]> +Date: Fri, 24 Sep 2021 16:20:40 +0200 +Subject: [PATCH] vendor/system-deps: sort dependencies before using them + +Otherwise they come out in non-reproducible order, leaking into +target binaries. + +Upstream-Status: Pending +Signed-off-by: Alexander Kanavin <[email protected]> + + +Signed-off-by: Alexander Kanavin <[email protected]> +--- + vendor/system-deps/.cargo-checksum.json | 3 ++- + vendor/system-deps/src/lib.rs | 6 +++--- + 2 files changed, 5 insertions(+), 4 deletions(-) + +diff --git a/vendor/system-deps/.cargo-checksum.json b/vendor/system-deps/.cargo-checksum.json +index aae6cb9..73155dc 100644 +--- a/vendor/system-deps/.cargo-checksum.json ++++ b/vendor/system-deps/.cargo-checksum.json +@@ -1 +1,2 @@ +-{"files":{"Cargo.toml":"56ab5070dc9019b039c5e9904bb466b0879c33a7f69dd030b97abab321b7cc04","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae","src/lib.rs":"594e5f14180590adc9ea0a8ba1cc35f9a8a260322d08de3037efac3ce1dc729b","src/metadata.rs":"4c8d6ac2c88646a5b97ecb50ed44b65e5b2865cce6897add85b29ca2ae08c2bb","src/test.rs":"1ec48d1e443a0a4ac8035a2b60ff0321543aa2fa998fee72cf7762a936bf5f8c","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"480c269f870722b3b08d2f13053ce0c2ab722839f472863c3e2d61ff3a1c2fa6"} ++{"files":{"Cargo.toml":"56ab5070dc9019b039c5e9904bb466b0879c33a7f69dd030b97abab321b7cc04","LICENSE-APACHE":"a60eea817514531668d7e00765731449fe14d059d3249e0bc93b36de45f759f2","LICENSE-MIT":"23f18e03dc49df91622fe2a76176497404e46ced8a715d9d2b67a7446571cca3","README.md":"3fe7396637bf9233908f41c6001cfcb00a379225e06e36e508c8b3d7264a8aae", ++"src/lib.rs":"d88593afdcb0cc3765bf427913ebb718ac6dcd9d62d1381d9afe44dddef3abbf","src/metadata.rs":"4c8d6ac2c88646a5b97ecb50ed44b65e5b2865cce6897add85b29ca2ae08c2bb","src/test.rs":"1ec48d1e443a0a4ac8035a2b60ff0321543aa2fa998fee72cf7762a936bf5f8c","src/tests/testanotherlib.pc":"bb4fd942324e6d49ce3becd827aa5c948d1924ca6681904a3695c19b1424eb3c","src/tests/testdata.pc":"43f481e989c03674fed5ef78c6420b3f8d36a2ce001928d86c418d1844acd5e7","src/tests/testlib-2.0.pc":"152eb0c70c14c3d948118408f3d1fd3bb7531b02aa792db85bd957f7db90b45b","src/tests/testlib-3.0.pc":"cd39c2ef88f6828c9291150cc4b624e769abef484674eaebaa4f67979501315f","src/tests/testlib.pc":"75c0d8a5345f65794f583c83e1cf0dbf3385af6e6abea1d61bb86eef707a52db","src/tests/toml-missing-file/no-cargo-toml-here":"6ab4da4b56f15315df6538610cfcd2ba3d0f9a7a8414678ff00ab5a78f7d41fa"},"package":"480c269f870722b3b08d2f13053ce0c2ab722839f472863c3e2d61ff3a1c2fa6"} +diff --git a/vendor/system-deps/src/lib.rs b/vendor/system-deps/src/lib.rs +index af14348..5f0682e 100644 +--- a/vendor/system-deps/src/lib.rs ++++ b/vendor/system-deps/src/lib.rs +@@ -242,11 +242,11 @@ impl Dependencies { + self.libs.get(name) + } + +- /// An iterator visiting all system dependencies in arbitrary order. ++ /// An iterator visiting all system dependencies in sorted (for build reproducibility) order. + /// The first element of the tuple is the name of the `toml` key defining the + /// dependency in `Cargo.toml`. + pub fn iter(&self) -> impl Iterator<Item = (&str, &Library)> { +- self.libs.iter().map(|(k, v)| (k.as_str(), v)) ++ self.libs.iter().map(|(k, v)| (k.as_str(), v)).sorted_by_key(|x| x.0) + } + + fn aggregate_str<F: Fn(&Library) -> &Vec<String>>( +@@ -338,7 +338,7 @@ impl Dependencies { + let mut flags = BuildFlags::new(); + let mut include_paths = Vec::new(); + +- for (name, lib) in self.libs.iter() { ++ for (name, lib) in self.libs.iter().sorted_by_key(|x| x.0) { + include_paths.extend(lib.include_paths.clone()); + + if lib.source == Source::EnvVariables
meta/recipes-gnome/librsvg/librsvg_2.52.0.bb +1 -0
@@ -23,6 +23,7 @@ SRC_URI += "file://0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.pat file://0003-New-ToCairoARGB-trait.patch \ file://0004-impl-ToPixel-for-CairoARGB.patch \ file://0001-crossbeam-utils-check-only-the-architecture-not-the-.patch \ + file://0001-vendor-system-deps-sort-dependencies-before-using-th.patch \ " SRC_URI[archive.sha256sum] = "bd821fb3e16494b61f5185addd23b726b064f203122b3ab4b3d5d7a44e6bf393"
Signature · 1 line
2.20.1
PATCH 8/13 adwaita-icon-theme: update 3.34/38 -> 41.0
In reply to Alexander KanavinThe original reason to pin the version (outdated librsvg) no longer applies.
---
meta/conf/distro/include/default-versions.inc | 2 -
...1-Don-t-use-AC_CANONICAL_HOST-3.34.3.patch | 27 ------------
.../0001-Don-t-use-AC_CANONICAL_HOST.patch | 6 +--
...-installation-commands-as-shell-jobs.patch | 24 +++++------
.../gnome/adwaita-icon-theme_3.34.3.bb | 43 -------------------
...e_3.38.0.bb => adwaita-icon-theme_41.0.bb} | 7 ++-
6 files changed, 17 insertions(+), 92 deletions(-)
delete mode 100644 meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST-3.34.3.patch
delete mode 100644 meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb
rename meta/recipes-gnome/gnome/{adwaita-icon-theme_3.38.0.bb => adwaita-icon-theme_41.0.bb} (87%)meta/conf/distro/include/default-versions.inc +0 -2
@@ -1,5 +1,3 @@ # # Default preferred versions # - -PREFERRED_VERSION_adwaita-icon-theme ?= "3.34.3"
meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST-3.34.3.patch deleted +0 -27
@@ -1,27 +0,0 @@ -From 8b3b153b6b95662316528ef083365b46cf5f7841 Mon Sep 17 00:00:00 2001 -From: Jussi Kukkonen <[email protected]> -Date: Tue, 30 May 2017 14:55:49 +0300 -Subject: [PATCH] Don't use AC_CANONICAL_HOST - -This won't work when building allarch (and is only used to find out if -target is windows). - -Upstream-Status: Inappropriate [embedded specific] -Signed-off-by: Jussi Kukkonen <[email protected]> - ---- - configure.ac | 1 - - 1 file changed, 1 deletion(-) - -diff --git a/configure.ac b/configure.ac -index 449865d..888649e 100644 ---- a/configure.ac -+++ b/configure.ac -@@ -3,7 +3,6 @@ AC_PREREQ(2.53) - - AC_INIT([adwaita-icon-theme], [3.34.3], - [http://bugzilla.gnome.org/enter_bug.cgi?product=adwaita-icon-theme]) --AC_CANONICAL_HOST - AC_CONFIG_MACRO_DIR([m4]) - AC_CONFIG_SRCDIR([index.theme.in]) -
meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Don-t-use-AC_CANONICAL_HOST.patch +3 -3
@@ -1,4 +1,4 @@ -From 8b3b153b6b95662316528ef083365b46cf5f7841 Mon Sep 17 00:00:00 2001 +From 63d97fefdbc90f5c68f67bdc30844776d9a1b720 Mon Sep 17 00:00:00 2001 From: Jussi Kukkonen <[email protected]> Date: Tue, 30 May 2017 14:55:49 +0300 Subject: [PATCH] Don't use AC_CANONICAL_HOST
@@ -14,12 +14,12 @@ Signed-off-by: Jussi Kukkonen <[email protected]> 1 file changed, 1 deletion(-) diff --git a/configure.ac b/configure.ac -index 449865d..888649e 100644 +index f2659a5..1e8b016 100644 --- a/configure.ac +++ b/configure.ac @@ -3,7 +3,6 @@ AC_PREREQ(2.53) - AC_INIT([adwaita-icon-theme], [3.38.0], + AC_INIT([adwaita-icon-theme], [41.0], [http://bugzilla.gnome.org/enter_bug.cgi?product=adwaita-icon-theme]) -AC_CANONICAL_HOST AC_CONFIG_MACRO_DIR([m4])
meta/recipes-gnome/gnome/adwaita-icon-theme/0001-Run-installation-commands-as-shell-jobs.patch +11 -13
@@ -1,4 +1,4 @@ -From 8dcd73b45a660dbdc560676835ba46f495334f14 Mon Sep 17 00:00:00 2001 +From 79da031e9811f3eef34b14cce419be93fea34319 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <[email protected]> Date: Tue, 13 Jun 2017 18:10:06 +0300 Subject: [PATCH] Run installation commands as shell jobs
@@ -7,14 +7,15 @@ This greatly speeds up installation time on multi-core systems. Upstream-Status: Pending Signed-off-by: Alexander Kanavin <[email protected]> + --- - src/fullcolor/Makefile.am | 3 ++- - src/spinner/Makefile.am | 5 +++-- - src/symbolic/Makefile.am | 7 ++++--- - 3 files changed, 9 insertions(+), 6 deletions(-) + src/fullcolor/Makefile.am | 5 +++-- + src/spinner/Makefile.am | 7 ++++--- + src/symbolic/Makefile.am | 11 ++++++----- + 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/src/fullcolor/Makefile.am b/src/fullcolor/Makefile.am -index 1c940a5..3998ee6 100644 +index d73529b..b7d0808 100644 --- a/src/fullcolor/Makefile.am +++ b/src/fullcolor/Makefile.am @@ -9,9 +9,10 @@ install-data-local:
@@ -31,7 +32,7 @@ index 1c940a5..3998ee6 100644 ## FIXME we should add a way to remove links generated by icon mapping uninstall-local: diff --git a/src/spinner/Makefile.am b/src/spinner/Makefile.am -index 86f4d7c..3fae8c1 100644 +index c14caf6..322dc0d 100644 --- a/src/spinner/Makefile.am +++ b/src/spinner/Makefile.am @@ -24,13 +24,14 @@ install-data-local:
@@ -45,18 +46,18 @@ index 86f4d7c..3fae8c1 100644 context="`dirname $$file`"; \ $(mkdir_p) $(DESTDIR)$(themedir)/scalable-up-to-32/$$context; \ - $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32/$$file $(DESTDIR)$(themedir)/scalable-up-to-32/$$file; \ -+ $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32/$$file $(DESTDIR)$(themedir)/scalable-up-to-32/$$file & \ - done ++ $(install_sh_DATA) $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32/$$file $(DESTDIR)$(themedir)/scalable-up-to-32/$$file & \ + done; \ + wait uninstall-local: for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable-up-to-32; find . -name "*.svg"`; do \ diff --git a/src/symbolic/Makefile.am b/src/symbolic/Makefile.am -index 24aac9b..61ba071 100644 +index 957c0ee..e1f8818 100644 --- a/src/symbolic/Makefile.am +++ b/src/symbolic/Makefile.am -@@ -25,18 +25,19 @@ install-data-local: +@@ -34,18 +34,19 @@ install-data-local: for file in `cd $(top_srcdir)/$(SVGOUTDIR)/$$size; find . -name "*.png"`; do \ context="`dirname $$file`"; \ $(mkdir_p) $(DESTDIR)$(themedir)/$$size/$$context; \
@@ -81,6 +82,3 @@ index 24aac9b..61ba071 100644 uninstall-local: for file in `cd $(top_srcdir)/$(SVGOUTDIR)/scalable; find . -name "*.svg"`; do \ --- -2.11.0 -
meta/recipes-gnome/gnome/adwaita-icon-theme_3.34.3.bb deleted +0 -43
43 lines not on this page · raw message
meta/recipes-gnome/gnome/adwaita-icon-theme_41.0.bb renamed from meta/recipes-gnome/gnome/adwaita-icon-theme_3.38.0.bb +3 -4
@@ -10,15 +10,14 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=c84cac88e46fc07647ea07e6c24eeb7c \ file://COPYING_CCBYSA3;md5=96143d33de3a79321b1006c4e8ed07e7 \ file://COPYING_LGPL;md5=e6a600fd5e1d9cbde2d983680233ad02" -inherit allarch autotools pkgconfig gettext gtk-icon-cache +inherit allarch autotools pkgconfig gettext gtk-icon-cache gnomebase -MAJ_VER = "${@oe.utils.trim_version("${PV}", 2)}" -SRC_URI = "${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz \ +SRC_URI += " \ file://0001-Don-t-use-AC_CANONICAL_HOST.patch \ file://0001-Run-installation-commands-as-shell-jobs.patch \ " -SRC_URI[sha256sum] = "6683a1aaf2430ccd9ea638dd4bfe1002bc92b412050c3dba20e480f979faaf97" +SRC_URI[archive.sha256sum] = "ef5339d8c35fcad5d10481b70480803f0fa20b3d3cbc339238fcaceeaee01eba" DEPENDS += "librsvg-native"
Signature · 1 line
2.20.1
PATCH 9/13 gstreamer1.0-plugins-bad: disable rsvg on x32
In reply to Alexander Kanavinlibrsvg throws:
| error[E0080]: erroneous constant used
| --> /home/alex/development/poky/build-x32/tmp/work/x86_64_x32-poky-linux-gnux32/librsvg/2.52.0-r0/librsvg-2.52.0/vendor/thin-slice/src/lib.rs:111:25
| |
| 111 | } else if len < TAG_LIMIT {
| |--- .../gstreamer/gstreamer1.0-plugins-bad_1.18.4.bb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-multimedia/gstreamer/gstreamer1.0-plugins-bad_1.18.4.bb +2 -1
@@ -28,8 +28,9 @@ PACKAGECONFIG ??= " \ ${@bb.utils.filter('DISTRO_FEATURES', 'directfb vulkan', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)} \ ${@bb.utils.contains('DISTRO_FEATURES', 'opengl', 'gl', '', d)} \ - bz2 closedcaption curl dash dtls hls openssl rsvg sbc smoothstreaming \ + bz2 closedcaption curl dash dtls hls openssl sbc smoothstreaming \ sndfile ttml uvch264 webp \ + ${@bb.utils.contains('TUNE_FEATURES', 'mx32', '', 'rsvg', d)} \ " PACKAGECONFIG[aom] = "-Daom=enabled,-Daom=disabled,aom"
Signature · 1 line
2.20.1
PATCH 10/13 rust/cargo: exclude UNINATIVE_LOADER from task signature
In reply to Alexander Kanavin--- meta/recipes-devtools/cargo/cargo.inc | 2 ++ meta/recipes-devtools/rust/rust.inc | 1 + 2 files changed, 3 insertions(+)
meta/recipes-devtools/cargo/cargo.inc +2 -0
@@ -29,6 +29,8 @@ do_cargo_setup_snapshot () { addtask cargo_setup_snapshot after do_unpack before do_configure do_cargo_setup_snapshot[dirs] += "${WORKDIR}/${CARGO_SNAPSHOT}" +do_cargo_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER" + do_compile:prepend () { export RUSTC_BOOTSTRAP="1"
meta/recipes-devtools/rust/rust.inc +1 -0
@@ -61,6 +61,7 @@ do_rust_setup_snapshot () { } addtask rust_setup_snapshot after do_unpack before do_configure do_rust_setup_snapshot[dirs] += "${WORKDIR}/rust-snapshot" +do_rust_setup_snapshot[vardepsexclude] += "UNINATIVE_LOADER" python do_configure() { import json
Signature · 1 line
2.20.1
PATCH 11/13 rust-common.bbclass: rewrite toolchain wrappers in (native) python
In reply to Alexander Kanavinlibrsvg on centos 7 and friends exhibits the same libtinfo leakage problem, this time coming from the compiler and not the linker. Simply covering the compiler by the existing C wrapper-of-wrapper does not work, as rust-native builds put Important Stuff into LD_LIBRARY_PATH and unsetting it breaks things badly.
Rather than try to figure out which combination of wrappers and LD_LIBRARY_PATH settings works for which situation, or provide some kind of sh-native, let's simply use python3-native for the wrappers, which should insulate builds from the the host shell. rust-native already depends on python3-native, so this does not lengthen the builds.
This also reverts:
rust-common: Hack around LD_LIBRARY_PATH issues on centos7 (commit 63b1fd2226b5f146d6c853cc57417704df378438).
I'd also like to say boo to Red Hat (or GNU?) for breaking ABI compatibility for stat() in glibc 2.33, we ended up sorting this mess because of it.
--- meta/classes/rust-common.bbclass | 15 ++++++++------- meta/files/rust-ccld-wrapper.c | 29 ----------------------------- 2 files changed, 8 insertions(+), 36 deletions(-) delete mode 100644 meta/files/rust-ccld-wrapper.c
meta/classes/rust-common.bbclass +8 -7
@@ -1,3 +1,5 @@ +inherit python3native + # Common variables used by all Rust builds export rustlibdir = "${libdir}/rust" FILES:${PN} += "${rustlibdir}/*.so"
@@ -133,8 +135,12 @@ create_wrapper () { shift cat <<- EOF > "${file}" - #!/bin/sh - exec $@ "\$@" + #!/usr/bin/env python3 + import os, sys + orig_binary = "$@" + binary = orig_binary.split()[0] + args = orig_binary.split() + sys.argv[1:] + os.execvp(binary, args) EOF chmod +x "${file}" }
@@ -169,11 +175,6 @@ do_rust_create_wrappers () { # Yocto Target / Rust Target archiver create_wrapper "${RUST_TARGET_AR}" "${WRAPPER_TARGET_AR}" - # Need to filter out LD_LIBRARY_PATH from the linker without using shell - mv ${RUST_BUILD_CCLD} ${RUST_BUILD_CCLD}.real - ${BUILD_CC} ${COREBASE}/meta/files/rust-ccld-wrapper.c -o ${RUST_BUILD_CCLD} - mv ${RUST_TARGET_CCLD} ${RUST_TARGET_CCLD}.real - ${BUILD_CC} ${COREBASE}/meta/files/rust-ccld-wrapper.c -o ${RUST_TARGET_CCLD} } addtask rust_create_wrappers before do_configure after do_patch do_prepare_recipe_sysroot
meta/files/rust-ccld-wrapper.c deleted +0 -29
@@ -1,29 +0,0 @@ -/* -* Copyright 2021 Richard Purdie -* -* SPDX-License-Identifier: GPL-2.0-only -*/ - -#include <errno.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <unistd.h> - -/* -* Run the original script (argv[0] + ".real") with LD_LIBRARY_PATH unset -* This avoids issues where cargo is running a wrapper script using /bin/sh from the host -* which links to something which has an incompatible version in in recipe-sysroot-native -* such as libtinfo on centos 7. -*/ - -int main (int argc,char * argv[]) { -char *real =malloc (strlen (argv[0 ] +5 )); -strcpy (real, argv[0 ]); -strcpy (real +strlen (argv[0 ]),".real" ); -putenv ("LD_LIBRARY_PATH=" ); -if (execv (real, argv) ==-1 ) { -printf ("Wrapper failed to execute, error: %s\n" ,strerror (errno)); -return -1 ; - } -}
Signature · 1 line
2.20.1
PATCH 12/13 rust: do not write ar into target json definitions
In reply to Alexander Kanavinlatest rust does not use it and prints a ton of warnings because of it.
--- meta/recipes-devtools/rust/rust-common.inc | 1 - 1 file changed, 1 deletion(-)
meta/recipes-devtools/rust/rust-common.inc +0 -1
@@ -321,7 +321,6 @@ def rust_gen_target(d, thing, wd, features, cpu, arch): tspec['vendor'] = "unknown" tspec['target-family'] = "unix" tspec['linker'] = "{}{}gcc".format(d.getVar('CCACHE'), prefix) - tspec['ar'] = "{}ar".format(prefix) tspec['cpu'] = cpu if features != "": tspec['features'] = features
Signature · 1 line
2.20.1
PATCH 13/13 rust: generate target definitions from (arch, abi), not just arch
In reply to Alexander KanavinThis allows to add the missing x32 definition and others in the future.
--- meta/recipes-devtools/rust/rust-common.inc | 57 +++++++++++++--------- meta/recipes-devtools/rust/rust-cross.inc | 4 +- 2 files changed, 38 insertions(+), 23 deletions(-)
meta/recipes-devtools/rust/rust-common.inc +35 -22
@@ -119,22 +119,22 @@ def llvm_features(d): ## arm-unknown-linux-gnueabihf -DATA_LAYOUT[arm] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" -LLVM_TARGET[arm] = "${RUST_TARGET_SYS}" -TARGET_ENDIAN[arm] = "little" -TARGET_POINTER_WIDTH[arm] = "32" -TARGET_C_INT_WIDTH[arm] = "32" -MAX_ATOMIC_WIDTH[arm] = "64" -FEATURES[arm] = "+v6,+vfp2" +DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" +LLVM_TARGET[arm-eabi] = "${RUST_TARGET_SYS}" +TARGET_ENDIAN[arm-eabi] = "little" +TARGET_POINTER_WIDTH[arm-eabi] = "32" +TARGET_C_INT_WIDTH[arm-eabi] = "32" +MAX_ATOMIC_WIDTH[arm-eabi] = "64" +FEATURES[arm-eabi] = "+v6,+vfp2" ## armv7-unknown-linux-gnueabihf -DATA_LAYOUT[armv7] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" -LLVM_TARGET[armv7] = "${RUST_TARGET_SYS}" -TARGET_ENDIAN[armv7] = "little" -TARGET_POINTER_WIDTH[armv7] = "32" -TARGET_C_INT_WIDTH[armv7] = "32" -MAX_ATOMIC_WIDTH[armv7] = "64" -FEATURES[armv7] = "+v7,+vfp2,+thumb2" +DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" +LLVM_TARGET[armv7-eabi] = "${RUST_TARGET_SYS}" +TARGET_ENDIAN[armv7-eabi] = "little" +TARGET_POINTER_WIDTH[armv7-eabi] = "32" +TARGET_C_INT_WIDTH[armv7-eabi] = "32" +MAX_ATOMIC_WIDTH[armv7-eabi] = "64" +FEATURES[armv7-eabi] = "+v7,+vfp2,+thumb2" ## aarch64-unknown-linux-{gnu, musl} DATA_LAYOUT[aarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"
@@ -152,6 +152,14 @@ TARGET_POINTER_WIDTH[x86_64] = "64" TARGET_C_INT_WIDTH[x86_64] = "32" MAX_ATOMIC_WIDTH[x86_64] = "64" +## x86_64-unknown-linux-gnux32 +DATA_LAYOUT[x86_64-x32] = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +LLVM_TARGET[x86_64-x32] = "${RUST_TARGET_SYS}" +TARGET_ENDIAN[x86_64-x32] = "little" +TARGET_POINTER_WIDTH[x86_64-x32] = "32" +TARGET_C_INT_WIDTH[x86_64-x32] = "32" +MAX_ATOMIC_WIDTH[x86_64-x32] = "64" + ## i686-unknown-linux-{gnu, musl} DATA_LAYOUT[i686] = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128" LLVM_TARGET[i686] = "${RUST_TARGET_SYS}"
@@ -292,22 +300,27 @@ TARGET_LLVM_FEATURES = "${@llvm_features(d)}" # (original) target. TARGET_LLVM_FEATURES:class-native = "${@','.join(llvm_features_from_cc_arch(d))}" -def rust_gen_target(d, thing, wd, features, cpu, arch): +def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""): import json sys = sys_for(d, thing) prefix = prefix_for(d, thing) - features = features or d.getVarFlag('FEATURES', arch) or "" + if abi: + arch_abi = "{}-{}".format(arch, abi) + else: + arch_abi = arch + + features = features or d.getVarFlag('FEATURES', arch_abi) or "" features = features.strip() # build tspec tspec = {} - tspec['llvm-target'] = d.getVarFlag('LLVM_TARGET', arch) - tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch) - tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch)) - tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch) - tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch) - tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch) + tspec['llvm-target'] = d.getVarFlag('LLVM_TARGET', arch_abi) + tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi) + tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi)) + tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi) + tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi) + tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi) tspec['arch'] = arch_to_rust_target_arch(arch) tspec['os'] = "linux" if "musl" in tspec['llvm-target']:
meta/recipes-devtools/rust/rust-cross.inc +3 -1
@@ -11,13 +11,15 @@ python do_rust_gen_targets () { features = "" cpu = "generic" arch = d.getVar('{}_ARCH'.format(thing)) + abi = "" if thing is "TARGET": + abi = d.getVar('ABIEXTENSION') # arm and armv7 have different targets in llvm if arch == "arm" and target_is_armv7(d): arch = 'armv7' features = d.getVar('TARGET_LLVM_FEATURES') or "" cpu = d.getVar('TARGET_LLVM_CPU') - rust_gen_target(d, thing, wd, features, cpu, arch) + rust_gen_target(d, thing, wd, features, cpu, arch, abi) } # Otherwise we'll depend on what we provide
Signature · 1 line
2.20.1
Re: [OE-core] [PATCH 13/13] rust: generate target definitions from (arch, abi), not just arch
Quoted 3 lines · Alexander Kanavin
This allows to add the missing x32 definition and others in the future.
It missed the powerpc eabispe, If we are going to use ABI extensions
Quoted 131 lines
Signed-off-by Alexander Kanavin <[email protected]>--- meta/recipes-devtools/rust/rust-common.inc | 57 +++++++++++++--------- meta/recipes-devtools/rust/rust-cross.inc | 4 +- 2 files changed, 38 insertions(+), 23 deletions(-)meta/recipes-devtools/rust/rust-common.inc +35
-22@@ -119,22 +119,22 @@ def llvm_features(d): ## arm-unknown-linux-gnueabihf -DATA_LAYOUT[arm] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" -LLVM_TARGET[arm] = "${RUST_TARGET_SYS}" -TARGET_ENDIAN[arm] = "little" -TARGET_POINTER_WIDTH[arm] = "32" -TARGET_C_INT_WIDTH[arm] = "32" -MAX_ATOMIC_WIDTH[arm] = "64" -FEATURES[arm] = "+v6,+vfp2" +DATA_LAYOUT[arm-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" +LLVM_TARGET[arm-eabi] = "${RUST_TARGET_SYS}" +TARGET_ENDIAN[arm-eabi] = "little" +TARGET_POINTER_WIDTH[arm-eabi] = "32" +TARGET_C_INT_WIDTH[arm-eabi] = "32" +MAX_ATOMIC_WIDTH[arm-eabi] = "64" +FEATURES[arm-eabi] = "+v6,+vfp2" ## armv7-unknown-linux-gnueabihf -DATA_LAYOUT[armv7] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" -LLVM_TARGET[armv7] = "${RUST_TARGET_SYS}" -TARGET_ENDIAN[armv7] = "little" -TARGET_POINTER_WIDTH[armv7] = "32" -TARGET_C_INT_WIDTH[armv7] = "32" -MAX_ATOMIC_WIDTH[armv7] = "64" -FEATURES[armv7] = "+v7,+vfp2,+thumb2" +DATA_LAYOUT[armv7-eabi] = "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64" +LLVM_TARGET[armv7-eabi] = "${RUST_TARGET_SYS}" +TARGET_ENDIAN[armv7-eabi] = "little" +TARGET_POINTER_WIDTH[armv7-eabi] = "32" +TARGET_C_INT_WIDTH[armv7-eabi] = "32" +MAX_ATOMIC_WIDTH[armv7-eabi] = "64" +FEATURES[armv7-eabi] = "+v7,+vfp2,+thumb2" ## aarch64-unknown-linux-{gnu, musl} DATA_LAYOUT[aarch64] = "e-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128"@@ -152,6 +152,14 @@ TARGET_POINTER_WIDTH[x86_64] = "64" TARGET_C_INT_WIDTH[x86_64] = "32" MAX_ATOMIC_WIDTH[x86_64] = "64" +## x86_64-unknown-linux-gnux32 +DATA_LAYOUT[x86_64-x32] = "e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" +LLVM_TARGET[x86_64-x32] = "${RUST_TARGET_SYS}" +TARGET_ENDIAN[x86_64-x32] = "little" +TARGET_POINTER_WIDTH[x86_64-x32] = "32" +TARGET_C_INT_WIDTH[x86_64-x32] = "32" +MAX_ATOMIC_WIDTH[x86_64-x32] = "64" + ## i686-unknown-linux-{gnu, musl} DATA_LAYOUT[i686] = "e-m:e-p:32:32-f64:32:64-f80:32-n8:16:32-S128" LLVM_TARGET[i686] = "${RUST_TARGET_SYS}"@@ -292,22 +300,27 @@ TARGET_LLVM_FEATURES = "${@llvm_features(d)}" # (original) target. TARGET_LLVM_FEATURES:class-native = "${@','.join(llvm_features_from_cc_arch(d))}" -def rust_gen_target(d, thing, wd, features, cpu, arch): +def rust_gen_target(d, thing, wd, features, cpu, arch, abi=""): import json sys = sys_for(d, thing) prefix = prefix_for(d, thing) - features = features or d.getVarFlag('FEATURES', arch) or "" + if abi: + arch_abi = "{}-{}".format(arch, abi) + else: + arch_abi = arch + + features = features or d.getVarFlag('FEATURES', arch_abi) or "" features = features.strip() # build tspec tspec = {} - tspec['llvm-target'] = d.getVarFlag('LLVM_TARGET', arch) - tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch) - tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch)) - tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch) - tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch) - tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch) + tspec['llvm-target'] = d.getVarFlag('LLVM_TARGET', arch_abi) + tspec['data-layout'] = d.getVarFlag('DATA_LAYOUT', arch_abi) + tspec['max-atomic-width'] = int(d.getVarFlag('MAX_ATOMIC_WIDTH', arch_abi)) + tspec['target-pointer-width'] = d.getVarFlag('TARGET_POINTER_WIDTH', arch_abi) + tspec['target-c-int-width'] = d.getVarFlag('TARGET_C_INT_WIDTH', arch_abi) + tspec['target-endian'] = d.getVarFlag('TARGET_ENDIAN', arch_abi) tspec['arch'] = arch_to_rust_target_arch(arch) tspec['os'] = "linux" if "musl" in tspec['llvm-target']:meta/recipes-devtools/rust/rust-cross.inc +3
-2@@ -11,13 +11,15 @@ python do_rust_gen_targets () { features = "" cpu = "generic" arch = d.getVar('{}_ARCH'.format(thing)) + abi = "" if thing is "TARGET": + abi = d.getVar('ABIEXTENSION') # arm and armv7 have different targets in llvm if arch == "arm" and target_is_armv7(d): arch = 'armv7' features = d.getVar('TARGET_LLVM_FEATURES') or "" cpu = d.getVar('TARGET_LLVM_CPU') - rust_gen_target(d, thing, wd, features, cpu, arch) + rust_gen_target(d, thing, wd, features, cpu, arch, abi) } # Otherwise we'll depend on what we provide --2.20.1
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#156806): https://lists.openembedded.org/g/openembedded-core/message/156806
Mute This Topic: https://lists.openembedded.org/mt/86220702/1997914
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-
Re: [OE-core] [PATCH 13/13] rust: generate target definitions from (arch, abi), not just arch
Quoted 3 lines · Khem Raj
It missed the powerpc eabispe, If we are going to use ABI extensions
The AB gave a pass though. If someone needs it on powerpc, they now have an easy way to adjust it.
Alex
Re: [OE-core] [PATCH 13/13] rust: generate target definitions from (arch, abi), not just arch
Quoted 8 lines · Alexander Kanavin
Quoted 3 lines · Khem Raj
It missed the powerpc eabispe, If we are going to use ABI extensions
The AB gave a pass though. If someone needs it on powerpc, they now have an easy way to adjust it.
its fine, least its forgotten add it as a comment somewhere since its a regression, these issues take long to decipher
Quoted 2 lines
Alex