aboutsummaryrefslogtreecommitdiff
path: root/sim/m32c
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2021-03-08 01:41:35 -0500
committerMike Frysinger <vapier@gentoo.org>2021-03-13 11:15:46 -0500
commitc6c7769d9dd166c45bd9d422e91ca537752c0382 (patch)
tree487321af5a03f0644e8d22048484d642b54a5bf8 /sim/m32c
parent367c5eb75095f4b9bc4c1b310a092bcac45da137 (diff)
downloadfsf-binutils-gdb-c6c7769d9dd166c45bd9d422e91ca537752c0382.zip
fsf-binutils-gdb-c6c7769d9dd166c45bd9d422e91ca537752c0382.tar.gz
fsf-binutils-gdb-c6c7769d9dd166c45bd9d422e91ca537752c0382.tar.bz2
sim: introduce {COMPILE,LINK}_FOR_BUILD
These use the same pattern as seen in the opcodes/ dir and in automake in general (ish). This helps simplify the boilerplate for building and linking build-time code, and fixes some inconsistency in flag usage. For rules that were compiling+linking in a single step, split them into separate steps so we can apply the correct set of options. This matches automake behavior too.
Diffstat (limited to 'sim/m32c')
-rw-r--r--sim/m32c/ChangeLog5
-rw-r--r--sim/m32c/Makefile.in6
2 files changed, 8 insertions, 3 deletions
diff --git a/sim/m32c/ChangeLog b/sim/m32c/ChangeLog
index d9997c7..85fd5c2 100644
--- a/sim/m32c/ChangeLog
+++ b/sim/m32c/ChangeLog
@@ -1,3 +1,8 @@
+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).
diff --git a/sim/m32c/Makefile.in b/sim/m32c/Makefile.in
index 91f52a7..6bc5c5b 100644
--- a/sim/m32c/Makefile.in
+++ b/sim/m32c/Makefile.in
@@ -53,13 +53,13 @@ m32c.c : m32c.opc opc2c
./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