mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
Added rust support
Rust relies on atomic builtins, which are not implemented in libgcc for ARM. One is implemented in rust, which is sufficient to get the current rust test to run. Issue #1899
This commit is contained in:
committed by
Christian Helmuth
parent
611a73be36
commit
28117fee12
@@ -19,6 +19,11 @@
|
||||
#
|
||||
all:
|
||||
|
||||
#
|
||||
# Tell rust to make an object file instead of anything else
|
||||
#
|
||||
CC_RUSTC_OPT += --emit obj
|
||||
|
||||
#
|
||||
# Include common utility functions
|
||||
#
|
||||
@@ -148,6 +153,13 @@ LD_CMD += $(addprefix $(LD_SCRIPT_PREFIX), $(LD_SCRIPTS))
|
||||
STATIC_LIBS := $(foreach l,$(FILTER_DEPS),$(LIB_CACHE_DIR)/$l/$l.lib.a)
|
||||
STATIC_LIBS := $(sort $(wildcard $(STATIC_LIBS)))
|
||||
|
||||
#
|
||||
# --whole-archive does not work with rlibs
|
||||
#
|
||||
RUST_LIBS := $(foreach l,$(FILTER_DEPS),$(LIB_CACHE_DIR)/$l/$l.rlib)
|
||||
RUST_LIBS := $(sort $(wildcard $(RUST_LIBS)))
|
||||
SHORT_RUST_LIBS := $(subst $(LIB_CACHE_DIR),$$libs,$(RUST_LIBS))
|
||||
|
||||
#
|
||||
# For hybrid Linux/Genode programs, prevent the linkage Genode's cxx and base
|
||||
# library because these functionalities are covered by the glibc or by
|
||||
@@ -181,7 +193,9 @@ $(LINK_ITEMS) $(TARGET): $(HOST_TOOLS)
|
||||
LD_CMD += -Wl,--whole-archive -Wl,--start-group
|
||||
LD_CMD += $(SHORT_LINK_ITEMS)
|
||||
LD_CMD += $(EXT_OBJECTS)
|
||||
LD_CMD += -Wl,--end-group -Wl,--no-whole-archive
|
||||
LD_CMD += -Wl,--no-whole-archive
|
||||
LD_CMD += $(SHORT_RUST_LIBS)
|
||||
LD_CMD += -Wl,--end-group
|
||||
|
||||
#
|
||||
# Link libgcc to each program
|
||||
|
||||
Reference in New Issue
Block a user