Fix the build of the iOS SDK ##build (#11884)
This commit is contained in:
parent
f6949b50b6
commit
c50357fbe6
|
@ -593,6 +593,8 @@ USE_PTRACE_WRAP="0"
|
|||
else
|
||||
HAVE_PTRACE="1"
|
||||
USE_PTRACE_WRAP="0"; fi; fi; fi
|
||||
if [ "$DEBUGGER" = "0" ]; then
|
||||
HAVE_PTRACE="0"; fi
|
||||
SEDFLAGS=" -e '"
|
||||
COUNT=0
|
||||
for A in ${ENVWORDS} ; do
|
||||
|
|
|
@ -178,6 +178,10 @@ IFEQ USEROSTYPE solaris ; {
|
|||
USE_PTRACE_WRAP = 0 ;
|
||||
} } }
|
||||
|
||||
IFNOT DEBUGGER {
|
||||
HAVE_PTRACE = 0 ;
|
||||
}
|
||||
|
||||
ARG_WITH R_CHECKS_LEVEL=2 checks-level value between 0 and 3 to enable different level of assert (see R_CHECKS_LEVEL) ;
|
||||
|
||||
REPORT R_CHECKS_LEVEL PREFIX HAVE_LIB_GMP HAVE_OPENSSL HAVE_LIBUV USE_CAPSTONE HAVE_PTRACE USE_PTRACE_WRAP HAVE_FORK
|
||||
|
|
|
@ -10,7 +10,7 @@ pkg install gcc-3 gmake
|
|||
To compile it:
|
||||
--------------
|
||||
```
|
||||
./configure --without-debugger --without-gmp
|
||||
./configure --disable-debugger --without-gmp
|
||||
gmake
|
||||
gmake install
|
||||
```
|
||||
|
|
|
@ -115,7 +115,9 @@ endif
|
|||
|
||||
libr.${EXT_SO}: .libr2
|
||||
$(CC) -fvisibility=hidden $(MLFLAGS) ${LINK} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -shared -dynamiclib -o libr.${EXT_SO} \
|
||||
.libr2/*/*.o
|
||||
.libr2/*/*.o \
|
||||
../shlr/gdb/lib/libgdbr.${EXT_AR} ../shlr/java/libr_java.${EXT_AR} \
|
||||
../shlr/libr_shlr.${EXT_AR} $(E)
|
||||
|
||||
#libr.${EXT_SO}: .libr
|
||||
# $(CC) -fvisibility=hidden $(MLFLAGS) ${LINK} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS} -shared -dynamiclib -o libr.${EXT_SO} \
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
#include <unistd.h>
|
||||
#include <sys/types.h>
|
||||
#else
|
||||
#if DEBUGGER
|
||||
#if DEBUGGER && HAVE_PTRACE
|
||||
#include <sys/ptrace.h>
|
||||
#endif
|
||||
#endif
|
||||
|
|
|
@ -621,7 +621,6 @@ R_API ut64 r_io_seek(RIO* io, ut64 offset, int whence) {
|
|||
return io->off;
|
||||
}
|
||||
|
||||
|
||||
#if HAVE_PTRACE
|
||||
|
||||
#if USE_PTRACE_WRAP
|
||||
|
|
|
@ -51,12 +51,8 @@ debug.rap
|
|||
debug.bf
|
||||
egg.exec
|
||||
egg.xor
|
||||
fs.fat
|
||||
fs.ntfs
|
||||
fs.ext2
|
||||
fs.hfs
|
||||
fs.hfsplus
|
||||
fs.reiserfs
|
||||
fs.io
|
||||
fs.r2
|
||||
fs.posix
|
||||
io.rap
|
||||
io.gzip
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
include ../config.mk
|
||||
|
||||
CFLAGS+=-g
|
||||
CFLAGS+=-g -fPIC
|
||||
OBJ=cdb.o buffer.o cdb_make.o ls.o sdbht.o ht.o sdb.o num.o base64.o match.o
|
||||
OBJ+=json.o ns.o lock.o util.o disk.o query.o array.o fmt.o journal.o
|
||||
OBJ+=dict.o
|
||||
|
|
|
@ -5,7 +5,7 @@ export PATH=$(pwd)/sys:${PATH}
|
|||
export CC=$(pwd)/sys/ios-sdk-gcc
|
||||
# set only for arm64, otherwise it is armv7
|
||||
# select ios sdk version
|
||||
export IOSVER=8.3
|
||||
export IOSVER=11.0
|
||||
export IOSINC=$(pwd)/sys/ios-include
|
||||
export CFLAGS=-O2
|
||||
|
||||
|
|
|
@ -33,8 +33,9 @@ fi
|
|||
iosConfigure() {
|
||||
cp -f ${PLUGINS_CFG} plugins.cfg
|
||||
./configure --with-libr --prefix=${PREFIX} --with-ostype=darwin \
|
||||
--disable-debugger --without-gpl \
|
||||
--without-fork --without-libuv --with-compiler=ios-sdk \
|
||||
--target=arm-unknown-darwin
|
||||
--target=arm64-unknown-darwin
|
||||
return $?
|
||||
}
|
||||
|
||||
|
@ -136,38 +137,38 @@ fi
|
|||
|
||||
while test $# -gt 0; do
|
||||
case "$1" in
|
||||
-full|--full|-f)
|
||||
shift
|
||||
ARCHS="armv7s+arm64"
|
||||
USE_SIMULATOR=1
|
||||
;;
|
||||
-shell|--shell|-s)
|
||||
DOSH=1
|
||||
shift
|
||||
;;
|
||||
-archs|-a|--archs)
|
||||
shift
|
||||
if test $# -gt 0; then
|
||||
if [ "$1" == "all" ]; then
|
||||
ARCHS="armv7+armv7s+arm64"
|
||||
else
|
||||
ARCHS=$1
|
||||
fi
|
||||
-full|--full|-f)
|
||||
shift
|
||||
ARCHS="armv7s+arm64"
|
||||
USE_SIMULATOR=1
|
||||
;;
|
||||
-shell|--shell|-s)
|
||||
DOSH=1
|
||||
shift
|
||||
;;
|
||||
-archs|-a|--archs)
|
||||
shift
|
||||
if test $# -gt 0; then
|
||||
if [ "$1" == "all" ]; then
|
||||
ARCHS="armv7+armv7s+arm64"
|
||||
else
|
||||
ARCHS=$1
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
-p|--package)
|
||||
iosPackage
|
||||
exit 0
|
||||
;;
|
||||
-simulator)
|
||||
USE_SIMULATOR=1
|
||||
shift
|
||||
;;
|
||||
*|-h|--help)
|
||||
showHelp
|
||||
exit 0
|
||||
;;
|
||||
fi
|
||||
shift
|
||||
;;
|
||||
-p|--package)
|
||||
iosPackage
|
||||
exit 0
|
||||
;;
|
||||
-simulator)
|
||||
USE_SIMULATOR=1
|
||||
shift
|
||||
;;
|
||||
*|-h|--help)
|
||||
showHelp
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
|
@ -214,20 +215,24 @@ rm -rf "$INSTALL_DST"
|
|||
# Build radare2 for i386 and x86_64
|
||||
if [ "${USE_SIMULATOR}" = 1 ]; then
|
||||
iosClean
|
||||
iosConfigure
|
||||
if [ $? = 0 ]; then
|
||||
export CPU="$SIMULATOR_ARCHS"
|
||||
export SDK=iphonesimulator
|
||||
echo "Building for simulator($SIMULATOR_ARCHS)"
|
||||
sleep 1
|
||||
iosBuild
|
||||
# backup lib folder of simulator
|
||||
if [ "${#ARCHS}" -gt 0 ]; then
|
||||
rm -rf "$INSTALL_DST/$PREFIX"/lib_simulator
|
||||
mv "$INSTALL_DST/$PREFIX"/lib "$INSTALL_DST/$PREFIX"/lib_simulator
|
||||
else
|
||||
cp -r "$INSTALL_DST/$PREFIX"/lib "$INSTALL_DST/$PREFIX"/lib_simulator
|
||||
if [ 1 = 0 ]; then
|
||||
iosConfigure
|
||||
if [ $? = 0 ]; then
|
||||
export CPU="$SIMULATOR_ARCHS"
|
||||
export SDK=iphonesimulator
|
||||
echo "Building for simulator($SIMULATOR_ARCHS)"
|
||||
sleep 1
|
||||
iosBuild
|
||||
fi
|
||||
else
|
||||
sys/ios-simulator.sh
|
||||
fi
|
||||
# backup lib folder of simulator
|
||||
if [ "${#ARCHS}" -gt 0 ]; then
|
||||
rm -rf "$INSTALL_DST/$PREFIX"/lib_simulator
|
||||
mv "$INSTALL_DST/$PREFIX"/lib "$INSTALL_DST/$PREFIX"/lib_simulator
|
||||
else
|
||||
cp -r "$INSTALL_DST/$PREFIX"/lib "$INSTALL_DST/$PREFIX"/lib_simulator
|
||||
fi
|
||||
fi
|
||||
|
||||
|
|
|
@ -64,7 +64,7 @@ export USE_SIMULATOR=1
|
|||
export RANLIB="xcrun --sdk iphoneos ranlib"
|
||||
|
||||
if [ "$1" = "-s" ]; then
|
||||
exec sys/ios-shell.sh
|
||||
sh
|
||||
exit $?
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in New Issue