COMPILE = $(COMPILE.pre) $(ALL_CFLAGS) $(COMPILE.post)
POSTCOMPILE = @true
+# igen leaks memory, and therefore makes AddressSanitizer unhappy. Disable
+# leak detection while running it.
+IGEN = ASAN_OPTIONS=detect_leaks=0 ../igen/igen
+
# Each simulator's Makefile.in defines one or more of these variables
# to override our settings as necessary. There is no need to define these
# in the simulator's Makefile.in if one is using the default value. In fact
+2021-04-08 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * Makefile.in: Set ASAN_OPTIONS when running opc2c.
+
2021-04-07 Simon Marchi <simon.marchi@polymtl.ca>
* opc2c.c (main): Remove vlist variable.
arch = m32c
+# opc2c leaks memory, and therefore makes AddressSanitizer unhappy. Disable
+# leak detection while running it.
+OPC2C = ASAN_OPTIONS=detect_leaks=0 ./opc2c
+
r8c.c : r8c.opc opc2c
- ./opc2c -l r8c.out $(srcdir)/r8c.opc > r8c.c
+ $(OPC2C) -l r8c.out $(srcdir)/r8c.opc > r8c.c.tmp
+ mv r8c.c.tmp r8c.c
m32c.c : m32c.opc opc2c
- ./opc2c -l m32c.out $(srcdir)/m32c.opc > m32c.c
+ $(OPC2C) -l m32c.out $(srcdir)/m32c.opc > m32c.c.tmp
+ mv m32c.c.tmp m32c.c
opc2c : opc2c.o safe-fgets.o
$(LINK_FOR_BUILD) $^
+2021-04-08 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * Makefile.in: Set ASAN_OPTIONS when running igen.
+
2021-04-04 Steve Ellcey <sellcey@mips.com>
Faraz Shahbazker <fshahbazker@wavecomp.com>
$(BUILT_SRC_FROM_IGEN): tmp-igen
tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
- ../igen/igen \
+ $(IGEN) \
$(IGEN_TRACE) \
-I $(srcdir) \
-Werror \
$(BUILT_SRC_FROM_M16): tmp-m16
tmp-m16: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
- ../igen/igen \
+ $(IGEN) \
$(IGEN_TRACE) \
-I $(srcdir) \
-Werror \
$(SHELL) $(srcdir)/../../move-if-change tmp-model.c m16_model.c
$(SHELL) $(srcdir)/../../move-if-change tmp-support.h m16_support.h
$(SHELL) $(srcdir)/../../move-if-change tmp-support.c m16_support.c
- ../igen/igen \
+ $(IGEN) \
$(IGEN_TRACE) \
-I $(srcdir) \
-Werror \
$(SHELL) $(srcdir)/../../move-if-change tmp-model.c m32_model.c
$(SHELL) $(srcdir)/../../move-if-change tmp-support.h m32_support.h
$(SHELL) $(srcdir)/../../move-if-change tmp-support.c m32_support.c
- ../igen/igen \
+ $(IGEN) \
$(IGEN_TRACE) \
-I $(srcdir) \
-Werror \
$(BUILT_SRC_FROM_MICROMIPS): tmp-micromips
tmp-micromips: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
- ../igen/igen \
+ $(IGEN) \
$(IGEN_TRACE) \
-I $(srcdir) \
-Werror \
micromips16_support.h
$(SHELL) $(srcdir)/../../move-if-change tmp-support.c \
micromips16_support.c
- ../igen/igen \
+ $(IGEN) \
$(IGEN_TRACE) \
-I $(srcdir) \
-Werror \
micromips32_support.h
$(SHELL) $(srcdir)/../../move-if-change tmp-support.c \
micromips32_support.c
- ../igen/igen \
+ $(IGEN) \
$(IGEN_TRACE) \
-I $(srcdir) \
-Werror \
micromips_m32_support.h
$(SHELL) $(srcdir)/../../move-if-change tmp-support.c \
micromips_m32_support.c
- ../igen/igen \
+ $(IGEN) \
$(IGEN_TRACE) \
-I $(srcdir) \
-Werror \
m16*) e="-B 16 -H 15 -o $(M16_DC) -F 16" ;; \
*) e="-B 32 -H 31 -o $(IGEN_DC) -F $${f}" ;; \
esac; \
- ../igen/igen \
+ $(IGEN) \
$(IGEN_TRACE) \
$${e} \
-I $(srcdir) \
done
touch tmp-mach-multi
tmp-itable-multi: $(IGEN_INSN) $(IGEN_DC) ../igen/igen $(IGEN_INCLUDE)
- ../igen/igen \
+ $(IGEN) \
$(IGEN_TRACE) \
-I $(srcdir) \
-Werror \
+2021-04-08 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * Makefile.in: Set ASAN_OPTIONS when running igen.
+
2021-04-02 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (../igen/igen): Delete rule.
IGEN_INSN=$(srcdir)/mn10300.igen $(srcdir)/am33.igen $(srcdir)/am33-2.igen
IGEN_DC=$(srcdir)/mn10300.dc
tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
- ../igen/igen \
+ $(IGEN) \
$(IGEN_TRACE) \
-G gen-direct-access \
-M mn10300,am33 -G gen-multi-sim=am33 \
+2021-04-08 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * Makefile.in: Set ASAN_OPTIONS when running igen.
+
2021-04-03 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (install): Install as run-ppc when not the primary arch.
$(IGEN_SMP) \
$(IGEN_LINE_NR)
+# igen/dgen leak memory, and therefore makes AddressSanitizer unhappy. Disable
+# leak detection while running them.
+
+IGEN = ASAN_OPTIONS=detect_leaks=0 ./igen
+DGEN = ASAN_OPTIONS=detect_leaks=0 ./dgen
+
.NOEXPORT:
MAKEOVERRIDES=
tmp-dgen: dgen ppc-spr-table $(srcdir)/../../move-if-change
- ./dgen $(DGEN_FLAGS) \
+ $(DGEN) $(DGEN_FLAGS) \
-r $(srcdir)/ppc-spr-table \
-n spreg.h -hp tmp-spreg.h \
-n spreg.c -p tmp-spreg.c
touch tmp-dgen
tmp-igen: igen $(srcdir)/ppc-instructions $(srcdir)/altivec.igen $(srcdir)/e500.igen $(IGEN_OPCODE_RULES) $(srcdir)/../../move-if-change tmp-ld-decode tmp-ld-cache tmp-ld-insn tmp-filter
- ./igen $(IGEN_FLAGS) \
+ $(IGEN) $(IGEN_FLAGS) \
-o $(srcdir)/$(IGEN_OPCODE_RULES) \
-I $(srcdir) -i $(srcdir)/ppc-instructions \
-n icache.h -hc tmp-icache.h \
+2021-04-08 Simon Marchi <simon.marchi@polymtl.ca>
+
+ * Makefile.in: Set ASAN_OPTIONS when running igen.
+
2021-04-02 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (../igen/igen): Delete rule.
IGEN_INSN=$(srcdir)/v850.igen
IGEN_DC=$(srcdir)/v850-dc
tmp-igen: $(IGEN_INSN) $(IGEN_DC) ../igen/igen
- ../igen/igen \
+ $(IGEN) \
$(IGEN_TRACE) \
-G gen-direct-access \
-G gen-zero-r0 \