From: Deepesh Varatharajan <[email protected]>

It was only used by rust-cross-canadian recipe.

Signed-off-by: Deepesh Varatharajan <[email protected]>
---
 .../rust/rust-cross-canadian.inc              | 71 ------------------
 .../rust/rust-cross-canadian_1.98.1.bb        | 72 ++++++++++++++++++-
 2 files changed, 71 insertions(+), 72 deletions(-)
 delete mode 100644 meta/recipes-devtools/rust/rust-cross-canadian.inc

diff --git a/meta/recipes-devtools/rust/rust-cross-canadian.inc 
b/meta/recipes-devtools/rust/rust-cross-canadian.inc
deleted file mode 100644
index f083bcda82..0000000000
--- a/meta/recipes-devtools/rust/rust-cross-canadian.inc
+++ /dev/null
@@ -1,71 +0,0 @@
-SUMMARY = "Rust compiler and runtime libaries (cross-canadian for 
${TARGET_ARCH} target)"
-PN = "rust-cross-canadian-${TRANSLATED_TARGET_ARCH}"
-CVE_PRODUCT = "rust"
-
-inherit rust-target-config
-inherit rust-common
-
-LICENSE = "MIT"
-
-MODIFYTOS = "0"
-
-DEPENDS += "virtual/nativesdk-cross-cc virtual/nativesdk-libc 
virtual/nativesdk-compilerlibs"
-
-SRC_URI += "file://target-rust-ccld.c"
-LIC_FILES_CHKSUM = 
"file://target-rust-ccld.c;md5=af4e0e29f81a34cffe05aa07c89e93e9;endline=7"
-S = "${UNPACKDIR}"
-
-# Need to use our SDK's sh here, see #14878
-create_sdk_wrapper () {
-        file="$1"
-        shift
-        cat <<- EOF > "${file}"
-               #!/bin/sh
-               \$$1 \$@
-               EOF
-
-        chmod +x "$file"
-}
-
-do_install () {
-    # Rust requires /usr/lib to contain the libs.
-    # The required structure is retained for simplicity.
-    SYS_LIBDIR=$(dirname ${D}${libdir})
-    SYS_BINDIR=$(dirname ${D}${bindir})
-    RUSTLIB_DIR=${SYS_LIBDIR}/${TARGET_SYS}/rustlib
-
-    install -d ${RUSTLIB_DIR}
-    install -m 0644 "${RUST_TARGETS_DIR}/${RUST_HOST_SYS}.json" 
"${RUSTLIB_DIR}"
-    install -m 0644 "${RUST_TARGETS_DIR}/${RUST_TARGET_SYS}.json" 
"${RUSTLIB_DIR}"
-
-    # Uses SDK's CC as linker so linked binaries works out of box.
-    # We have a problem as rust sets LD_LIBRARY_PATH and this will break 
running host
-    # binaries (even /bin/sh) in the SDK as they detect a newer glibc from the 
SDK
-    # in those paths and we hit symbol errors. We saw particular problems with 
symbol
-    # mismatch on ubuntu1804 during development. To avoid this we have an SDK 
built
-    # binary which unsets LD_LIBRARY_PATH, which can then call the wrapper 
script
-    # where the context is easier to do the env maniupations needed
-    install -d ${SYS_BINDIR}
-    outfile="${SYS_BINDIR}/target-rust-ccld"
-    ${CC} ${S}/target-rust-ccld.c -o $outfile
-    chmod +x "$outfile"
-    create_sdk_wrapper "${SYS_BINDIR}/target-rust-ccld-wrapper" "CC"
-
-    ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d
-    mkdir "${ENV_SETUP_DIR}"
-    RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/${RUST_TARGET_SYS}_rust.sh"
-
-    RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | 
sed 's/-/_/g'`
-
-    cat <<- EOF > "${RUST_ENV_SETUP_SH}"
-       export 
CARGO_TARGET_${RUST_TARGET_TRIPLE}_RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr
 -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
-       export CARGO_BUILD_TARGET="${RUST_TARGET_SYS}"
-       export 
RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib"
-       EOF
-
-    chown -R root.root ${D}
-
-}
-
-FILES:${PN} += "${base_prefix}/environment-setup.d"
-
diff --git a/meta/recipes-devtools/rust/rust-cross-canadian_1.98.1.bb 
b/meta/recipes-devtools/rust/rust-cross-canadian_1.98.1.bb
index 55865238ab..64e4f752ce 100644
--- a/meta/recipes-devtools/rust/rust-cross-canadian_1.98.1.bb
+++ b/meta/recipes-devtools/rust/rust-cross-canadian_1.98.1.bb
@@ -1,2 +1,72 @@
+SUMMARY = "Rust compiler and runtime libaries (cross-canadian for 
${TARGET_ARCH} target)"
+PN = "rust-cross-canadian-${TRANSLATED_TARGET_ARCH}"
+CVE_PRODUCT = "rust"
+
 inherit cross-canadian
-require rust-cross-canadian.inc
\ No newline at end of file
+inherit rust-target-config
+inherit rust-common
+
+LICENSE = "MIT"
+
+MODIFYTOS = "0"
+
+DEPENDS += "virtual/nativesdk-cross-cc virtual/nativesdk-libc 
virtual/nativesdk-compilerlibs"
+
+SRC_URI += "file://target-rust-ccld.c"
+LIC_FILES_CHKSUM = 
"file://target-rust-ccld.c;md5=af4e0e29f81a34cffe05aa07c89e93e9;endline=7"
+S = "${UNPACKDIR}"
+
+# Need to use our SDK's sh here, see #14878
+create_sdk_wrapper () {
+        file="$1"
+        shift
+        cat <<- EOF > "${file}"
+               #!/bin/sh
+               \$$1 \$@
+               EOF
+
+        chmod +x "$file"
+}
+
+do_install () {
+    # Rust requires /usr/lib to contain the libs.
+    # The required structure is retained for simplicity.
+    SYS_LIBDIR=$(dirname ${D}${libdir})
+    SYS_BINDIR=$(dirname ${D}${bindir})
+    RUSTLIB_DIR=${SYS_LIBDIR}/${TARGET_SYS}/rustlib
+
+    install -d ${RUSTLIB_DIR}
+    install -m 0644 "${RUST_TARGETS_DIR}/${RUST_HOST_SYS}.json" 
"${RUSTLIB_DIR}"
+    install -m 0644 "${RUST_TARGETS_DIR}/${RUST_TARGET_SYS}.json" 
"${RUSTLIB_DIR}"
+
+    # Uses SDK's CC as linker so linked binaries works out of box.
+    # We have a problem as rust sets LD_LIBRARY_PATH and this will break 
running host
+    # binaries (even /bin/sh) in the SDK as they detect a newer glibc from the 
SDK
+    # in those paths and we hit symbol errors. We saw particular problems with 
symbol
+    # mismatch on ubuntu1804 during development. To avoid this we have an SDK 
built
+    # binary which unsets LD_LIBRARY_PATH, which can then call the wrapper 
script
+    # where the context is easier to do the env maniupations needed
+    install -d ${SYS_BINDIR}
+    outfile="${SYS_BINDIR}/target-rust-ccld"
+    ${CC} ${S}/target-rust-ccld.c -o $outfile
+    chmod +x "$outfile"
+    create_sdk_wrapper "${SYS_BINDIR}/target-rust-ccld-wrapper" "CC"
+
+    ENV_SETUP_DIR=${D}${base_prefix}/environment-setup.d
+    mkdir "${ENV_SETUP_DIR}"
+    RUST_ENV_SETUP_SH="${ENV_SETUP_DIR}/${RUST_TARGET_SYS}_rust.sh"
+
+    RUST_TARGET_TRIPLE=`echo ${RUST_TARGET_SYS} | tr '[:lower:]' '[:upper:]' | 
sed 's/-/_/g'`
+
+    cat <<- EOF > "${RUST_ENV_SETUP_SH}"
+       export 
CARGO_TARGET_${RUST_TARGET_TRIPLE}_RUSTFLAGS="--sysroot=\$OECORE_TARGET_SYSROOT/usr
 -C link-arg=--sysroot=\$OECORE_TARGET_SYSROOT"
+       export CARGO_BUILD_TARGET="${RUST_TARGET_SYS}"
+       export 
RUST_TARGET_PATH="\$OECORE_NATIVE_SYSROOT/usr/lib/${TARGET_SYS}/rustlib"
+       EOF
+
+    chown -R root.root ${D}
+
+}
+
+FILES:${PN} += "${base_prefix}/environment-setup.d"
+
-- 
2.49.0

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#246913): 
https://lists.openembedded.org/g/openembedded-core/message/246913
Mute This Topic: https://lists.openembedded.org/mt/121503937/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to