From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ben Greear Subject: Cross-compile iproute2 for android? Date: Tue, 10 Sep 2013 16:01:13 -0700 Message-ID: <522FA4B9.7050106@candelatech.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: netdev Return-path: Received: from mail.candelatech.com ([208.74.158.172]:43871 "EHLO ns3.lanforge.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751229Ab3IJXBO (ORCPT ); Tue, 10 Sep 2013 19:01:14 -0400 Received: from [192.168.100.226] (firewall.candelatech.com [70.89.124.249]) (authenticated bits=0) by ns3.lanforge.com (8.14.2/8.14.2) with ESMTP id r8AN1DfN031672 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 10 Sep 2013 16:01:14 -0700 Sender: netdev-owner@vger.kernel.org List-ID: Has anyone managed to cross-compile iproute2 for android using the android NDK? I managed to compile it, with some fairly ugly hacks related to include files, but then when I try to run it, I get a core dump that doesn't do much for me: $ ~/android-ndk-r9/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi-gdb ~/btbits/btbits-arm/server/local/sbin/ip core GNU gdb (GDB) 7.3.1-gg2 Copyright (C) 2011 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "--host=x86_64-linux-gnu --target=arm-linux-android". For bug reporting instructions, please see: ... Reading symbols from /home/greearb/btbits/btbits-arm/server/local/sbin/ip...done. [New LWP 3756] Core was generated by `./ip list'. Program terminated with signal 4, Illegal instruction. #0 0xb6f4b000 in ?? () (gdb) bt #0 0xb6f4b000 in ?? () #1 0x00000000 in ?? () (gdb) quit $ file /home/greearb/btbits/btbits-arm/server/local/sbin/ip /home/greearb/btbits/btbits-arm/server/local/sbin/ip: ELF 32-bit LSB shared object, ARM, version 1 (SYSV), dynamically linked, not stripped If anyone has any suggestions, please let me know. If anyone wants to take a look at my attempt to get it cross-compiling, my repository is here: https://github.com/greearb/iproute2-ct/commits/master Thanks, Ben -- Ben Greear Candela Technologies Inc http://www.candelatech.com