Skip to content

Commit

Permalink
fixup! makefiles: Define RUST_TARGET for use with Cargo / Rust
Browse files Browse the repository at this point in the history
  • Loading branch information
chrysn committed Dec 14, 2021
1 parent 323bab3 commit a3b7cbc
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cpu/native/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ config CPU_ARCH_NATIVE
select HAS_PERIPH_PM
select HAS_PERIPH_PWM
select HAS_PERIPH_TIMER_PERIODIC
select HAS_RUST_TARGET
select HAS_SSP
select HAVE_MTD_NATIVE

Expand Down Expand Up @@ -63,6 +62,7 @@ config NATIVE_OS_LINUX
select HAS_PERIPH_GPIO
select HAS_PERIPH_GPIO_IRQ
select HAS_PERIPH_SPI
select HAS_RUST_TARGET if "$(OS_ARCH)" == "x86_64"

config NATIVE_OS_FREEBSD
bool
Expand Down
4 changes: 3 additions & 1 deletion cpu/native/Makefile.features
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ endif
FEATURES_PROVIDED += arch_32bit
FEATURES_PROVIDED += arch_native
FEATURES_PROVIDED += cpp
FEATURES_PROVIDED += rust_target
ifneq ($(DISABLE_LIBSTDCPP),1)
# libstdc++ on FreeBSD is broken (does not work with -m32)
# Override with "export DISABLE_LIBSTDCPP=0"
Expand All @@ -19,6 +18,9 @@ FEATURES_PROVIDED += periph_hwrng
FEATURES_PROVIDED += periph_pm
FEATURES_PROVIDED += periph_pwm
FEATURES_PROVIDED += periph_timer_periodic
ifeq ($(OS) $(OS_ARCH),Linux x86_64)
FEATURES_PROVIDED += rust_target
endif
FEATURES_PROVIDED += ssp

ifeq ($(OS),Linux)
Expand Down
4 changes: 3 additions & 1 deletion cpu/native/Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ endif
TOOLCHAINS_SUPPORTED = gnu llvm afl

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

0 comments on commit a3b7cbc

Please sign in to comment.