From 84b2d377283780a365188599aeb324d22003e1e8 Mon Sep 17 00:00:00 2001 From: Andrew Waterman Date: Tue, 16 Aug 2016 00:46:27 -0700 Subject: [PATCH] Make ENTROPY deterministic Base it on the output filename, not the pid. This still gets decent coverage, but is deterministic. --- isa/Makefile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/isa/Makefile b/isa/Makefile index f4dab3f..a13acd8 100644 --- a/isa/Makefile +++ b/isa/Makefile @@ -29,8 +29,7 @@ default: all RISCV_PREFIX ?= riscv$(XLEN)-unknown-elf- RISCV_GCC ?= $(RISCV_PREFIX)gcc -ENTROPY ?= -DENTROPY=$(shell echo $$$$) -RISCV_GCC_OPTS ?= $(ENTROPY) -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles +RISCV_GCC_OPTS ?= -static -mcmodel=medany -fvisibility=hidden -nostdlib -nostartfiles RISCV_OBJDUMP ?= $(RISCV_PREFIX)objdump --disassemble-all --disassemble-zeroes --section=.text --section=.text.startup --section=.text.init --section=.data RISCV_SIM ?= spike @@ -55,7 +54,7 @@ $$($(1)_p_tests): $(1)-p-%: $(1)/%.S $(1)_tests += $$($(1)_p_tests) $$($(1)_v_tests): $(1)-v-%: $(1)/%.S - $$(RISCV_GCC) $(2) $$(RISCV_GCC_OPTS) -std=gnu99 -O2 -I$(src_dir)/../env/v -I$(src_dir)/macros/scalar -T$(src_dir)/../env/v/link.ld $(src_dir)/../env/v/entry.S $(src_dir)/../env/v/*.c $$< -lc -o $$@ + $$(RISCV_GCC) $(2) $$(RISCV_GCC_OPTS) -DENTROPY=0x$$(shell echo \$$@ | md5sum | cut -c 1-7) -std=gnu99 -O2 -I$(src_dir)/../env/v -I$(src_dir)/macros/scalar -T$(src_dir)/../env/v/link.ld $(src_dir)/../env/v/entry.S $(src_dir)/../env/v/*.c $$< -lc -o $$@ $(1)_tests += $$($(1)_v_tests) $(1)_tests_dump = $$(addsuffix .dump, $$($(1)_tests)) -- 2.30.2