sim: bpf: drop subdir configure logic

We've been using this only to set the default word size to 64.  We
can easily move this into the makefile via a -D compiler flag and
clean up the build logic quite a bit.
This commit is contained in:
Mike Frysinger 2022-11-07 22:59:30 +07:00
parent 1787fcc45a
commit ee79c7df30
7 changed files with 44 additions and 2979 deletions

View File

@ -247,21 +247,21 @@ CONFIG_HEADER = config.h
CONFIG_CLEAN_FILES = Make-common.sim aarch64/Makefile.sim \
aarch64/.gdbinit arm/Makefile.sim arm/.gdbinit \
avr/Makefile.sim avr/.gdbinit bfin/Makefile.sim bfin/.gdbinit \
bpf/.gdbinit cr16/Makefile.sim cr16/.gdbinit cris/Makefile.sim \
cris/.gdbinit d10v/Makefile.sim d10v/.gdbinit frv/Makefile.sim \
frv/.gdbinit ft32/Makefile.sim ft32/.gdbinit \
h8300/Makefile.sim h8300/.gdbinit iq2000/Makefile.sim \
iq2000/.gdbinit lm32/Makefile.sim lm32/.gdbinit \
m32c/Makefile.sim m32c/.gdbinit m32r/Makefile.sim \
m32r/.gdbinit m68hc11/Makefile.sim m68hc11/.gdbinit \
mcore/Makefile.sim mcore/.gdbinit microblaze/Makefile.sim \
microblaze/.gdbinit mips/.gdbinit mn10300/.gdbinit \
moxie/Makefile.sim moxie/.gdbinit msp430/Makefile.sim \
msp430/.gdbinit or1k/.gdbinit ppc/.gdbinit pru/Makefile.sim \
pru/.gdbinit riscv/Makefile.sim riscv/.gdbinit \
rl78/Makefile.sim rl78/.gdbinit rx/Makefile.sim rx/.gdbinit \
sh/Makefile.sim sh/.gdbinit erc32/Makefile.sim erc32/.gdbinit \
v850/.gdbinit example-synacor/Makefile.sim \
bpf/Makefile.sim bpf/.gdbinit cr16/Makefile.sim cr16/.gdbinit \
cris/Makefile.sim cris/.gdbinit d10v/Makefile.sim \
d10v/.gdbinit frv/Makefile.sim frv/.gdbinit ft32/Makefile.sim \
ft32/.gdbinit h8300/Makefile.sim h8300/.gdbinit \
iq2000/Makefile.sim iq2000/.gdbinit lm32/Makefile.sim \
lm32/.gdbinit m32c/Makefile.sim m32c/.gdbinit \
m32r/Makefile.sim m32r/.gdbinit m68hc11/Makefile.sim \
m68hc11/.gdbinit mcore/Makefile.sim mcore/.gdbinit \
microblaze/Makefile.sim microblaze/.gdbinit mips/.gdbinit \
mn10300/.gdbinit moxie/Makefile.sim moxie/.gdbinit \
msp430/Makefile.sim msp430/.gdbinit or1k/.gdbinit ppc/.gdbinit \
pru/Makefile.sim pru/.gdbinit riscv/Makefile.sim \
riscv/.gdbinit rl78/Makefile.sim rl78/.gdbinit rx/Makefile.sim \
rx/.gdbinit sh/Makefile.sim sh/.gdbinit erc32/Makefile.sim \
erc32/.gdbinit v850/.gdbinit example-synacor/Makefile.sim \
example-synacor/.gdbinit arch-subdir.mk .gdbinit
CONFIG_CLEAN_VPATH_FILES =
LIBRARIES = $(noinst_LIBRARIES)
@ -1700,6 +1700,8 @@ bfin/Makefile.sim: $(top_builddir)/config.status $(top_srcdir)/bfin/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
bfin/.gdbinit: $(top_builddir)/config.status $(top_srcdir)/common/gdbinit.in
cd $(top_builddir) && $(SHELL) ./config.status $@
bpf/Makefile.sim: $(top_builddir)/config.status $(top_srcdir)/bpf/Makefile.in
cd $(top_builddir) && $(SHELL) ./config.status $@
bpf/.gdbinit: $(top_builddir)/config.status $(top_srcdir)/common/gdbinit.in
cd $(top_builddir) && $(SHELL) ./config.status $@
cr16/Makefile.sim: $(top_builddir)/config.status $(top_srcdir)/cr16/Makefile.in

View File

@ -31,6 +31,8 @@ SIM_OBJS = \
$(BPF_GEN_OBJS) \
$(BPF_HAND_OBJS)
SIM_EXTRA_CFLAGS = -DWITH_TARGET_WORD_BITSIZE=64
SIM_EXTRA_CLEAN = bpf-clean
## COMMON_POST_CONFIG_FRAG

16
sim/bpf/aclocal.m4 vendored
View File

@ -1,16 +0,0 @@
# generated automatically by aclocal 1.15.1 -*- Autoconf -*-
# Copyright (C) 1996-2017 Free Software Foundation, Inc.
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
# PARTICULAR PURPOSE.
m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])])
m4_include([../m4/sim_ac_option_bitsize.m4])
m4_include([../m4/sim_ac_output.m4])

2932
sim/bpf/configure vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,7 +0,0 @@
dnl Process this file with autoconf to produce a configure script.
AC_INIT(Makefile.in)
AC_CONFIG_MACRO_DIRS([../m4 ../.. ../../config])
SIM_AC_OPTION_BITSIZE([64])
SIM_AC_OUTPUT

32
sim/configure vendored
View File

@ -726,6 +726,7 @@ SIM_ENABLE_ARCH_mips_TRUE
CC_FOR_TARGET_MIPS
LD_FOR_TARGET_MIPS
AS_FOR_TARGET_MIPS
subdirs
SIM_ENABLE_ARCH_microblaze_FALSE
SIM_ENABLE_ARCH_microblaze_TRUE
CC_FOR_TARGET_MICROBLAZE
@ -796,7 +797,6 @@ SIM_ENABLE_ARCH_bpf_TRUE
CC_FOR_TARGET_BPF
LD_FOR_TARGET_BPF
AS_FOR_TARGET_BPF
subdirs
SIM_ENABLE_ARCH_bfin_FALSE
SIM_ENABLE_ARCH_bfin_TRUE
CC_FOR_TARGET_BFIN
@ -1110,8 +1110,7 @@ CC_FOR_TARGET_V850
AS_FOR_TARGET_EXAMPLE_SYNACOR
LD_FOR_TARGET_EXAMPLE_SYNACOR
CC_FOR_TARGET_EXAMPLE_SYNACOR'
ac_subdirs_all='bpf
mips
ac_subdirs_all='mips
mn10300
or1k
ppc
@ -12429,7 +12428,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 12432 "configure"
#line 12431 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -12535,7 +12534,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 12538 "configure"
#line 12537 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@ -14544,10 +14543,11 @@ fi
SIM_PRIMARY_TARGET=bpf
fi
as_fn_append SIM_ENABLED_ARCHES " bpf"
ac_config_files="$ac_config_files bpf/Makefile.sim:bpf/Makefile.in"
ac_config_commands="$ac_config_commands bpf/Makefile"
subdirs="$subdirs bpf"
as_fn_append SIM_SUBDIRS " bpf"
ac_config_files="$ac_config_files bpf/.gdbinit:common/gdbinit.in"
@ -15159,7 +15159,9 @@ fi
SIM_PRIMARY_TARGET=mips
fi
as_fn_append SIM_ENABLED_ARCHES " mips"
subdirs="$subdirs mips"
subdirs="$subdirs mips"
ac_config_files="$ac_config_files mips/.gdbinit:common/gdbinit.in"
@ -17482,6 +17484,8 @@ do
"bfin/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS bfin/Makefile" ;;
"bfin/.gdbinit") CONFIG_FILES="$CONFIG_FILES bfin/.gdbinit:common/gdbinit.in" ;;
"depdir-bfin") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-bfin" ;;
"bpf/Makefile.sim") CONFIG_FILES="$CONFIG_FILES bpf/Makefile.sim:bpf/Makefile.in" ;;
"bpf/Makefile") CONFIG_COMMANDS="$CONFIG_COMMANDS bpf/Makefile" ;;
"bpf/.gdbinit") CONFIG_FILES="$CONFIG_FILES bpf/.gdbinit:common/gdbinit.in" ;;
"depdir-bpf") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir-bpf" ;;
"cr16/Makefile.sim") CONFIG_FILES="$CONFIG_FILES cr16/Makefile.sim:cr16/Makefile.in" ;;
@ -18964,6 +18968,18 @@ $as_echo X"$file" |
rm -f bfin/Makesim1.tmp bfin/Makesim2.tmp
;;
"depdir-bfin":C) $SHELL $ac_aux_dir/mkinstalldirs bfin/$DEPDIR ;;
"bpf/Makefile":C) sed -n \
-e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {
/^srcdir = / s:$:/bpf:
p
}' \
<Make-common.sim >bpf/Makesim1.tmp
sed -n -e '/^## COMMON_POST_/,/^## End COMMON_POST_/ p' <Make-common.sim >bpf/Makesim2.tmp
sed -e '/^## COMMON_PRE_/ r bpf/Makesim1.tmp' \
-e '/^## COMMON_POST_/ r bpf/Makesim2.tmp' \
<bpf/Makefile.sim >bpf/Makefile
rm -f bpf/Makesim1.tmp bpf/Makesim2.tmp
;;
"depdir-bpf":C) $SHELL $ac_aux_dir/mkinstalldirs bpf/$DEPDIR ;;
"cr16/Makefile":C) sed -n \
-e '/^## COMMON_PRE_/,/^## End COMMON_PRE_/ {

View File

@ -129,7 +129,7 @@ if test "${enable_sim}" != no; then
SIM_TARGET([arm*-*-*], [arm])
SIM_TARGET([avr*-*-*], [avr])
SIM_TARGET([bfin-*-*], [bfin])
SIM_TARGET([bpf-*-*], [bpf], [true])
SIM_TARGET([bpf-*-*], [bpf])
SIM_TARGET([cr16*-*-*], [cr16])
SIM_TARGET([cris-*-* | crisv32-*-*], [cris])
SIM_TARGET([d10v-*-*], [d10v])