binutils-gdb/sim/common
Simon Marchi 2b8d134be4 sim: set ASAN_OPTIONS=detect_leaks=0 when running igen and opc2c
The igen/dgen and opc2c tools leak their heap-allocated memory (on
purpose) at program exit, which makes AddressSanitizer fail the tool
execution.  This breaks the build, as it makes the tool return a
non-zero exit code.

Fix that by disabling leak detection through the setting of that
environment variable.

I also changed the opc2c rules for m32c to go through a temporary file.
What happened is that the failing opc2c would produce an incomplete file
(probably because ASan exits the process before stdout is flushed).
This meant that further make attempts didn't try to re-create the file,
as it already existed.  A "clean" was therefore necessary.  This can
also happen in regular builds if the user interrupts the build (^C) in
the middle of the opc2c execution and tries to resume it.  Going to a
temporary file avoids this issue.

sim/m32c/ChangeLog:

	* Makefile.in: Set ASAN_OPTIONS when running opc2c.

sim/mips/ChangeLog:

	* Makefile.in: Set ASAN_OPTIONS when running igen.

sim/mn10300/ChangeLog:

	* Makefile.in: Set ASAN_OPTIONS when running igen.

sim/ppc/ChangeLog:

	* Makefile.in: Set ASAN_OPTIONS when running igen.

sim/v850/ChangeLog:

	* Makefile.in: Set ASAN_OPTIONS when running igen.

Change-Id: I00f21d4dc1aff0ef73471925d41ce7c23e83e082
2021-04-08 09:49:30 -04:00
..
callback.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
cgen-accfp.c sim: cgen-accfp: Fix pointer sign warnings 2021-01-31 15:26:58 -05:00
cgen-cpu.h
cgen-defs.h
cgen-engine.h
cgen-fpu.c
cgen-fpu.h
cgen-mem.h
cgen-ops.h
cgen-par.c sim: common: add missing stdlib.h for abort() 2021-01-09 02:45:14 -05:00
cgen-par.h
cgen-run.c
cgen-scache.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
cgen-scache.h
cgen-sim.h
cgen-trace.c sim: cgen-trace: tweak printf call 2021-01-31 17:31:44 -05:00
cgen-trace.h
cgen-types.h
cgen-utils.c
cgen.sh
ChangeLog sim: add preliminary support for --enable-targets 2021-04-03 14:49:50 -04:00
create-version.sh sim: common: simplify version script 2021-01-18 12:25:57 -05:00
dv-cfi.c
dv-cfi.h
dv-core.c
dv-glue.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
dv-pal.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
dv-sockser.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
dv-sockser.h
gdbinit.in
genmloop.sh
gennltvals.py sim: riscv: new port 2021-02-04 19:02:19 -05:00
gentmap.c
hw-alloc.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
hw-alloc.h
hw-base.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
hw-base.h
hw-device.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
hw-device.h
hw-events.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
hw-events.h
hw-handles.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
hw-handles.h
hw-instances.c
hw-instances.h
hw-main.h
hw-ports.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
hw-ports.h
hw-properties.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
hw-properties.h
hw-tree.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
hw-tree.h
Make-common.in sim: set ASAN_OPTIONS=detect_leaks=0 when running igen and opc2c 2021-04-08 09:49:30 -04:00
nltvals.def sim: riscv: new port 2021-02-04 19:02:19 -05:00
nrun.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
run.1
sim-abort.c sim: common: add missing stdlib.h for abort() 2021-01-09 02:45:14 -05:00
sim-alu.h
sim-arange.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
sim-arange.h
sim-assert.h
sim-base.h
sim-basics.h sim: common: clean up asprintf includes a bit 2021-01-09 09:32:34 -05:00
sim-bits.c
sim-bits.h
sim-close.c
sim-command.c
sim-config.c sim: common: use sim_config_print name 2021-01-04 18:10:40 -05:00
sim-config.h sim: common: use sim_config_print name 2021-01-04 18:10:40 -05:00
sim-core.c sim: common: fix printf formats 2021-01-11 08:27:40 -05:00
sim-core.h
sim-cpu.c
sim-cpu.h
sim-endian.c
sim-endian.h
sim-engine.c
sim-engine.h
sim-events.c sim: watchpoints: use common sim_pc_get 2021-02-06 12:12:51 -05:00
sim-events.h sim: watchpoints: use common sim_pc_get 2021-02-06 12:12:51 -05:00
sim-fpu.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
sim-fpu.h
sim-hload.c
sim-hrw.c
sim-hw.c sim: hw: replace fgets with getline 2021-01-30 01:07:58 -05:00
sim-hw.h
sim-info.c
sim-inline.c
sim-inline.h
sim-io.c
sim-io.h
sim-load.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
sim-memopt.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
sim-memopt.h
sim-model.c
sim-model.h
sim-module.c
sim-module.h
sim-n-bits.h
sim-n-core.h
sim-n-endian.h
sim-options.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
sim-options.h sim: common: add a version output helper w/copyright+license info 2021-01-04 17:41:23 -05:00
sim-profile.c sim: profile: fix bucketing with 64-bit targets 2021-01-30 01:15:04 -05:00
sim-profile.h sim: common: use #error properly 2021-01-12 03:51:44 -05:00
sim-reason.c
sim-reg.c
sim-resume.c
sim-run.c
sim-signal.c
sim-signal.h
sim-stop.c
sim-syscall.c
sim-syscall.h
sim-trace.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
sim-trace.h
sim-types.h
sim-utils.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
sim-utils.h
sim-watch.c sim: watchpoints: use common sim_pc_get 2021-02-06 12:12:51 -05:00
sim-watch.h sim: watchpoints: use common sim_pc_get 2021-02-06 12:12:51 -05:00
syscall.c sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
version.h