[Toybox] Poking at llvm again, now in aosp prebuilts.

Rob Landley rob at landley.net
Thu Aug 22 14:30:10 PDT 2019


So I have an android checking lying around, and I went "does the prebuilt
toolchain in THAT build toybox", so I did:

$ ln -s clang android/aosp/prebuilts/clang/host/linux-x86/clang-r353983c/bin/llvm-cc
$ LDFLAGS=--static
CROSS_COMPILE=~/android/aosp/prebuilts/clang/host/linux-x86/clang-r353983c/bin/llvm-
make clean oldconfig toybox

And I got:

generated/obj/id.o: In function `do_id':
id.c:(.text.do_id+0x1b7): warning: Using 'getgrouplist' in statically linked
applications requires at runtime the shared libraries from the glibc version
used for linking
generated/obj/lib_xwrap.o: In function `xsetuser':
xwrap.c:(.text.xsetuser+0xb): warning: Using 'initgroups' in statically linked
applications requires at runtime the shared libraries from the glibc version
used for linking
generated/obj/lib_xwrap.o: In function `xgetgrgid':
xwrap.c:(.text.xgetgrgid+0x4): warning: Using 'getgrgid' in statically linked
applications requires at runtime the shared libraries from the glibc version
used for linking

And so on.

Um... not bionic? This is an llvm toolchain building against the host glibc?

Why?

(I think I asked this before, but don't remember the answer? Wouldn't it be more
portable to statically link all the prebuilts against bionic instead of
dynamically link them against the host libc? Dynamic library version skew is
common-ish, kernel syscall version skew is quite _uncommon_. And thinking of
this as a cross compiler toolchain... those provide their own libraries.)

Rob



More information about the Toybox mailing list