]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
sim: arm: move build logic to source files
authorMike Frysinger <vapier@gentoo.org>
Sat, 24 Apr 2021 16:51:46 +0000 (12:51 -0400)
committerMike Frysinger <vapier@gentoo.org>
Sat, 1 May 2021 16:55:18 +0000 (12:55 -0400)
This simplifies the build logic a bit by just having source file
inputs.  It also simplifies code that assumes there's a source
file for each object.

sim/arm/ChangeLog
sim/arm/Makefile.in
sim/arm/armemu32.c [new file with mode: 0644]

index c466deb6fefc485694ebea46a7336f431a455fef..b60287f76319fd4bf35eef11166f7eaa32409c28 100644 (file)
@@ -1,3 +1,9 @@
+2021-05-01  Mike Frysinger  <vapier@gentoo.org>
+
+       * Makefile.in (SIM_OBJS): Change armemu26.o to armemu.o.
+       (armemu26.o, armemu32.o): Delete targets.
+       * armemu32.c: New file.
+
 2021-04-26  Mike Frysinger  <vapier@gentoo.org>
 
        * aclocal.m4, config.in, configure: Regenerate.
index 29166952ce16c547cc2538d283a2fa56463287b7..f339e799b9ef58e4e7f03e7c2253c9c11fd863d3 100644 (file)
@@ -23,16 +23,8 @@ SIM_EXTRA_LIBS = -lm
 SIM_OBJS = \
        wrapper.o \
        $(SIM_NEW_COMMON_OBJS) \
-       armemu26.o armemu32.o arminit.o armos.o armsupp.o \
+       armemu.o armemu32.o arminit.o armos.o armsupp.o \
        armvirt.o thumbemu.o \
        armcopro.o maverick.o iwmmxt.o
 
 ## COMMON_POST_CONFIG_FRAG
-
-armemu26.o: armemu.c
-       $(COMPILE) $(srcdir)/armemu.c
-       $(POSTCOMPILE)
-
-armemu32.o: armemu.c
-       $(COMPILE) -DMODE32 $(srcdir)/armemu.c
-       $(POSTCOMPILE)
diff --git a/sim/arm/armemu32.c b/sim/arm/armemu32.c
new file mode 100644 (file)
index 0000000..adf0bd9
--- /dev/null
@@ -0,0 +1,18 @@
+/* Build armemu.c with ARM32 support.
+   Copyright (C) 1995-2021 Free Software Foundation, Inc.
+
+   This program is free software; you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation; either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program; if not, see <https://www.gnu.org/licenses/>.  */
+
+#define MODE32
+#include "armemu.c"