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
3
3
# Many crates rely on pkg-config to find native versions of their libraries for
4
4
# linking - do the simple thing and make it generally available.
5
5
DEPENDS :append = "\
6
- cargo-bin-cross-${TARGET_ARCH} \
6
+ ${ @ " cargo-bin-cross-${TARGET_ARCH} " if d . getVar ( 'TARGET_ARCH' ) ! = " ${BUILD_ARCH} " else "cargo-bin-native" } \
7
7
pkgconfig-native \
8
8
"
9
9
@@ -98,6 +98,8 @@ cargo_bin_do_compile() {
98
98
export TARGET_CXX = "${WRAPPER_DIR} /cxx-wrapper.sh"
99
99
export CC = "${WRAPPER_DIR} /cc-native-wrapper.sh"
100
100
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"
101
103
export PKG_CONFIG_ALLOW_CROSS = "1"
102
104
export LDFLAGS = ""
103
105
export RUSTFLAGS = "${RUSTFLAGS} "
Original file line number Diff line number Diff line change @@ -8,6 +8,8 @@ inherit rust_bin-common
8
8
9
9
PN = "cargo-bin-cross-${TARGET_ARCH} "
10
10
11
+ PROVIDES += "cargo-bin-native"
12
+
11
13
CARGO_HOST_TARGET = "${@ rust_target (d , 'HOST' )}"
12
14
13
15
SYSROOT_DIRS_NATIVE += "${prefix} "
Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ SECTION = "devel"
6
6
inherit cross
7
7
inherit rust_bin -common
8
8
9
+ PN :class -native = "rust-bin-native-${BUILD_ARCH} "
10
+
9
11
# Required to link binaries
10
- DEPENDS += "gcc-cross-${TARGET_ARCH} "
12
+ DEPENDS += "${ @ " gcc-cross-${TARGET_ARCH} " if d . getVar ( 'TARGET_ARCH' ) == "X86_64" else "" }"
11
13
12
14
PN = "rust-bin-cross-${TARGET_ARCH} "
13
15
You can’t perform that action at this time.
0 commit comments