Add sys/ios-env.sh and enable XNU debug without ptrace by default

This commit is contained in:
pancake 2016-02-20 23:30:11 +01:00
parent 808c205f74
commit 852385efe1
3 changed files with 31 additions and 15 deletions

View File

@ -11,7 +11,11 @@ foo:
include ../config.mk
include ${STATIC_DEBUG_PLUGINS}
ifeq (${COMPILER},ios-sdk)
XNU_USE_PTRACE=0
else
XNU_USE_PTRACE?=1
endif
CFLAGS+=-DXNU_USE_PTRACE=$(XNU_USE_PTRACE)
STATIC_OBJS=$(subst ..,p/..,$(subst debug_,p/debug_,$(STATIC_OBJ)))

View File

@ -17,14 +17,7 @@ if [ ! -d sys/ios-include ]; then
)
fi
export PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:$PATH
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 IOSINC=$(pwd)/sys/ios-include
export CFLAGS=-O2
. sys/ios-env.sh
makeDeb() {
( cd binr/radare2 ; make ios_sdk_sign )
@ -38,18 +31,26 @@ makeDeb() {
( cd sys/cydia/radare2 ; sudo make clean ; sudo make )
}
if true ; then
make clean
./configure --prefix=${PREFIX} --with-ostype=darwin \
--with-compiler=ios-sdk --target=arm-unknown-darwin
if [ $? = 0 ]; then
fromscratch=1
onlymakedeb=0
if [ $onlymakedeb = 1 ]; then
makeDeb
else
if [ $fromscratch = 1 ]; then
make clean
./configure --prefix=${PREFIX} --with-ostype=darwin \
--with-compiler=ios-sdk --target=arm-unknown-darwin
RV=$?
else
RV=0
fi
if [ $RV = 0 ]; then
time make -j4
if [ $? = 0 ]; then
makeDeb
fi
fi
else
makeDeb
fi

11
sys/ios-env.sh Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
export PATH=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:$PATH
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 IOSINC=$(pwd)/sys/ios-include
export CFLAGS=-O2