[Mesa-dev] [PATCH 1/2] configure.ac: Add support for Android builds

Nicolas Boichat drinkcat at chromium.org
Fri May 27 10:36:12 UTC 2016


Hi Emil,

Took us some time to clean things up, but we got an ebuild and repo to
share with you.

On Tue, May 24, 2016 at 10:52 PM, Emil Velikov <emil.l.velikov at gmail.com> wrote:
[snip]
>> We also set PKGCONFIG="false", because, well, we do not have .pc files
>> for Android libs. We _could_ create them manually, though,
> Arr... it seems like there's more 'hacks' then expected. I would
> kindly urge that if you're using the autoconf build to use .pc files,
> please ?
>
> There's not need to manually create any of them - just throw the
> template and wire it up in the build system.

Not quite sure how that'd work out, I guess I'll see ,-)

>> but I'm not
>> 100% convinced it's any better than specifying them in the mesa ebuild
>> (knowing that mesa is the only package we build this way, the
>> dependencies are prebuilts that we pull from Android builders).
>>
> Is adding such workarounds encouranged/wide spread in the ebuild ?
> Last time I've looked at the Gentoo ones, there weren't many such
> cases.

No, it's not usual, at all. The issue here is that we have a chroot
that is meant to be a "normal" Linux (that is, Chromium OS), for which
we build all the libraries. But, in the same chroot, we also switch to
a different toolchain and vastly different system (Android), using
prebuilt libraries, to build the second copy of mesa. I guess we are
bound to have a number of hacks...

>> So we replace them with LIBXYZ_[CFLAGS/LIBS], and configure is happy with that.
>>
>> One thing that I wonder about is how we could specify
>> libEGL_la_LIBADD += -lhardware -lcutils -lsync
>> without hardcoding it in the Makefile.am.
>>
>> Any idea how we could do that? Or do you think it's ok to hardcode the libs?
>>
> The proposed solution will handle these. If you guys feel that it's
> too much/annoying to deal with, show me a repo and I'll send you the
> patches ;-) Please ?

Alright, so the ebuild is here:
https://chromium-review.googlesource.com/#/c/347700/ (if you have a
Chromium OS chroot, it should just work).

And the patches are here:
https://chromium.googlesource.com/chromiumos/third_party/mesa/+log/arc-11.3.0-pre1

They are still based on a slightly older version of mesa. Tomasz is
working on rebasing to the latest mesa master (it looks like someone
implemented similar changes to ours to add support for PRIME FD).

Let us know if you hit any issue, and looking forward to your patches,
thanks a lot!

Best,

Nicolas


More information about the mesa-dev mailing list