From 9c93c760fc98aa67d3a9ab6ce61fdae0960830f3 Mon Sep 17 00:00:00 2001 From: whitequark Date: Thu, 2 Feb 2017 12:22:55 +0000 Subject: [PATCH] firmware: do not use PIC in Rust code. This fixes test_pulse_rate and test_pulse_rate_dds by making rtio_output slightly faster. --- artiq/runtime/Makefile | 9 +++++++-- artiq/test/coredevice/test_rtio.py | 1 - 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/artiq/runtime/Makefile b/artiq/runtime/Makefile index 8dced97a3..18ceac2e2 100644 --- a/artiq/runtime/Makefile +++ b/artiq/runtime/Makefile @@ -28,12 +28,18 @@ LDFLAGS += --gc-sections \ -L../libunwind \ -L../libdyld +RUSTFLAGS = \ + -C target-feature=+mul,+div,+ffl1,+cmov,+addc \ + -C relocation-model=static \ + -C opt-level=s \ + -Cpanic=abort +export RUSTFLAGS + all: runtime.bin runtime.fbi .PHONY: $(RUSTOUT)/libruntime.a $(RUSTOUT)/libruntime.a: $(CARGO) \ - RUSTFLAGS="-C target-feature=+mul,+div,+ffl1,+cmov,+addc -C opt-level=s -Cpanic=abort" \ CARGO_TARGET_DIR=$(realpath .)/cargo \ cargo build --target=or1k-unknown-none \ --manifest-path $(realpath $(RUNTIME_DIRECTORY)/../firmware/runtime/Cargo.toml) @@ -49,7 +55,6 @@ runtime.elf: $(RUSTOUT)/libruntime.a ksupport_data.o .PHONY: $(RUSTOUT_KSUPPORT)/libksupport.a $(RUSTOUT_KSUPPORT)/libksupport.a: $(CARGO) \ - RUSTFLAGS="-C target-feature=+mul,+div,+ffl1,+cmov,+addc -C opt-level=s -Cpanic=unwind" \ CARGO_TARGET_DIR=$(realpath .)/cargo-ksupport \ cargo build --target=or1k-unknown-none \ --manifest-path $(realpath $(RUNTIME_DIRECTORY)/../firmware/ksupport/Cargo.toml) diff --git a/artiq/test/coredevice/test_rtio.py b/artiq/test/coredevice/test_rtio.py index c776de473..9519cf775 100644 --- a/artiq/test/coredevice/test_rtio.py +++ b/artiq/test/coredevice/test_rtio.py @@ -356,7 +356,6 @@ class CoredeviceTest(ExperimentCase): self.assertGreater(rate, 100*ns) self.assertLess(rate, 700*ns) - @unittest.skip("fails on CI for unknown reasons") def test_pulse_rate_dds(self): """Minimum interval for sustained DDS frequency switching""" self.execute(PulseRateDDS)