Skip to content

Commit

Permalink
Merge pull request #1346 from Wojciech-Bartczak/spike-as-lib
Browse files Browse the repository at this point in the history
Install meta pkg-config file for Spike.
  • Loading branch information
aswaterman committed May 19, 2023
2 parents 76b0027 + 7dbd094 commit 8780656
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 1 deletion.
2 changes: 1 addition & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ install_hdrs += $$(addprefix $(src_dir)/$(1)/, $$($(2)_install_hdrs))
install_libs += $$(if $$($(2)_install_lib),lib$(1).a,)
install_libs += $$(if $$($(2)_install_shared_lib),lib$(1).so,)
install_exes += $$($(2)_install_prog_exes)
install_pcs += $$(if $$($(2)_install_lib),riscv-$(1).pc,)
install_pcs += $$(if $$($(2)_install_pcs),riscv-$(1).pc,)

endef

Expand Down
3 changes: 3 additions & 0 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -6362,6 +6362,8 @@ ac_config_files="$ac_config_files riscv-fesvr.pc"
ac_config_files="$ac_config_files riscv-disasm.pc"
ac_config_files="$ac_config_files riscv-riscv.pc"
cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
Expand Down Expand Up @@ -7065,6 +7067,7 @@ do
"Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
"riscv-fesvr.pc") CONFIG_FILES="$CONFIG_FILES riscv-fesvr.pc" ;;
"riscv-disasm.pc") CONFIG_FILES="$CONFIG_FILES riscv-disasm.pc" ;;
"riscv-riscv.pc") CONFIG_FILES="$CONFIG_FILES riscv-riscv.pc" ;;
*) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
esac
Expand Down
1 change: 1 addition & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -123,4 +123,5 @@ AC_CONFIG_HEADERS([config.h])
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([riscv-fesvr.pc])
AC_CONFIG_FILES([riscv-disasm.pc])
AC_CONFIG_FILES([riscv-riscv.pc])
AC_OUTPUT
2 changes: 2 additions & 0 deletions disasm/disasm.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@ disasm_srcs = \
regnames.cc \

disasm_install_lib = yes

disasm_install_pcs = yes
2 changes: 2 additions & 0 deletions fesvr/fesvr.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ fesvr_install_config_hdr = yes

fesvr_install_lib = yes

fesvr_install_pcs = yes

fesvr_srcs = \
elfloader.cc \
htif.cc \
Expand Down
11 changes: 11 additions & 0 deletions riscv-riscv.pc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
prefix=@prefix@
exec_prefix=@prefix@
libdir=@libdir@
includedir=@includedir@

Name: riscv-riscv
Description: RISC-V
Version: git
Libs: -Wl,-rpath,${libdir} -L${libdir} -lriscv
Cflags: -I${includedir}
URL: http://riscv.org/download.html#tab_spike
2 changes: 2 additions & 0 deletions riscv/riscv.mk.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@ riscv_CFLAGS = -fPIC

riscv_install_shared_lib = yes

riscv_install_pcs = yes

riscv_install_prog_srcs = \

riscv_install_hdrs = \
Expand Down

0 comments on commit 8780656

Please sign in to comment.