Make Stap compatible with Android
Alexander Lochmann
alexander.lochmann@tu-dortmund.de
Mon May 14 19:06:00 GMT 2018
>> 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.
- Alex
--
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 882 bytes
Desc: OpenPGP digital signature
URL: <http://sourceware.org/pipermail/systemtap/attachments/20180514/dffc4cfd/attachment.sig>
More information about the Systemtap
mailing list