mirror of
https://github.com/mmueller41/genode.git
synced 2026-01-21 12:32:56 +01:00
Remove Nim support from toolchain
Nim components are best build externally using the Nimble tools and a Genode SDK. See https://github.com/ehmry/nim-genode Fix #2949
This commit is contained in:
committed by
Norman Feske
parent
aeb7ab4774
commit
8cb8082206
@@ -102,48 +102,6 @@ CUSTOM_ADA_INCLUDE ?= -I- $(INCLUDES)
|
||||
$(MSG_CONVERT)$@
|
||||
$(VERBOSE)ar p $< $*.0.o > $@
|
||||
|
||||
#
|
||||
# Compiling Nim source code
|
||||
#
|
||||
ifneq ($(SRC_NIM),)
|
||||
|
||||
ifeq ($(NIM_CPU),)
|
||||
$(warning NIM_CPU not defined for any of the following SPECS: $(SPECS))
|
||||
else
|
||||
|
||||
ifeq ($(wildcard $(NIM)),)
|
||||
$(error Nim compiler not found at $(NIM), see the 'tool/tool_chain_nim' script)
|
||||
endif
|
||||
|
||||
NIM_MAKEFILES := $(foreach X,$(SRC_NIM),$(X).mk)
|
||||
|
||||
NIM_ARGS = --compileOnly --os:genode --cpu:$(NIM_CPU)
|
||||
NIM_ARGS += --verbosity:0 --hint[Processing]:off --nimcache:.
|
||||
NIM_ARGS += --noCppExceptions
|
||||
NIM_ARGS += $(foreach DIR,$(foreach REP,$(REPOSITORIES),$(wildcard $(REP)/include/nim)), --path:$(DIR))
|
||||
NIM_ARGS += $(NIM_OPT)
|
||||
|
||||
# Generate the C++ sources and compilation info
|
||||
#
|
||||
# Unfortunately the existing sources must be purged
|
||||
# because of comma problems in the JSON recipe
|
||||
%.nim.mk: %.nim
|
||||
$(MSG_BUILD)$(basename $@).cpp
|
||||
$(VERBOSE) rm -f stdlib_*.cpp
|
||||
$(VERBOSE)$(NIM) compileToCpp $(NIM_ARGS) $<
|
||||
$(VERBOSE)$(JQ) --raw-output '"SRC_O_NIM +=" + (.link | join(" ")) +"\n" + (.compile | map((.[0] | sub("cpp$$";"o: ") | sub("c$$";"o: ")) + .[0] + "\n\t"+(.[1] | sub("^g\\++";"$$(MSG_COMP)$$@\n\t$$(VERBOSE)$$(NIM_CC)"))) | join("\n"))' < $(basename $(basename $@)).json > $@
|
||||
|
||||
NIM_CC := $(CXX) $(CXX_DEF) $(CC_CXX_OPT) $(INCLUDES) -D__GENODE__
|
||||
|
||||
# Parse the generated makefiles
|
||||
-include $(NIM_MAKEFILES)
|
||||
|
||||
# Append the new objects
|
||||
SRC_O += $(sort $(SRC_O_NIM))
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
#
|
||||
# Assembler files that must be preprocessed are fed to the C compiler.
|
||||
#
|
||||
|
||||
@@ -54,16 +54,6 @@ GNATMAKE = $(CUSTOM_GNATMAKE)
|
||||
HOST_CC = $(CUSTOM_HOST_CC)
|
||||
ADA_CC = $(CUSTOM_ADA_CC)
|
||||
|
||||
#
|
||||
# Nim toolchain
|
||||
#
|
||||
NIM ?= /usr/local/genode-nim/bin/nim
|
||||
|
||||
#
|
||||
# JSON parsing utility
|
||||
#
|
||||
JQ ?= jq
|
||||
|
||||
#
|
||||
# Compiler and Linker options
|
||||
#
|
||||
|
||||
@@ -5,8 +5,6 @@ REP_INC_DIR += include/spec/arm
|
||||
|
||||
SPECS += 32bit
|
||||
|
||||
NIM_CPU ?= arm
|
||||
|
||||
#
|
||||
# Prevent compiler message
|
||||
# "note: the mangling of 'va_list' has changed in GCC 4.4"
|
||||
|
||||
@@ -1,2 +1 @@
|
||||
CC_OPT += -DGENODE_RELEASE
|
||||
NIM_OPT += -d:release
|
||||
|
||||
@@ -16,7 +16,5 @@ CC_MARCH ?= -march=i686 -m32
|
||||
LD_MARCH ?= -melf_i386
|
||||
AS_MARCH ?= -march=i686 --32
|
||||
|
||||
NIM_CPU ?= i386
|
||||
|
||||
include $(BASE_DIR)/mk/spec/32bit.mk
|
||||
include $(BASE_DIR)/mk/spec/x86.mk
|
||||
|
||||
@@ -20,7 +20,5 @@ CC_MARCH ?= -m64 -mcmodel=large
|
||||
#
|
||||
LD_MARCH ?= -melf_x86_64
|
||||
|
||||
NIM_CPU ?= amd64
|
||||
|
||||
include $(BASE_DIR)/mk/spec/64bit.mk
|
||||
include $(BASE_DIR)/mk/spec/x86.mk
|
||||
|
||||
Reference in New Issue
Block a user