On Mon, May 7, 2018 at 4:49 PM, Matt Turner <matts...@gentoo.org> wrote: > On Mon, May 7, 2018 at 1:38 PM, Matt Turner <matts...@gentoo.org> wrote: >> == Convert media-libs/mesa ebuild to build with Meson == >> https://bugs.gentoo.org/652762 >> >> Ebuild posted. Blocked on problems surrounding LLVM (this is the story of >> maintaining media-libs/mesa). >> >> The problem is that Meson has no way of specifying a different llvm-config >> binary without a cross file, which our meson.eclass does not generate for >> 32-bit x86 builds on amd64. We've filed a Meson issue here [4] but haven't >> seen >> any progress towards a solution. > > Just wanted to highlight this section for the Meson maintainers specifically. > > Why do we not generate cross files for 32-bit builds on 64-bit? As far > as I understand that would be sufficient for us. Do you have any > suggestions?
Using a cross file triggers cross-compile mode in meson, which makes it behave differently in some ways. It is hard to say exactly what the differences are; this aspect of meson if very poorly documented. As an experiment, I implemented some changes in meson.eclass to have it always use a cross file. https://github.com/gentoo/gentoo/pull/8379 This seems to work ok for building systemd with multilib enabled. Once difference I spotted is that the CFLAGS/LDFLAGS given in the cross file get appended at the end of the compile/link commands, instead of in the middle. That could be problematic since link arguments like --as-needed are sensitive to their position on the command line. Anyway, it would be great if meson would just look at the LLVM_CONFIG environment var instead of forcing us to use a cross file here.