Skip to content

Commit a3b7cbc

Browse files
committed
fixup! makefiles: Define RUST_TARGET for use with Cargo / Rust
See-Also: #16274 (comment)
1 parent 323bab3 commit a3b7cbc

3 files changed

Lines changed: 7 additions & 3 deletions

File tree

cpu/native/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ config CPU_ARCH_NATIVE
2020
select HAS_PERIPH_PM
2121
select HAS_PERIPH_PWM
2222
select HAS_PERIPH_TIMER_PERIODIC
23-
select HAS_RUST_TARGET
2423
select HAS_SSP
2524
select HAVE_MTD_NATIVE
2625

@@ -63,6 +62,7 @@ config NATIVE_OS_LINUX
6362
select HAS_PERIPH_GPIO
6463
select HAS_PERIPH_GPIO_IRQ
6564
select HAS_PERIPH_SPI
65+
select HAS_RUST_TARGET if "$(OS_ARCH)" == "x86_64"
6666

6767
config NATIVE_OS_FREEBSD
6868
bool

cpu/native/Makefile.features

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ endif
55
FEATURES_PROVIDED += arch_32bit
66
FEATURES_PROVIDED += arch_native
77
FEATURES_PROVIDED += cpp
8-
FEATURES_PROVIDED += rust_target
98
ifneq ($(DISABLE_LIBSTDCPP),1)
109
# libstdc++ on FreeBSD is broken (does not work with -m32)
1110
# Override with "export DISABLE_LIBSTDCPP=0"
@@ -19,6 +18,9 @@ FEATURES_PROVIDED += periph_hwrng
1918
FEATURES_PROVIDED += periph_pm
2019
FEATURES_PROVIDED += periph_pwm
2120
FEATURES_PROVIDED += periph_timer_periodic
21+
ifeq ($(OS) $(OS_ARCH),Linux x86_64)
22+
FEATURES_PROVIDED += rust_target
23+
endif
2224
FEATURES_PROVIDED += ssp
2325

2426
ifeq ($(OS),Linux)

cpu/native/Makefile.include

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,6 @@ endif
1212
TOOLCHAINS_SUPPORTED = gnu llvm afl
1313

1414
# Platform triple as used by Rust
15-
RUST_TARGET = i686-unknown-linux-gnu
15+
ifeq ($(OS) $(OS_ARCH),Linux x86_64)
16+
RUST_TARGET = i686-unknown-linux-gnu
17+
endif

0 commit comments

Comments
 (0)