8sa1-binutils-gdb/sim
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
..
aarch64 Aarch64 sim fix for gcc-10 miscompilation. 2021-04-07 18:51:52 -07:00
arm sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
avr sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
bfin sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
bpf sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
common sim: set ASAN_OPTIONS=detect_leaks=0 when running igen and opc2c 2021-04-08 09:49:30 -04:00
cr16 sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
cris sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
d10v sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
erc32 Adjust location of readline in sim/erc32 2021-04-05 06:53:35 -06:00
example-synacor sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
frv sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
ft32 sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
h8300 sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
igen sim: igen: merge build into top level 2021-04-02 23:35:47 -04:00
iq2000 sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
lm32 sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
m4 sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
m32c sim: set ASAN_OPTIONS=detect_leaks=0 when running igen and opc2c 2021-04-08 09:49:30 -04:00
m32r sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
m68hc11 sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
mcore sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
microblaze sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
mips sim: set ASAN_OPTIONS=detect_leaks=0 when running igen and opc2c 2021-04-08 09:49:30 -04:00
mn10300 sim: set ASAN_OPTIONS=detect_leaks=0 when running igen and opc2c 2021-04-08 09:49:30 -04:00
moxie sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
msp430 sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
or1k sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
ppc sim: set ASAN_OPTIONS=detect_leaks=0 when running igen and opc2c 2021-04-08 09:49:30 -04:00
pru sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
riscv sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
rl78 sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
rx sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
sh sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
testsuite sim: testsuite: support exit 77 for unsupported tests 2021-04-08 00:48:54 -04:00
v850 sim: set ASAN_OPTIONS=detect_leaks=0 when running igen and opc2c 2021-04-08 09:49:30 -04:00
.gitignore
aclocal.m4 sim: unify toolchain settings 2021-04-02 23:31:14 -04:00
ChangeLog sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
configure sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
configure.ac sim: example-synacor: a simple implementation for reference 2021-04-03 16:19:16 -04:00
MAINTAINERS sim: readd myself as a maintainer 2021-01-29 22:11:45 -05:00
Makefile.am sim: testsuite: integrate common tests into build 2021-04-03 15:34:13 -04:00
Makefile.in sim: testsuite: integrate common tests into build 2021-04-03 15:34:13 -04:00
README-HACKING sim: delete unused SIM_EXTRA_LIBDEPS 2021-02-28 01:39:02 -05:00