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