Enable capstone5 at configure time option ##disasm
* Add --with-capstone5 configure flag * Add use_capstone5 meson option
This commit is contained in:
parent
970c63a829
commit
869b698c1c
|
@ -3,6 +3,7 @@ CC=@CC@
|
|||
WITH_GPL=@WITH_GPL@
|
||||
# HOST_CC=@HOST_CC@
|
||||
|
||||
CSNEXT=@CSNEXT@
|
||||
DESTDIR=
|
||||
PREFIX=@PREFIX@
|
||||
BINDIR=@BINDIR@
|
||||
|
|
|
@ -20,6 +20,7 @@ control_c() {
|
|||
trap control_c 2
|
||||
DEBUGGER=1
|
||||
USE_MAGIC=0
|
||||
CSNEXT=0
|
||||
LOADLIBS=1
|
||||
HAVE_FORK=1
|
||||
WANT_PTRACE_WRAP=1
|
||||
|
@ -170,6 +171,7 @@ printf "
|
|||
Optional Features:
|
||||
--disable-debugger disable native debugger features
|
||||
--with-sysmagic force to use system's magic
|
||||
--with-capstone5 build next branch of the capstone repository
|
||||
--disable-loadlibs disable loading plugins
|
||||
--without-fork disable fork
|
||||
--without-ptrace-wrap disable ptrace-wrap build
|
||||
|
@ -241,7 +243,7 @@ echo "LANGS: c"
|
|||
echo "REQUIRED: libdl"
|
||||
echo "OPTIONAL: libmagic libz libzip libxxhash libssl liblibuv>=1.0.0"
|
||||
echo "PKG-CONFIG: capstone openssl libuv"
|
||||
echo "FLAGS: --disable-debugger --with-sysmagic --disable-loadlibs --without-fork --without-ptrace-wrap --with-libr --with-syscapstone --with-syszip --with-sysxxhash --without-gpl --with-openssl --without-libuv --with-rpath --with-compiler=gcc --with-ostype=auto --with-libversion=xxx --without-jemalloc --with-checks-level=2"
|
||||
echo "FLAGS: --disable-debugger --with-sysmagic --with-capstone5 --disable-loadlibs --without-fork --without-ptrace-wrap --with-libr --with-syscapstone --with-syszip --with-sysxxhash --without-gpl --with-openssl --without-libuv --with-rpath --with-compiler=gcc --with-ostype=auto --with-libversion=xxx --without-jemalloc --with-checks-level=2"
|
||||
exit 0
|
||||
;;
|
||||
--cache-file)
|
||||
|
@ -289,6 +291,7 @@ echo "FLAGS: --disable-debugger --with-sysmagic --disable-loadlibs --without
|
|||
|
||||
"--disable-debugger") DEBUGGER="0"; ;;
|
||||
"--with-sysmagic") USE_MAGIC="1"; ;;
|
||||
"--with-capstone5") CSNEXT="1"; ;;
|
||||
"--disable-loadlibs") LOADLIBS="0"; ;;
|
||||
"--without-fork") HAVE_FORK="0"; ;;
|
||||
"--without-ptrace-wrap") WANT_PTRACE_WRAP="0"; ;;
|
||||
|
@ -322,7 +325,7 @@ parse_options "$1"
|
|||
shift
|
||||
done
|
||||
|
||||
ENVWORDS="MANDIR INFODIR LIBDIR INCLUDEDIR LOCALSTATEDIR SYSCONFDIR DATADIR DOCDIR LIBEXECDIR SBINDIR BINDIR EPREFIX PREFIX SPREFIX TARGET HOST BUILD INSTALL INSTALL_LIB INSTALL_MAN INSTALL_PROGRAM INSTALL_PROGRAM_STRIP INSTALL_DIR INSTALL_SCRIPT INSTALL_DATA HOST_OS HOST_CPU BUILD_OS BUILD_CPU TARGET_OS TARGET_CPU PKGNAME VPATH VERSION CONTACT CONTACT_NAME CONTACT_MAIL CC CFLAGS CPPFLAGS LDFLAGS HAVE_LANG_C DEBUGGER HAVE_LIB_DL DL_LIBS HAVE_PATCH PATCH HAVE_GIT GIT HAVE_LIB_MAGIC USE_MAGIC USE_LIB_MAGIC LIBMAGIC LOADLIBS HAVE_FORK WANT_PTRACE_WRAP WITH_LIBR WITH_CAPSTONE CAPSTONE_CFLAGS CAPSTONE_LDFLAGS HAVE_PKGCFG_CAPSTONE USE_CAPSTONE HAVE_LIB_Z HAVE_LIB_ZIP USE_ZIP USE_LIB_ZIP LIBZIP HAVE_LIB_XXHASH USE_XXHASH USE_LIB_XXHASH LIBXXHASH WITH_GPL HAVE_DECL_ADDR_NO_RANDOMIZE HAVE_ARC4RANDOM_UNIFORM HAVE_EXPLICIT_BZERO HAVE_EXPLICIT_MEMSET HAVE_CLOCK_NANOSLEEP HAVE_LIB_GMP HAVE_LIB_SSL SSL_CFLAGS SSL_LDFLAGS HAVE_PKGCFG_OPENSSL HAVE_OPENSSL WANT_OPENSSL HAVE_LIBUV_VERSION_1_0_0 LIBUV_CFLAGS LIBUV_LDFLAGS HAVE_PKGCFG_LIBUV HAVE_LIBUV WANT_LIBUV USE_RPATH USERCC USEROSTYPE LIBVERSION HAVE_JEMALLOC HAVE_PTRACE USE_PTRACE_WRAP R_CHECKS_LEVEL"
|
||||
ENVWORDS="MANDIR INFODIR LIBDIR INCLUDEDIR LOCALSTATEDIR SYSCONFDIR DATADIR DOCDIR LIBEXECDIR SBINDIR BINDIR EPREFIX PREFIX SPREFIX TARGET HOST BUILD INSTALL INSTALL_LIB INSTALL_MAN INSTALL_PROGRAM INSTALL_PROGRAM_STRIP INSTALL_DIR INSTALL_SCRIPT INSTALL_DATA HOST_OS HOST_CPU BUILD_OS BUILD_CPU TARGET_OS TARGET_CPU PKGNAME VPATH VERSION CONTACT CONTACT_NAME CONTACT_MAIL CC CFLAGS CPPFLAGS LDFLAGS HAVE_LANG_C DEBUGGER HAVE_LIB_DL DL_LIBS HAVE_PATCH PATCH HAVE_GIT GIT HAVE_LIB_MAGIC USE_MAGIC USE_LIB_MAGIC LIBMAGIC CSNEXT LOADLIBS HAVE_FORK WANT_PTRACE_WRAP WITH_LIBR WITH_CAPSTONE CAPSTONE_CFLAGS CAPSTONE_LDFLAGS HAVE_PKGCFG_CAPSTONE USE_CAPSTONE HAVE_LIB_Z HAVE_LIB_ZIP USE_ZIP USE_LIB_ZIP LIBZIP HAVE_LIB_XXHASH USE_XXHASH USE_LIB_XXHASH LIBXXHASH WITH_GPL HAVE_DECL_ADDR_NO_RANDOMIZE HAVE_ARC4RANDOM_UNIFORM HAVE_EXPLICIT_BZERO HAVE_EXPLICIT_MEMSET HAVE_CLOCK_NANOSLEEP HAVE_LIB_GMP HAVE_LIB_SSL SSL_CFLAGS SSL_LDFLAGS HAVE_PKGCFG_OPENSSL HAVE_OPENSSL WANT_OPENSSL HAVE_LIBUV_VERSION_1_0_0 LIBUV_CFLAGS LIBUV_LDFLAGS HAVE_PKGCFG_LIBUV HAVE_LIBUV WANT_LIBUV USE_RPATH USERCC USEROSTYPE LIBVERSION HAVE_JEMALLOC HAVE_PTRACE USE_PTRACE_WRAP R_CHECKS_LEVEL"
|
||||
|
||||
create_environ
|
||||
|
||||
|
|
|
@ -21,6 +21,8 @@ IFAND HAVE_LIB_MAGIC USE_MAGIC {
|
|||
LIBMAGIC = '' ;
|
||||
}
|
||||
|
||||
ARG_WITH CSNEXT capstone5 build next branch of the capstone repository ;
|
||||
|
||||
(( useful for static builds . see sys/static.sh ))
|
||||
ARG_DISABLE LOADLIBS loadlibs disable loading plugins ;
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ option('r2_gittip', type: 'string', value: '')
|
|||
option('checks_level', type: 'integer', value: 9999, description: 'Value between 0 and 3 to enable different level of assert (see R_CHECKS_LEVEL). By default its value depends on buildtype (2 on debug, 1 on release).')
|
||||
option('capstone_in_builddir', type: 'boolean', value: false, description: 'When true, capstone is downloaded in the build directory and not in the source one')
|
||||
option('use_sys_capstone', type: 'boolean', value: false)
|
||||
option('use_capstone5', type: 'boolean', value: false)
|
||||
option('use_sys_magic', type: 'boolean', value: false)
|
||||
option('use_sys_zip', type: 'boolean', value: false)
|
||||
option('use_sys_zlib', type: 'boolean', value: false)
|
||||
|
|
|
@ -13,7 +13,7 @@ else
|
|||
CS_RELEASE=1
|
||||
endif
|
||||
|
||||
CS_NEXT=0
|
||||
CS_NEXT=${CSNEXT}
|
||||
|
||||
CAPSTONE_CFLAGS?=-g
|
||||
# CAPSTONE_MAKEFLAGS?=CAPSTONE_ARCHS="arm aarch64"
|
||||
|
@ -33,9 +33,9 @@ CS_PATCHES=0
|
|||
else
|
||||
CS_TAR=
|
||||
CS_URL=$(GIT_PREFIX)github.com/aquynh/capstone.git
|
||||
CS_UPD=20190411
|
||||
CS_UPD=20190506
|
||||
ifeq ($(CS_NEXT),1)
|
||||
CS_TIP=3a660df88c30685cccf6ff68b4d6d4337b5caf7e
|
||||
CS_TIP=d59d1e75d1f261e938fc23130a5bffdc56d1af74
|
||||
CS_BRA=next
|
||||
else
|
||||
CS_TIP=7090f081b17a5293a2c185a06513fede18065d3c
|
||||
|
|
|
@ -16,11 +16,14 @@ if not capstone_dep.found() or not get_option('use_sys_capstone')
|
|||
endif
|
||||
|
||||
# NOTE: when you update CS_TIP or CS_BRA, also update them in shlr/Makefile
|
||||
#CS_TIP = '3a660df88c30685cccf6ff68b4d6d4337b5caf7e'
|
||||
#CS_BRA = 'next'
|
||||
#cs5#CS_TIP = '472845db9c2666ab66b3f517dda21f2b026a06c1'
|
||||
CS_TIP = '7090f081b17a5293a2c185a06513fede18065d3c'
|
||||
CS_BRA = 'v4'
|
||||
use_capstone5 = get_option('use_capstone5')
|
||||
if use_capstone5
|
||||
CS_TIP = 'd59d1e75d1f261e938fc23130a5bffdc56d1af74'
|
||||
CS_BRA = 'next'
|
||||
else
|
||||
CS_TIP = '7090f081b17a5293a2c185a06513fede18065d3c'
|
||||
CS_BRA = 'v4'
|
||||
endif
|
||||
|
||||
capstone_git_user = 'aquynh'
|
||||
|
||||
|
@ -93,7 +96,7 @@ if not capstone_dep.found() or not get_option('use_sys_capstone')
|
|||
'arch/X86/X86Disassembler.c',
|
||||
'arch/X86/X86DisassemblerDecoder.c',
|
||||
'arch/X86/X86IntelInstPrinter.c',
|
||||
# cs5-only 'arch/X86/X86InstPrinterCommon.c',
|
||||
'arch/X86/X86InstPrinterCommon.c',
|
||||
'arch/X86/X86Mapping.c',
|
||||
'arch/X86/X86Module.c',
|
||||
'arch/XCore/XCoreDisassembler.c',
|
||||
|
|
Loading…
Reference in New Issue