mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2025-02-17 13:10:12 +08:00
sim: build: drop support for creating libsim.a in subdirs
Now that all ports have moved to creating libsim.a in the top-level, drop all the support code to create it in a subdir.
This commit is contained in:
parent
7a59a0b92c
commit
e732fe9b4f
@ -188,9 +188,6 @@ endif
|
||||
## Helper targets for running make from the top-level when some subdirs still
|
||||
## have Makefiles in subdirs.
|
||||
|
||||
%/libsim.a: | $(SIM_ALL_RECURSIVE_DEPS)
|
||||
$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
|
||||
|
||||
%/nrun.o: common/nrun.c | %/libsim.a $(SIM_ALL_RECURSIVE_DEPS)
|
||||
$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
|
||||
|
||||
|
@ -5485,9 +5485,6 @@ testsuite/common/bits64m63.c: testsuite/common/bits-gen$(EXEEXT) testsuite/commo
|
||||
@SIM_ENABLE_ARCH_v850_TRUE@ -n irun.c -r v850/irun.c
|
||||
@SIM_ENABLE_ARCH_v850_TRUE@ $(AM_V_at)touch $@
|
||||
|
||||
%/libsim.a: | $(SIM_ALL_RECURSIVE_DEPS)
|
||||
$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
|
||||
|
||||
%/nrun.o: common/nrun.c | %/libsim.a $(SIM_ALL_RECURSIVE_DEPS)
|
||||
$(MAKE) $(AM_MAKEFLAGS) -C $(@D) $(@F)
|
||||
|
||||
|
@ -44,8 +44,6 @@ The Makefile.in of a simulator using the common framework should look like:
|
||||
# Not all of these need to be mentioned, only the necessary ones.
|
||||
# In fact it is better to *not* mention ones if the value is the default.
|
||||
|
||||
# List of object files, less common parts.
|
||||
SIM_OBJS =
|
||||
# List of flags to always pass to $(CC).
|
||||
SIM_EXTRA_CFLAGS =
|
||||
# Dependency of `clean' to clean any extra files.
|
||||
@ -53,8 +51,6 @@ SIM_EXTRA_CLEAN =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
||||
# Rules need to build $(SIM_OBJS), plus whatever else the target wants.
|
||||
|
||||
... target specific rules ...
|
||||
--- snip ---
|
||||
|
||||
|
@ -20,7 +20,4 @@
|
||||
### along with this program. If not, see <http://www.gnu.org/licenses/>. */
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -35,7 +35,6 @@ LDFLAGS = @LDFLAGS@
|
||||
AR = @AR@
|
||||
AR_FLAGS = rc
|
||||
RANLIB = @RANLIB@
|
||||
DTC = @DTC@
|
||||
|
||||
LIBTOOL = @LIBTOOL@
|
||||
AM_V_lt = $(am__v_lt_@AM_V@)
|
||||
@ -65,5 +64,3 @@ MAINT = ; @true
|
||||
SIM_INLINE = @SIM_INLINE@
|
||||
|
||||
SIM_HW_CFLAGS = @SIM_HW_CFLAGS@
|
||||
SIM_HW_OBJS = $(SIM_HW_DEVICES:%=dv-%.o)
|
||||
@SIM_ENABLE_HW_FALSE@SIM_HW_OBJS =
|
||||
|
@ -19,6 +19,4 @@
|
||||
|
||||
SIM_EXTRA_CFLAGS = -DMODET
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -15,7 +15,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -19,8 +19,6 @@
|
||||
|
||||
arch = bfin
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
SIM_EXTRA_CFLAGS = $(SDL_CFLAGS)
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
SIM_EXTRA_CFLAGS = -DWITH_TARGET_WORD_BITSIZE=64
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -83,24 +83,18 @@ POSTCOMPILE = @true
|
||||
# in the simulator's Makefile.in if one is using the default value. In fact
|
||||
# it's preferable not to.
|
||||
|
||||
# List of object files, less common parts.
|
||||
SIM_OBJS =
|
||||
# List of flags to always pass to $(CC).
|
||||
SIM_EXTRA_CFLAGS =
|
||||
# List of main object files for `run'.
|
||||
SIM_RUN_OBJS = nrun.o
|
||||
SIM_LIBSIM = libsim.a
|
||||
# Dependency of `clean' to clean any extra files.
|
||||
SIM_EXTRA_CLEAN =
|
||||
|
||||
# Every time a new general purpose source file was added every target's
|
||||
# Makefile.in needed to be updated to include the file in SIM_OBJS.
|
||||
# Makefile.in needed to be updated to include the file.
|
||||
# This doesn't scale.
|
||||
# This variable specifies all the generic stuff common to the newer simulators.
|
||||
# Things like sim-reason.o can't go here as the cpu may provide its own
|
||||
# (though hopefully in time that won't be so). Things like sim-bits.o can go
|
||||
# here. Some files are used by all simulators (e.g. callback.o).
|
||||
# Those files are specified in LIB_OBJS below.
|
||||
|
||||
## End COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
@ -124,9 +118,6 @@ BUILD_CFLAGS = $(CFLAGS_FOR_BUILD) $(CSEARCH)
|
||||
|
||||
COMMON_DEP_CFLAGS = $(CONFIG_CFLAGS) $(CSEARCH) $(SIM_EXTRA_CFLAGS)
|
||||
|
||||
SIM_HW_DEVICES = $(SIM_HW_DEVICES_) $($(arch)_SIM_EXTRA_HW_DEVICES)
|
||||
SIM_NEW_COMMON_OBJS = $(SIM_NEW_COMMON_OBJS_) $(SIM_HW_OBJS)
|
||||
|
||||
LIBIBERTY_LIB = ../../libiberty/libiberty.a
|
||||
BFD_LIB = ../../bfd/libbfd.la
|
||||
OPCODES_LIB = ../../opcodes/libopcodes.la
|
||||
@ -134,31 +125,12 @@ LIBDEPS = $(BFD_LIB) $(OPCODES_LIB) $(LIBIBERTY_LIB)
|
||||
EXTRA_LIBS = $(BFD_LIB) $(OPCODES_LIB) $(LIBIBERTY_LIB) \
|
||||
$(COMMON_LIBS) $(LIBGNU) $(LIBGNU_EXTRA_LIBS)
|
||||
|
||||
COMMON_OBJS_NAMES = \
|
||||
callback.o \
|
||||
portability.o \
|
||||
sim-load.o \
|
||||
syscall.o \
|
||||
target-newlib-errno.o \
|
||||
target-newlib-open.o \
|
||||
target-newlib-signal.o \
|
||||
target-newlib-syscall.o \
|
||||
version.o
|
||||
COMMON_OBJS = $(COMMON_OBJS_NAMES:%=../common/%)
|
||||
|
||||
LIB_OBJS = modules.o $(COMMON_OBJS) $(SIM_OBJS)
|
||||
|
||||
COMPILE_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS)
|
||||
LINK_FOR_BUILD = $(CC_FOR_BUILD) $(BUILD_CFLAGS) $(LDFLAGS_FOR_BUILD) -o $@
|
||||
|
||||
RUNTESTFLAGS =
|
||||
|
||||
all: $(SIM_LIBSIM) $(LIB_OBJS) $(SIM_RUN_OBJS)
|
||||
|
||||
libsim.a: $(LIB_OBJS)
|
||||
$(SILENCE) rm -f libsim.a
|
||||
$(ECHO_AR) $(AR) $(AR_FLAGS) libsim.a $(LIB_OBJS)
|
||||
$(ECHO_RANLIB) $(RANLIB) libsim.a
|
||||
all:
|
||||
|
||||
#
|
||||
# Dependency tracking. Most of this is conditional on GNU Make being
|
||||
@ -182,11 +154,6 @@ override COMPILE.pre = source='$<' object='$@' libtool=no \
|
||||
override POSTCOMPILE =
|
||||
endif
|
||||
|
||||
all_object_files = $(LIB_OBJS) $(SIM_RUN_OBJS)
|
||||
|
||||
# Dependencies.
|
||||
-include $(patsubst %.o, $(DEPDIR)/%.Po, $(all_object_files))
|
||||
|
||||
test-hw-events: $(srccom)/hw-events.c libsim.a
|
||||
$(ECHO_CCLD) $(LIBTOOL) $(AM_V_lt) --tag=CC --mode=link \
|
||||
$(CC) $(ALL_CFLAGS) -DMAIN -o test-hw-events$(EXEEXT) \
|
||||
@ -194,7 +161,7 @@ test-hw-events: $(srccom)/hw-events.c libsim.a
|
||||
|
||||
# See sim_pre_argv_init and sim_module_install in sim-module.c for more details.
|
||||
modules.c: stamp-modules ; @true
|
||||
stamp-modules: Makefile $(SIM_OBJS:.o=.c)
|
||||
stamp-modules: Makefile
|
||||
$(ECHO_STAMP) modules.c
|
||||
$(SILENCE) LANG=C ; export LANG ; \
|
||||
LC_ALL=C ; export LC_ALL ; \
|
||||
@ -248,7 +215,6 @@ TAGS: force
|
||||
|
||||
mostlyclean clean: $(SIM_EXTRA_CLEAN)
|
||||
rm -f *.[oa] *~ core \
|
||||
run$(EXEEXT) libsim.a \
|
||||
modules.c stamp-modules
|
||||
|
||||
distclean maintainer-clean realclean: clean
|
||||
|
@ -16,7 +16,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -21,6 +21,4 @@
|
||||
|
||||
arch = cris
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -16,7 +16,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -18,9 +18,6 @@
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
SIM_RUN_OBJS =
|
||||
|
||||
READLINE_SRC = $(srcroot)/readline/readline
|
||||
|
||||
SIM_EXTRA_CFLAGS = $(READLINE_CFLAGS)
|
||||
|
@ -16,7 +16,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -17,8 +17,6 @@
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
SIM_EXTRA_CFLAGS = @SIM_FRV_TRAPDUMP_FLAGS@
|
||||
|
||||
# Some modules don't build cleanly yet.
|
||||
|
@ -16,7 +16,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -16,7 +16,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -16,9 +16,6 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
||||
arch = iq2000
|
||||
|
@ -5,6 +5,4 @@
|
||||
|
||||
arch = lm32
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -22,7 +22,4 @@
|
||||
|
||||
SIM_EXTRA_CFLAGS = -DTIMER_A
|
||||
|
||||
SIM_LIBSIM =
|
||||
SIM_RUN_OBJS =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -21,8 +21,6 @@
|
||||
|
||||
arch = m32r
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
# Some modules don't build cleanly yet.
|
||||
cpu.o cpu2.o cpux.o m32r.o m32r2.o m32rx.o mloop.o mloop2.o mloopx.o sem.o sim-if.o traps.o: SIM_WERROR_CFLAGS =
|
||||
|
||||
|
@ -19,8 +19,6 @@
|
||||
|
||||
arch = m68hc11
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
# We must use 32-bit addresses to support memory bank switching.
|
||||
# The WORD_BITSIZE is normally 16 but must be switched (temporarily)
|
||||
# to 32 to avoid a bug in the sim-common which uses 'unsigned_word'
|
||||
|
@ -16,7 +16,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -16,7 +16,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -5,8 +5,6 @@
|
||||
|
||||
arch = mips
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
# List of flags to always pass to $(CC).
|
||||
SIM_EXTRA_CFLAGS = @SIM_MIPS_SUBTARGET@
|
||||
|
||||
|
@ -19,8 +19,6 @@
|
||||
|
||||
arch = mn10300
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
# List of extra flags to always pass to $(CC).
|
||||
SIM_EXTRA_CFLAGS = \
|
||||
-DPOLL_QUIT_INTERVAL=0x20 \
|
||||
|
@ -17,8 +17,6 @@
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
SIM_EXTRA_CFLAGS = -DDTB="\"$(dtbdir)/moxie-gdb.dtb\""
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -17,7 +17,4 @@
|
||||
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -18,8 +18,6 @@
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
SIM_EXTRA_CFLAGS = -DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -18,7 +18,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -17,8 +17,6 @@
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
SIM_EXTRA_CFLAGS = -DWITH_TARGET_WORD_BITSIZE=@SIM_RISCV_BITSIZE@
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -19,8 +19,4 @@
|
||||
### along with the GNU simulators; if not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
SIM_RUN_OBJS =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -22,7 +22,4 @@
|
||||
|
||||
SIM_EXTRA_CFLAGS = @SIM_RX_CYCLE_ACCURATE_FLAGS@
|
||||
|
||||
SIM_LIBSIM =
|
||||
SIM_RUN_OBJS =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -16,7 +16,4 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
@ -17,8 +17,6 @@
|
||||
|
||||
## COMMON_PRE_CONFIG_FRAG
|
||||
|
||||
SIM_LIBSIM =
|
||||
|
||||
SIM_EXTRA_CFLAGS = -DWITH_TARGET_WORD_BITSIZE=32 -DWITH_TARGET_WORD_MSB=31
|
||||
|
||||
## COMMON_POST_CONFIG_FRAG
|
||||
|
Loading…
Reference in New Issue
Block a user