diff options
-rw-r--r-- | Makefile.in | 1 | ||||
-rwxr-xr-x | configure | 97 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | disasm/disasm.ac | 0 | ||||
-rw-r--r-- | disasm/disasm.cc (renamed from spike_main/disasm.cc) | 0 | ||||
-rw-r--r-- | disasm/disasm.mk.in | 5 | ||||
-rw-r--r-- | disasm/regnames.cc (renamed from riscv/regnames.cc) | 0 | ||||
-rw-r--r-- | riscv/riscv.ac | 5 | ||||
-rw-r--r-- | riscv/riscv.mk.in | 1 | ||||
-rw-r--r-- | spike_dasm/spike-dasm.cc (renamed from spike_main/spike-dasm.cc) | 2 | ||||
-rw-r--r-- | spike_dasm/spike_dasm.ac | 0 | ||||
-rw-r--r-- | spike_dasm/spike_dasm.mk.in | 9 | ||||
l--------- | spike_dasm/spike_dasm_option_parser.cc | 1 | ||||
-rw-r--r-- | spike_main/spike_main.mk.in | 2 |
14 files changed, 121 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in index 17a2bd5..7f14602 100644 --- a/Makefile.in +++ b/Makefile.in @@ -37,6 +37,7 @@ src_dir := @srcdir@ scripts_dir := $(src_dir)/scripts HAVE_INT128 := @HAVE_INT128@ +HAVE_DLOPEN := @HAVE_DLOPEN@ # If the version information is not in the configure script, then we # assume that we are in a working directory. We use the vcs-version.sh @@ -626,6 +626,7 @@ ac_subst_vars='LTLIBOBJS LIBOBJS subprojects_enabled subprojects +HAVE_DLOPEN HAVE_INT128 INSTALL_DATA INSTALL_SCRIPT @@ -4852,7 +4853,11 @@ ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" + $as_echo "#define HAVE_DLOPEN /**/" >>confdefs.h +, + HAVE_DLOPEN=yes + fi @@ -4984,6 +4989,51 @@ fi # Add subproject to our running list + subprojects="$subprojects disasm" + + # Process the subproject appropriately. If enabled add it to the + # $enabled_subprojects running shell variable, set a + # SUBPROJECT_ENABLED C define, and include the appropriate + # 'subproject.ac'. + + + { $as_echo "$as_me:${as_lineno-$LINENO}: configuring default subproject : disasm" >&5 +$as_echo "$as_me: configuring default subproject : disasm" >&6;} + ac_config_files="$ac_config_files disasm.mk:disasm/disasm.mk.in" + + enable_disasm_sproj="yes" + subprojects_enabled="$subprojects_enabled disasm" + +$as_echo "#define DISASM_ENABLED /**/" >>confdefs.h + + + + + + + # Determine if this is a required or an optional subproject + + + + # Determine if there is a group with the same name + + + + # Create variations of the subproject name suitable for use as a CPP + # enabled define, a shell enabled variable, and a shell function + + + + + + + + + + + + # Add subproject to our running list + subprojects="$subprojects customext" # Process the subproject appropriately. If enabled add it to the @@ -5141,6 +5191,51 @@ $as_echo "#define SPIKE_MAIN_ENABLED /**/" >>confdefs.h + # Determine if this is a required or an optional subproject + + + + # Determine if there is a group with the same name + + + + # Create variations of the subproject name suitable for use as a CPP + # enabled define, a shell enabled variable, and a shell function + + + + + + + + + + + + # Add subproject to our running list + + subprojects="$subprojects spike_dasm" + + # Process the subproject appropriately. If enabled add it to the + # $enabled_subprojects running shell variable, set a + # SUBPROJECT_ENABLED C define, and include the appropriate + # 'subproject.ac'. + + + { $as_echo "$as_me:${as_lineno-$LINENO}: configuring default subproject : spike_dasm" >&5 +$as_echo "$as_me: configuring default subproject : spike_dasm" >&6;} + ac_config_files="$ac_config_files spike_dasm.mk:spike_dasm/spike_dasm.mk.in" + + enable_spike_dasm_sproj="yes" + subprojects_enabled="$subprojects_enabled spike_dasm" + +$as_echo "#define SPIKE_DASM_ENABLED /**/" >>confdefs.h + + + + + + # Output make variables @@ -5874,10 +5969,12 @@ do case $ac_config_target in "fesvr.mk") CONFIG_FILES="$CONFIG_FILES fesvr.mk:fesvr/fesvr.mk.in" ;; "riscv.mk") CONFIG_FILES="$CONFIG_FILES riscv.mk:riscv/riscv.mk.in" ;; + "disasm.mk") CONFIG_FILES="$CONFIG_FILES disasm.mk:disasm/disasm.mk.in" ;; "customext.mk") CONFIG_FILES="$CONFIG_FILES customext.mk:customext/customext.mk.in" ;; "fdt.mk") CONFIG_FILES="$CONFIG_FILES fdt.mk:fdt/fdt.mk.in" ;; "softfloat.mk") CONFIG_FILES="$CONFIG_FILES softfloat.mk:softfloat/softfloat.mk.in" ;; "spike_main.mk") CONFIG_FILES="$CONFIG_FILES spike_main.mk:spike_main/spike_main.mk.in" ;; + "spike_dasm.mk") CONFIG_FILES="$CONFIG_FILES spike_dasm.mk:spike_dasm/spike_dasm.mk.in" ;; "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "riscv-spike.pc") CONFIG_FILES="$CONFIG_FILES riscv-spike.pc" ;; diff --git a/configure.ac b/configure.ac index c63490b..139043b 100644 --- a/configure.ac +++ b/configure.ac @@ -96,7 +96,7 @@ AX_APPEND_LINK_FLAGS([-Wl,--export-dynamic]) # The '*' suffix indicates an optional subproject. The '**' suffix # indicates an optional subproject which is also the name of a group. -MCPPBS_SUBPROJECTS([ fesvr, riscv, customext, fdt, softfloat, spike_main ]) +MCPPBS_SUBPROJECTS([ fesvr, riscv, disasm, customext, fdt, softfloat, spike_main, spike_dasm ]) #------------------------------------------------------------------------- # MCPPBS subproject groups diff --git a/disasm/disasm.ac b/disasm/disasm.ac new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/disasm/disasm.ac diff --git a/spike_main/disasm.cc b/disasm/disasm.cc index 150250e..150250e 100644 --- a/spike_main/disasm.cc +++ b/disasm/disasm.cc diff --git a/disasm/disasm.mk.in b/disasm/disasm.mk.in new file mode 100644 index 0000000..6f1ed2a --- /dev/null +++ b/disasm/disasm.mk.in @@ -0,0 +1,5 @@ +disasm_CFLAGS = -fPIC + +disasm_srcs = \ + disasm.cc \ + regnames.cc \ diff --git a/riscv/regnames.cc b/disasm/regnames.cc index 0a7fd4d..0a7fd4d 100644 --- a/riscv/regnames.cc +++ b/disasm/regnames.cc diff --git a/riscv/riscv.ac b/riscv/riscv.ac index 624e981..64693e9 100644 --- a/riscv/riscv.ac +++ b/riscv/riscv.ac @@ -19,7 +19,10 @@ AC_ARG_WITH(varch, AC_DEFINE_UNQUOTED([DEFAULT_VARCH], ["vlen:128,elen:64,slen:128"], [Default value for --varch switch])) -AC_SEARCH_LIBS([dlopen], [dl dld], AC_DEFINE([HAVE_DLOPEN], [], [Dynamic library loading is supported])) +AC_SEARCH_LIBS([dlopen], [dl dld], [ + AC_DEFINE([HAVE_DLOPEN], [], [Dynamic library loading is supported]), + AC_SUBST([HAVE_DLOPEN], [yes]) +]) AC_CHECK_LIB(pthread, pthread_create, [], [AC_MSG_ERROR([libpthread is required])]) diff --git a/riscv/riscv.mk.in b/riscv/riscv.mk.in index a76809f..26ccd05 100644 --- a/riscv/riscv.mk.in +++ b/riscv/riscv.mk.in @@ -51,7 +51,6 @@ riscv_srcs = \ extension.cc \ extensions.cc \ rocc.cc \ - regnames.cc \ devices.cc \ rom.cc \ clint.cc \ diff --git a/spike_main/spike-dasm.cc b/spike_dasm/spike-dasm.cc index 8e0e20b..fa6a25a 100644 --- a/spike_main/spike-dasm.cc +++ b/spike_dasm/spike-dasm.cc @@ -21,7 +21,9 @@ int main(int argc, char** argv) std::function<extension_t*()> extension; option_parser_t parser; +#ifdef HAVE_DLOPEN parser.option(0, "extension", 1, [&](const char* s){extension = find_extension(s);}); +#endif parser.option(0, "isa", 1, [&](const char* s){isa = s;}); parser.parse(argv); diff --git a/spike_dasm/spike_dasm.ac b/spike_dasm/spike_dasm.ac new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/spike_dasm/spike_dasm.ac diff --git a/spike_dasm/spike_dasm.mk.in b/spike_dasm/spike_dasm.mk.in new file mode 100644 index 0000000..b6118fd --- /dev/null +++ b/spike_dasm/spike_dasm.mk.in @@ -0,0 +1,9 @@ +spike_dasm_subproject_deps = \ + disasm \ + $(if $(HAVE_DLOPEN),riscv,) \ + +spike_dasm_srcs = \ + spike_dasm_option_parser.cc \ + +spike_dasm_install_prog_srcs = \ + spike-dasm.cc \ diff --git a/spike_dasm/spike_dasm_option_parser.cc b/spike_dasm/spike_dasm_option_parser.cc new file mode 120000 index 0000000..4244c15 --- /dev/null +++ b/spike_dasm/spike_dasm_option_parser.cc @@ -0,0 +1 @@ +../fesvr/option_parser.cc
\ No newline at end of file diff --git a/spike_main/spike_main.mk.in b/spike_main/spike_main.mk.in index e088955..35bef39 100644 --- a/spike_main/spike_main.mk.in +++ b/spike_main/spike_main.mk.in @@ -2,11 +2,11 @@ spike_main_subproject_deps = \ fdt \ fesvr \ softfloat \ + disasm \ riscv \ spike_main_install_prog_srcs = \ spike.cc \ - spike-dasm.cc \ spike-log-parser.cc \ xspike.cc \ termios-xspike.cc \ |