artiq/artiq/firmware/runtime/Makefile
whitequark d58393a1e5 runtime: build with -Cpanic=unwind.
This is required for backtraces to function. I'm not sure how it
turned out that master had -Cpanic=abort.
2018-01-26 23:01:24 +00:00

31 lines
635 B
Makefile

include ../include/generated/variables.mak
include $(MISOC_DIRECTORY)/software/common.mak
CFLAGS += \
-I$(LIBUNWIND_DIRECTORY) \
-I$(LIBUNWIND_DIRECTORY)/../unwinder/include
LDFLAGS += \
-L../libunwind
RUSTFLAGS += -Cpanic=unwind
all:: runtime.bin runtime.fbi
.PHONY: $(RUSTOUT)/libruntime.a
$(RUSTOUT)/libruntime.a:
$(cargo) --manifest-path $(RUNTIME_DIRECTORY)/Cargo.toml
runtime.elf: $(RUSTOUT)/libruntime.a ksupport_data.o
$(link) -T $(RUNTIME_DIRECTORY)/runtime.ld \
-lunwind-bare
ksupport_data.o: ../ksupport/ksupport.elf
$(LD) -r -b binary -o $@ $<
%.bin: %.elf
$(objcopy) -O binary
%.fbi: %.bin
$(mscimg) -f