* Avoid use of extended arm instructions for ut64
- add documentation for installing NDK in archlinux64 - fixes build for android-arm * Import android targets for the build farm
This commit is contained in:
parent
9884ce9db0
commit
6213779213
13 changed files with 68 additions and 20 deletions
|
|
@ -1,3 +1,7 @@
|
|||
Install NDK in archlinux x86-64
|
||||
- Enable multilib repo in pacman.conf
|
||||
- pacman -S lib32-glibc lib32-zlib
|
||||
|
||||
To build r2 for android you need to install the NDK:
|
||||
|
||||
sys/android-shell.sh
|
||||
|
|
|
|||
|
|
@ -714,8 +714,10 @@ int Printfloat4(char *s,float f) {
|
|||
k=sprintf(s,"+NAN "LFMT08,*(ulong *)&f);
|
||||
else if ((*(ulong *)&f & 0xFF800000L)==0xFF800000L)
|
||||
k=sprintf(s,"-NAN "LFMT08,*(ulong *)&f);
|
||||
#if 0
|
||||
else if (f==0.0) // By default, 0 is printed without
|
||||
k=sprintf(s,"0.0"); // decimal point, which I don't want.
|
||||
#endif
|
||||
else
|
||||
k=sprintf(s,"%#.7g",f);
|
||||
return k;
|
||||
|
|
|
|||
|
|
@ -9,4 +9,4 @@ ALL_TARGETS+=${TARGET_MIPS}
|
|||
STATIC_OBJ+=${OBJ_MIPS}
|
||||
|
||||
${TARGET_MIPS}: ${OBJ_MIPS}
|
||||
${CC} $(call libname,asm_mips) ${LDFLAGS} ${CFLAGS} -o ${TARGET_MIPS} ${OBJ_MIPS}
|
||||
${CC_LIB} ${TARGET_MIPS} $(call libname,asm_mips) ${LDFLAGS} ${CFLAGS} ${OBJ_MIPS}
|
||||
|
|
|
|||
|
|
@ -99,8 +99,8 @@ R_API int r_debug_set_arch(RDebug *dbg, int arch, int bits) {
|
|||
dbg->arch = arch;
|
||||
return R_TRUE;
|
||||
}
|
||||
eprintf ("arch (%s) not supported by debug backend (%s)\n",
|
||||
r_sys_arch_str (arch), dbg->h);
|
||||
eprintf ("arch (%s, %d) not supported by debug backend\n",
|
||||
r_sys_arch_str (arch), bits);
|
||||
}
|
||||
return R_FALSE;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -239,7 +239,8 @@ struct grub_reiserfs_data
|
|||
static enum grub_reiserfs_item_type
|
||||
grub_reiserfs_get_key_v2_type (const struct grub_reiserfs_key *key)
|
||||
{
|
||||
switch (grub_le_to_cpu64 (key->u.v2.offset_type) >> 60)
|
||||
unsigned long long o = grub_le_to_cpu64 (key->u.v2.offset_type);
|
||||
switch ((int)(o>>60))
|
||||
{
|
||||
case 0:
|
||||
return GRUB_REISERFS_STAT;
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ typedef grub_uint64_t grub_disk_addr_t;
|
|||
(grub_uint16_t) ((_x << 8) | (_x >> 8)); \
|
||||
})
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 3) && defined(GRUB_TARGET_I386)
|
||||
#if !defined(__ANDROID__) && defined(__GNUC__) && (__GNUC__ > 3) && (__GNUC__ > 4 || __GNUC_MINOR__ >= 3) && defined(GRUB_TARGET_I386)
|
||||
static inline grub_uint32_t grub_swap_bytes32(grub_uint32_t x)
|
||||
{
|
||||
return __builtin_bswap32(x);
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
#CC=arm-linux-androideabi-gcc
|
||||
CC=ndk-gcc
|
||||
#RANLIB=ndk-ranlib
|
||||
RANLIB=arm-linux-androideabi-ranlib
|
||||
ONELIB=0
|
||||
OSTYPE=android
|
||||
LINK=
|
||||
#CC_AR=ndk-ar -r ${LIBAR}
|
||||
CC_AR=arm-linux-androideabi-ar -r ${LIBAR}
|
||||
PICFLAGS=
|
||||
CFLAGS+=${PICFLAGS}
|
||||
|
|
|
|||
3
sys/android-arm.sh
Executable file
3
sys/android-arm.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
cd `dirname $PWD/$0`
|
||||
./android-shell.sh ./android-build.sh arm-static
|
||||
|
|
@ -2,25 +2,53 @@
|
|||
|
||||
cd `dirname $PWD/$0` ; cd ..
|
||||
|
||||
[ -z "${NDK_ARCH}" ] && NDK_ARCH=x86
|
||||
case "$1" in
|
||||
"arm")
|
||||
NDK_ARCH=arm
|
||||
STATIC_BUILD=0
|
||||
;;
|
||||
"x86")
|
||||
NDK_ARCH=x86
|
||||
STATIC_BUILD=0
|
||||
;;
|
||||
arm-static|static-arm)
|
||||
NDK_ARCH=arm
|
||||
STATIC_BUILD=1
|
||||
;;
|
||||
x86-static|static-x86)
|
||||
NDK_ARCH=x86
|
||||
STATIC_BUILD=1
|
||||
;;
|
||||
"-h")
|
||||
echo "Usage: android-build.sh [arm|x86][-static]"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
|
||||
[ -z "${NDK_ARCH}" ] && NDK_ARCH=arm
|
||||
[ -z "${STATIC_BUILD}" ] && STATIC_BUILD=0
|
||||
export NDK_ARCH
|
||||
export STATIC_BUILD
|
||||
|
||||
if [ 0 = 1 ]; then
|
||||
make clean
|
||||
echo "Using NDK_ARCH: ${NDK_ARCH}"
|
||||
echo "Using STATIC_BUILD: ${STATIC_BUILD}"
|
||||
sleep 2
|
||||
|
||||
make mrproper
|
||||
if [ $STATIC_BUILD = 1 ]; then
|
||||
CFGFLAGS="--without-pic --with-nonpic"
|
||||
CFGFLAGS="--without-pic --with-nonpic"
|
||||
fi
|
||||
./configure --with-compiler=android --with-ostype=android \
|
||||
--without-ssl --prefix=/data/radare2 ${CFGFLAGS}
|
||||
make -j 4
|
||||
fi
|
||||
--without-ssl --prefix=/data/radare2 ${CFGFLAGS} || exit 1
|
||||
make -j 4 || exit 1
|
||||
PKG=`./configure --version|head -n1 |cut -d ' ' -f 1`
|
||||
D=${PKG}-android-${NDK_ARCH}
|
||||
rm -rf $D
|
||||
mkdir -p $D
|
||||
make install DESTDIR=$PWD/$D
|
||||
|
||||
INSTALL_PROGRAM=`grep INSTALL_DATA config-user.mk|cut -d = -f 2`
|
||||
|
||||
make install INSTALL_PROGRAM="${INSTALL_PROGRAM}" DESTDIR=$PWD/$D || exit 1
|
||||
# TODO: remove unused files like include files and so on
|
||||
cd $D
|
||||
tar czvf ../$D.tar.gz *
|
||||
|
|
|
|||
|
|
@ -2,9 +2,11 @@
|
|||
# android shell
|
||||
|
||||
ROOT=`dirname $PWD/$0`
|
||||
OS=`uname|tr 'A-Z' 'a-z'`
|
||||
[ "${OS}" = darwin ] && OS=mac
|
||||
|
||||
# TODO: autodetect or gtfo
|
||||
SDK=${HOME}/Downloads/android-sdk-mac_x86
|
||||
SDK=${HOME}/Downloads/android-sdk-${OS}_x86
|
||||
NDK=${HOME}/Downloads/android-ndk-r6b
|
||||
|
||||
if [ ! -d "${SDK}" ]; then
|
||||
|
|
@ -16,18 +18,21 @@ if [ ! -d "${NDK}" ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
NDKPATH=${NDK}/toolchains/arm-linux-androideabi-4.4.3/prebuilt/darwin-x86/bin/
|
||||
NDKPATH_ARM=`echo ${NDK}/toolchains/arm-*/prebuilt/${OS}-x86/bin/`
|
||||
NDKPATH_X86=`echo ${NDK}/toolchains/x86-*/prebuilt/${OS}-x86/bin/`
|
||||
INCDIR=${NDK}/platforms/android-8/arch-arm/usr/include/
|
||||
CFLAGS=-I${INCDIR}
|
||||
|
||||
PATH=$SDK/tools:$SDK/platform-tools:$NDK:${NDKPATH}:$PATH
|
||||
PATH=$SDK/tools:$SDK/platform-tools:$NDK:${NDKPATH_X86}:${NDKPATH_ARM}:$PATH
|
||||
export PATH
|
||||
export CFLAGS
|
||||
LANG=C
|
||||
export LANG
|
||||
cp ${ROOT}/ndk-gcc ${NDK}
|
||||
chmod +x ${NDK}/ndk-gcc
|
||||
CC=ndk-gcc
|
||||
export CC
|
||||
export PS1
|
||||
sh
|
||||
sh $@
|
||||
#echo $SHELL
|
||||
#$SHELL
|
||||
|
|
|
|||
3
sys/android-x86.sh
Executable file
3
sys/android-x86.sh
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/bin/sh
|
||||
cd `dirname $PWD/$0`
|
||||
./android-shell.sh ./android-build.sh x86
|
||||
|
|
@ -20,5 +20,7 @@ TARGETS="
|
|||
build
|
||||
bindist
|
||||
mingw32
|
||||
android-arm
|
||||
android-x86
|
||||
"
|
||||
# mingw64 maemo
|
||||
|
|
|
|||
|
|
@ -44,9 +44,7 @@ for a in log/*.html ; do
|
|||
n=$(echo $f | sed -e 's,.html,,' | sed -e 's,-, ,g')
|
||||
warnings=$(cat $l|grep warning: |wc -l)
|
||||
errors=$(cat $l|grep error: |wc -l)
|
||||
echo "<h2><a href=$f>$n</a></h2>" >> log/index.html
|
||||
echo "<h3> warnings: $warnings</h3>" >> log/index.html
|
||||
echo "<h3> errors: $errors</h3>" >> log/index.html
|
||||
echo "<h2><a href=$f>$n</a> (w:$warnings e:$errors)</h2>" >> log/index.html
|
||||
done
|
||||
|
||||
cat <<EOF >> log/index.html
|
||||
|
|
|
|||
Loading…
Reference in a new issue