[Buildroot] [PATCH] package/android-tools: fix static build failure due to missing -latomic

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Apr 4 20:45:39 UTC 2019

Hello Giulio,

On Thu,  4 Apr 2019 17:39:04 +0200
Giulio Benetti <giulio.benetti at micronovasrl.com> wrote:

> +# Uses __atomic_fetch_add_4. In adbd.mk Makefile there is no hunk to the end of
> +# linking command. So need to add -latomic to LIBS using sed to provide
> +# -latomic at the correct place in the linking command.
> +	$(SED) 's/-lz -lcrypt/-lz -lcrypt -latomic/' $(@D)/debian/makefiles/adbd.mk
> +endef
> +endif

Instead of this, please do regular patch on adbd.mk that does this:

-LIBS+= -lc -lpthread -lz -lcrypto -lcrypt `pkg-config --libs glib-2.0 gio-2.0`
+LIBS+= -lc -lpthread -lz `pkg-config --libs libcrypto` -lcrypt `pkg-config --libs glib-2.0 gio-2.0`

and that's it.

Also, adding host-pkgconf to ANDROID_TOOLS_DEPENDENCIES when adbd is
selected would be necessary (but it should already be needed anyway, as
pkg-config is already used to detect glib).


Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering

More information about the buildroot mailing list