summaryrefslogtreecommitdiffstats
path: root/meta/recipes-gnome
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-05 13:15:31 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-08-08 15:44:20 +0100
commitb1d8d2a3bfe40d83a651448bcd0eeb01434b7ad1 (patch)
tree8266c80e68acab46fed9e1831149100c31e50a84 /meta/recipes-gnome
parent9a093d034889bff444a5801313e24c39a323d7ef (diff)
downloadpoky-b1d8d2a3bfe40d83a651448bcd0eeb01434b7ad1.tar.gz
rust: Generate per recipe target configuration files
Instead of generating target configuration files centrally and often getting it wrong, or having trouble finding the right set, generate them dynamically from the bbclass into WORKDIR per recipe. (From OE-Core rev: 9160e4a37561d8ac882057450a818621bec13bed) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-gnome')
-rw-r--r--meta/recipes-gnome/librsvg/librsvg_2.54.4.bb14
1 files changed, 7 insertions, 7 deletions
diff --git a/meta/recipes-gnome/librsvg/librsvg_2.54.4.bb b/meta/recipes-gnome/librsvg/librsvg_2.54.4.bb
index f3bbeb74eb..82b1bf9bce 100644
--- a/meta/recipes-gnome/librsvg/librsvg_2.54.4.bb
+++ b/meta/recipes-gnome/librsvg/librsvg_2.54.4.bb
@@ -14,7 +14,7 @@ SECTION = "x11/utils"
14DEPENDS = "cairo gdk-pixbuf glib-2.0 libxml2 pango python3-docutils-native" 14DEPENDS = "cairo gdk-pixbuf glib-2.0 libxml2 pango python3-docutils-native"
15BBCLASSEXTEND = "native nativesdk" 15BBCLASSEXTEND = "native nativesdk"
16 16
17inherit gnomebase pixbufcache upstream-version-is-even gobject-introspection rust vala gi-docgen 17inherit cargo_common gnomebase pixbufcache upstream-version-is-even gobject-introspection rust vala gi-docgen
18 18
19SRC_URI += "file://0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.patch \ 19SRC_URI += "file://0001-Makefile.am-pass-rust-target-to-cargo-also-when-not-.patch \
20 file://0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch \ 20 file://0001-system-deps-src-lib.rs-do-not-probe-into-harcoded-li.patch \
@@ -29,7 +29,6 @@ BASEDEPENDS:append = " cargo-native"
29 29
30export RUST_BACKTRACE = "full" 30export RUST_BACKTRACE = "full"
31export RUSTFLAGS 31export RUSTFLAGS
32export RUST_TARGET_PATH
33 32
34export RUST_TARGET = "${RUST_HOST_SYS}" 33export RUST_TARGET = "${RUST_HOST_SYS}"
35 34
@@ -38,16 +37,17 @@ RUSTFLAGS:append:mipsel = " --cfg crossbeam_no_atomic_64"
38RUSTFLAGS:append:powerpc = " --cfg crossbeam_no_atomic_64" 37RUSTFLAGS:append:powerpc = " --cfg crossbeam_no_atomic_64"
39RUSTFLAGS:append:riscv32 = " --cfg crossbeam_no_atomic_64" 38RUSTFLAGS:append:riscv32 = " --cfg crossbeam_no_atomic_64"
40 39
40CARGO_DISABLE_BITBAKE_VENDORING = "1"
41do_configure[postfuncs] += "cargo_common_do_configure"
42
43inherit rust-target-config
44
41# rust-cross writes the target linker binary into target json definition without any flags. 45# rust-cross writes the target linker binary into target json definition without any flags.
42# This breaks here because the linker isn't going to work without at least knowing where 46# This breaks here because the linker isn't going to work without at least knowing where
43# the sysroot is. So copy the json to workdir, and patch in the path to wrapper from rust class 47# the sysroot is. So copy the json to workdir, and patch in the path to wrapper from rust class
44# which supplies the needed flags. 48# which supplies the needed flags.
45do_compile:prepend() { 49do_compile:prepend() {
46 cp ${STAGING_LIBDIR_NATIVE}/rustlib/${HOST_SYS}.json ${WORKDIR} 50 sed -ie 's,"linker": ".*","linker": "${RUST_TARGET_CC}",g' ${RUST_TARGETS_DIR}/${RUST_HOST_SYS}.json
47 cp ${STAGING_LIBDIR_NATIVE}/rustlib/${BUILD_SYS}.json ${WORKDIR}
48 sed -ie 's,"linker": ".*","linker": "${RUST_TARGET_CC}",g' ${WORKDIR}/${RUST_HOST_SYS}.json
49 RUST_TARGET_PATH="${WORKDIR}"
50 export RUST_TARGET_PATH
51} 51}
52 52
53# Issue only on windows 53# Issue only on windows