File tree Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Expand file tree Collapse file tree 3 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ inherit rust_bin-common
33# Many crates rely on pkg-config to find native versions of their libraries for
44# linking - do the simple thing and make it generally available.
55DEPENDS :append = "\
6- cargo-bin-cross-${TARGET_ARCH} \
6+ ${ @ " cargo-bin-cross-${TARGET_ARCH} " if d . getVar ( 'TARGET_ARCH' ) ! = " ${BUILD_ARCH} " else "cargo-bin-native" } \
77 pkgconfig-native \
88"
99
@@ -98,6 +98,8 @@ cargo_bin_do_compile() {
9898 export TARGET_CXX = "${WRAPPER_DIR} /cxx-wrapper.sh"
9999 export CC = "${WRAPPER_DIR} /cc-native-wrapper.sh"
100100 export CXX = "${WRAPPER_DIR} /cxx-native-wrapper.sh"
101+ export TARGET_LD = "${WRAPPER_DIR} /linker-wrapper.sh"
102+ export LD = "${WRAPPER_DIR} /linker-native-wrapper.sh"
101103 export PKG_CONFIG_ALLOW_CROSS = "1"
102104 export LDFLAGS = ""
103105 export RUSTFLAGS = "${RUSTFLAGS} "
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ inherit rust_bin-common
88
99PN = "cargo-bin-cross-${TARGET_ARCH} "
1010
11+ PROVIDES += "cargo-bin-native"
12+
1113CARGO_HOST_TARGET = "${@ rust_target (d , 'HOST' )}"
1214
1315SYSROOT_DIRS_NATIVE += "${prefix} "
Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ SECTION = "devel"
66inherit cross
77inherit rust_bin -common
88
9+ PN :class -native = "rust-bin-native-${BUILD_ARCH} "
10+
911# Required to link binaries
10- DEPENDS += "gcc-cross-${TARGET_ARCH} "
12+ DEPENDS += "${ @ " gcc-cross-${TARGET_ARCH} " if d . getVar ( 'TARGET_ARCH' ) == "X86_64" else "" }"
1113
1214PN = "rust-bin-cross-${TARGET_ARCH} "
1315
You can’t perform that action at this time.
0 commit comments