+2021-03-13 Mike Frysinger <vapier@gentoo.org>
+
+ * Make-common.in (COMPILE_FOR_BUILD, LINK_FOR_BUILD): Define.
+ (gentmap.o): New rule.
+ (gentmap): Call LINK_FOR_BUILD.
+
2021-03-07 Mike Frysinger <vapier@gentoo.org>
* Make-common.in (check): Delete body.
LIB_OBJS = callback.o syscall.o targ-map.o version.o $(SIM_OBJS)
+COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS)
+LINK_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@
+
RUNTESTFLAGS =
callback_h = $(srcroot)/include/gdb/callback.h
# devo/libremote because this directory would contain more than just
# a library).
-gentmap: Makefile $(srccom)/gentmap.c $(srccom)/nltvals.def
- $(CC_FOR_BUILD) $(srccom)/gentmap.c -o gentmap $(BUILD_CFLAGS) $(NL_TARGET)
+gentmap.o: Makefile $(srccom)/gentmap.c $(srccom)/nltvals.def
+ $(COMPILE_FOR_BUILD) -o $@ -c $(srccom)/gentmap.c $(NL_TARGET)
+
+gentmap: gentmap.o
+ $(LINK_FOR_BUILD) $<
targ-vals.h targ-map.c: stamp-tvals
stamp-tvals: gentmap
+2021-03-13 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (gencode.o, cr16-opc.o): Call COMPILE_FOR_BUILD.
+ (gencode): Call LINK_FOR_BUILD.
+
2021-03-08 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (gencode): Delete $(BUILD_LIB).
./gencode >$@
gencode.o: gencode.c $(INCLUDE)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(WARN_CFLAGS) -c $(srcdir)/gencode.c
+ $(COMPILE_FOR_BUILD) $(WARN_CFLAGS) -c $(srcdir)/gencode.c
cr16-opc.o: $(srcdir)/../../opcodes/cr16-opc.c
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(WARN_CFLAGS) -c $(srcdir)/../../opcodes/cr16-opc.c
+ $(COMPILE_FOR_BUILD) $(WARN_CFLAGS) -c $(srcdir)/../../opcodes/cr16-opc.c
gencode: gencode.o cr16-opc.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o gencode gencode.o cr16-opc.o
+ $(LINK_FOR_BUILD) gencode.o cr16-opc.o
clean-extra:
rm -f table.c simops.h gencode
+2021-03-13 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (gencode.o, d10v-opc.o): Call COMPILE_FOR_BUILD.
+ (gencode): Call LINK_FOR_BUILD.
+
2021-03-08 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (gencode): Delete $(BUILD_LIB).
./gencode >$@
gencode.o: gencode.c $(INCLUDE)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(WARN_CFLAGS) -c $(srcdir)/gencode.c
+ $(COMPILE_FOR_BUILD) $(WARN_CFLAGS) -c $(srcdir)/gencode.c
d10v-opc.o: $(srcdir)/../../opcodes/d10v-opc.c
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(WARN_CFLAGS) -c $(srcdir)/../../opcodes/d10v-opc.c
+ $(COMPILE_FOR_BUILD) $(WARN_CFLAGS) -c $(srcdir)/../../opcodes/d10v-opc.c
gencode: gencode.o d10v-opc.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o gencode gencode.o d10v-opc.o
+ $(LINK_FOR_BUILD) gencode.o d10v-opc.o
clean-extra:
rm -f table.c simops.h gencode
+2021-03-13 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (COMPILE_FOR_BUILD, LINK_FOR_BUILD): Define.
+ (.c.o, igen.o): Call COMPILE_FOR_BUILD.
+ (igen, tmp-table, tmp-filter, tmp-ld-decode, tmp-ld-cache, tmp-ld-insn,
+ tmp-gen): Call LINK_FOR_BUILD.
+
2021-03-08 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (tmp-table, tmp-filter, tmp-ld-decode, tmp-ld-cache,
$(INCLUDES)
BUILD_LDFLAGS =
+COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS)
+LINK_FOR_BUILD = $(CC_FOR_BUILD) $(CFLAGS_FOR_BUILD) $(BUILD_LDFLAGS) -o $@
+
all: igen
#all: tmp-filter tmp-table tmp-ld-insn tmp-ld-cache tmp-ld-decode tmp-gen
.c.o:
- $(CC_FOR_BUILD) -c $(BUILD_CFLAGS) $<
+ $(COMPILE_FOR_BUILD) -c $<
IGEN_OBJS=\
table.o \
gen.o
igen: igen.o $(IGEN_OBJS)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o igen igen.o $(IGEN_OBJS)
+ $(LINK_FOR_BUILD) igen.o $(IGEN_OBJS)
igen.o: igen.c misc.h filter_host.h lf.h table.h ld-decode.h ld-cache.h ld-insn.h filter.h gen-model.h gen-itable.h gen-icache.h gen-idecode.h gen-engine.h gen-semantics.h gen-support.h gen.h igen.h
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/igen.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/igen.c
tmp-table: table.c table.h misc.o lf.o filter_host.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-table -DMAIN $(srcdir)/table.c misc.o lf.o filter_host.o
+ $(LINK_FOR_BUILD) -DMAIN $(srcdir)/table.c misc.o lf.o filter_host.o
tmp-filter: filter.c filter.h lf.o misc.o filter_host.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-filter -DMAIN $(srcdir)/filter.c lf.o misc.o filter_host.o
+ $(LINK_FOR_BUILD) -DMAIN $(srcdir)/filter.c lf.o misc.o filter_host.o
tmp-ld-decode: ld-decode.h ld-decode.c filter.o misc.o lf.o table.o filter_host.o gen.h igen.h
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-decode -DMAIN $(srcdir)/ld-decode.c filter.o misc.o lf.o table.o filter_host.o
+ $(LINK_FOR_BUILD) -DMAIN $(srcdir)/ld-decode.c filter.o misc.o lf.o table.o filter_host.o
tmp-ld-cache: ld-cache.c ld-cache.h ld-insn.o misc.o lf.o table.o filter_host.o gen.h igen.h
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-cache -DMAIN $(srcdir)/ld-cache.c ld-insn.o filter.o misc.o lf.o table.o filter_host.o
+ $(LINK_FOR_BUILD) -DMAIN $(srcdir)/ld-cache.c ld-insn.o filter.o misc.o lf.o table.o filter_host.o
tmp-ld-insn: ld-insn.c ld-insn.h misc.o lf.o table.o filter_host.o filter.o gen.h igen.h
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c misc.o lf.o table.o filter_host.o filter.o
+ $(LINK_FOR_BUILD) -DMAIN $(srcdir)/ld-insn.c misc.o lf.o table.o filter_host.o filter.o
tmp-gen: gen.c gen.h ld-insn.o ld-decode.o misc.o lf.o table.o filter_host.o filter.o gen.h igen.h
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-gen -DMAIN $(srcdir)/gen.c misc.o ld-insn.o ld-decode.o lf.o table.o filter_host.o filter.o
+ $(LINK_FOR_BUILD) -DMAIN $(srcdir)/gen.c misc.o ld-insn.o ld-decode.o lf.o table.o filter_host.o filter.o
filter_host.o: filter_host.c filter_host.h
table.o: table.c misc.h filter_host.h lf.h table.h
+2021-03-13 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (opc2c.o, safe-fgets.o): Call COMPILE_FOR_BUILD.
+ (opc2c): Call LINK_FOR_BUILD.
+
2021-03-08 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (opc2c): Delete $(BUILD_LIBS).
./opc2c -l m32c.out $(srcdir)/m32c.opc > m32c.c
opc2c : opc2c.o safe-fgets.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) $^ -o $@
+ $(LINK_FOR_BUILD) $^
encodings:
grep '/\* [01]' $(srcdir)/r8c.opc | sort
opc2c.o : opc2c.c safe-fgets.h
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/opc2c.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/opc2c.c
safe-fgets.o : safe-fgets.c safe-fgets.h
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/safe-fgets.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/safe-fgets.c
+2021-03-13 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (gencode.o): New rule.
+ (gencode): Call LINK_FOR_BUILD.
+
2021-02-28 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
m68hc12int.c: gencode
./gencode -m6812 > $@
-gencode: gencode.c
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -o gencode $(srcdir)/gencode.c
+gencode.o: gencode.c
+ $(COMPILE_FOR_BUILD) -c $< -o $@
+
+gencode: gencode.o
+ $(LINK_FOR_BUILD) $^
interp.o: interp.c $(INCLUDE)
+2021-03-13 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (COMPILE_FOR_BUILD, LINK_FOR_BUILD): Define.
+ Change $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) to
+ $(LINK_FOR_BUILD). Change $(CC_FOR_BUILD) $(BUILD_CFLAGS) to
+ $(COMPILE_FOR_BUILD).
+
2021-03-08 Mike Frysinger <vapier@gentoo.org>
* Makefile.in (gentmap, dgen, igen, tmp-filter, tmp-ld-decode,
BUILD_LDFLAGS =
LIBS = @LIBS@
+COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS)
+LINK_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o $@
+
CONFIG_FILE = @sim_config@
IGEN_OPCODE_RULES = @sim_opcode@
IGEN_DECODE_MECHANISM = @sim_decode_mechanism@
# GDB after 4.16 expects the default_callback structure to be setup.
# As a kludge, build the common stuff here for now.
gentmap: $(srcdir)/../common/gentmap.c Makefile targ-vals.def
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -I. -I../common -I$(srcdir)/../common \
- -o gentmap $(srcdir)/../common/gentmap.c
+ $(LINK_FOR_BUILD) -I. -I../common -I$(srcdir)/../common \
+ $(srcdir)/../common/gentmap.c
targ-vals.def: $(srcdir)/../common/nltvals.def
rm -f targ-vals.def tmp-def
spreg.h spreg.c: tmp-dgen
dgen: dgen.o table.o lf.o misc.o filter_host.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -o dgen dgen.o table.o lf.o misc.o filter_host.o
+ $(LINK_FOR_BUILD) dgen.o table.o lf.o misc.o filter_host.o
igen: igen.o table.o lf.o misc.o filter_host.o ld-decode.o ld-cache.o filter.o ld-insn.o gen-model.o gen-itable.o gen-icache.o gen-semantics.o gen-idecode.o gen-support.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o igen igen.o table.o lf.o misc.o filter_host.o ld-decode.o ld-cache.o filter.o ld-insn.o gen-model.o gen-itable.o gen-icache.o gen-semantics.o gen-idecode.o gen-support.o
+ $(LINK_FOR_BUILD) igen.o table.o lf.o misc.o filter_host.o ld-decode.o ld-cache.o filter.o ld-insn.o gen-model.o gen-itable.o gen-icache.o gen-semantics.o gen-idecode.o gen-support.o
filter_host.c: filter_filename.c
cat $(srcdir)/filter_filename.c > filter_host.c
filter_host.o: filter_host.c $(CONFIG_H) $(PPC_CONFIG_H) $(FILTER_FILENAME_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c filter_host.c
+ $(COMPILE_FOR_BUILD) -c filter_host.c
table.o: table.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/table.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/table.c
lf.o: lf.c $(CONFIG_H) $(MISC_H) $(LF_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/lf.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/lf.c
filter.o: filter.c $(CONFIG_H) $(MISC_H) $(FILTER_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/filter.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/filter.c
tmp-filter: filter.c $(MISC_H) misc.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-filter -DMAIN $(srcdir)/filter.c misc.o
+ $(LINK_FOR_BUILD) -DMAIN $(srcdir)/filter.c misc.o
ld-decode.o: ld-decode.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_DECODE_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-decode.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/ld-decode.c
tmp-ld-decode: ld-decode.c misc.o lf.o table.o filter_host.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-decode -DMAIN $(srcdir)/ld-decode.c misc.o lf.o table.o filter_host.o
+ $(LINK_FOR_BUILD) -DMAIN $(srcdir)/ld-decode.c misc.o lf.o table.o filter_host.o
ld-cache.o: ld-cache.c $(MISC_H) $(LF_H) $(TABLE_H) $(LD_CACHE_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-cache.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/ld-cache.c
tmp-ld-cache: ld-cache.c misc.o lf.o table.o filter_host.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-cache -DMAIN $(srcdir)/ld-cache.c misc.o lf.o table.o filter_host.o
+ $(LINK_FOR_BUILD) -DMAIN $(srcdir)/ld-cache.c misc.o lf.o table.o filter_host.o
ld-insn.o: ld-insn.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/ld-insn.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/ld-insn.c
tmp-ld-insn: ld-insn.c ld-cache.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) -o tmp-ld-insn -DMAIN $(srcdir)/ld-insn.c ld-cache.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
+ $(LINK_FOR_BUILD) -DMAIN $(srcdir)/ld-insn.c ld-cache.o misc.o lf.o table.o ld-decode.o filter_host.o filter.o
gen-model.o: gen-model.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_CACHE_H) $(LD_DECODE_H) $(LD_INSN_H) $(GEN_MODEL_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-model.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/gen-model.c
gen-itable.o: gen-itable.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_CACHE_H) $(LD_DECODE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_ITABLE_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-itable.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/gen-itable.c
gen-icache.o: gen-icache.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_SEMANTICS_H) $(GEN_IDECODE_H) $(GEN_ICACHE_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-icache.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/gen-icache.c
gen-semantics.o: gen-semantics.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_SEMANTICS_H) $(GEN_ICACHE_H) $(GEN_IDECODE_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-semantics.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/gen-semantics.c
gen-idecode.o: gen-idecode.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_IDECODE_H) $(GEN_ICACHE_H) $(GEN_SEMANTICS_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-idecode.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/gen-idecode.c
gen-support.o: gen-support.c $(MISC_H) $(LF_H) $(TABLE_H) $(FILTER_H) $(LD_DECODE_H) $(LD_CACHE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_SEMANTICS_H) $(GEN_SUPPORT_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/gen-support.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/gen-support.c
dgen.o: dgen.c $(CONFIG_H) $(MISC_H) $(LF_H) $(TABLE_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/dgen.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/dgen.c
igen.o: igen.c $(MISC_H) $(LF_H) $(TABLE_H) $(CONFIG_H) $(FILTER_H) $(LD_CACHE_H) $(LD_DECODE_H) $(LD_INSN_H) $(IGEN_H) $(GEN_MODEL_H) $(GEN_ICACHE_H) $(GEN_ITABLE_H) $(GEN_IDECODE_H) $(GEN_SEMANTICS_H) $(GEN_SUPPORT_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/igen.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/igen.c
misc.o: misc.c $(CONFIG_H) $(MISC_H)
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) -c $(srcdir)/misc.c
+ $(COMPILE_FOR_BUILD) -c $(srcdir)/misc.c
+2021-03-13 Mike Frysinger <vapier@gentoo.org>
+
+ * Makefile.in (gencode.o): New rule.
+ (gencode): Call LINK_FOR_BUILD.
+
2021-02-28 Mike Frysinger <vapier@gentoo.org>
* configure: Regenerate.
ppi.c: gencode
./gencode -p >ppi.c
-gencode: gencode.c
- $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(BUILD_LDFLAGS) $(WARN_CFLAGS) \
- -o gencode $(srcdir)/gencode.c
+gencode.o: gencode.c
+ $(COMPILE_FOR_BUILD) -c $< -o $@
+
+gencode: gencode.o
+ $(LINK_FOR_BUILD) $^
sh-clean:
rm -f gencode code.c table.c