This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make Stap compatible with Android


Hi Thorsten,

can you please show us your patch?

David, Marc and I are discussing whether or not my patch, which does
something similar, should be merged or not.

Cheers,
Alex

On 15.05.2018 12:54, Torsten Polle wrote:
> 
> 
>> Am 14.05.2018 um 22:56 schrieb Mark Wielaard <mark@klomp.org>:
>>
>> On Mon, May 14, 2018 at 09:06:09PM +0200, Alexander Lochmann wrote:
>>>
>>>>> On my opinion, this does far beyond what someone should when compiling
>>>>> stap{io,run} for Android.
>>>>
>>>> I hear you, but your patches went to a fair amount of trouble to work
>>>> around the lack of elfutils, when elfutils has android support (if I'm
>>>> reading its source correctly). This does seem like the right way to
>>>> go.
>>>>
>>> Okay. Android does built its own version of elfutils, and their compiler
>>> seems to support libz. Sorry for that.
>>> However, the Android libc (aka bionic) lags some standard features,
>>> i.e., argparse. To overcome that issue, the Android developers made some
>>> fixups:
>>> https://android.googlesource.com/platform/external/elfutils.git/+/master/bionic-fixup/
>>>
>>> Android uses its own build system which bypasses configure in case of
>>> elfutils. The Android build system is used to include the aforementioned
>>> fixups:
>>> https://android.googlesource.com/platform/external/elfutils.git/+/master/libelf/Android.bp
>>> (Android.bp is a new variant of a Makefile)
>>>
>>> One of those fixups is a workaround for the missing argp_parse in bionic.
>>> I tried to include that fixup manually: ./configure
>>> --host=arm-linux-androideabi  CFLAGS="-include
>>> `pwd`/bionic-fixup/AndroidFixup.h -I`pwd`/bionic-fixup/"
>>> But configure still fails, because the linker cannot find -largp.
>>
>> I don't understand precisely what you are trying to do.
>> But I get the impression that you only want/need the runtime
>> (stapio, staprun) on android. In that case the existing elfutils
>> libelf support should be all you need and you don't need to
>> build elfutils from scratch. You only need that if you want to
>> build the other parts of systemtap (which uses the elfutils libdw
>> library, which doesn't seem available on android out of the box yet.
>>
>> Cheers,
>> Mark
> 
> Hi Alexander,
> 
> I’m using SystemTap for a variety of systems all of which are used with a host and target (cross-compile). On the targets I’m only using staprun/stapio. One of those targets is so rudimentary that I cannot compile elfutils. I use a simply patch to do so. If you’re interested, I could share the patch.
> 
> Kind Regards,
> Torsten
> 

-- 
Technische Universität Dortmund
Alexander Lochmann                PGP key: 0xBC3EF6FD
Otto-Hahn-Str. 16                 phone:  +49.231.7556141
D-44227 Dortmund                  fax:    +49.231.7556116
http://ess.cs.tu-dortmund.de/Staff/al

Attachment: signature.asc
Description: OpenPGP digital signature


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]