binutils-gdb/sim/m32c
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
..
aclocal.m4 sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
ChangeLog sim: set ASAN_OPTIONS=detect_leaks=0 when running igen and opc2c 2021-04-08 09:49:30 -04:00
config.in sim: clean up C11 header includes 2021-01-11 08:05:54 -05:00
configure sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
configure.ac sim: common: split up acinclude.m4 into individual m4 files 2021-02-21 02:20:19 -05:00
cpu.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
gdb-if.c sim: erc32/m32c/rl78: add sim_memory_map stub for gdb 2021-02-06 12:15:34 -05:00
int.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
int.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
load.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
load.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
m32c.opc Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
main.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
Makefile.in sim: set ASAN_OPTIONS=detect_leaks=0 when running igen and opc2c 2021-04-08 09:49:30 -04:00
mem.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
mem.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
misc.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
misc.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
opc2c.c sim: m32c: opc2c: remove unused vlist variable 2021-04-07 07:41:33 -04:00
r8c.opc Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
reg.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
safe-fgets.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
safe-fgets.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
srcdest.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
syscall.h
syscalls.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
syscalls.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
timer_a.h
trace.c Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00
trace.h Update copyright year range in all GDB files 2021-01-01 12:12:21 +04:00