1 |
On Sun 16 Mar 2014 04:50:33 Greg Turner wrote: |
2 |
> cmake-multilib.eclass, for example, breaks in mind-warpingly subtle and |
3 |
> confusing ways on USE="abi_x86_{32,64}" multilib hosts with |
4 |
> i686-pc-linux-gnu crossdev installed (when combined with some other issues |
5 |
> in that eclass, this results in correct qawarns about ignored ldflags on |
6 |
> devel profiles -- an ugly work-around is in my overlay, but I'm not happy |
7 |
> with it, so it's been languishing in my rainy-day todo queue. I'd be |
8 |
> thrilled to see a solution to the underlying problem, so I don't feel |
9 |
> compelled to salvage the ugly parts). |
10 |
|
11 |
cmake is completely broken when it comes to library searching and multilib and |
12 |
cross-compiling. it will happily look in hardcoded / paths to test for the |
13 |
existence of files as well as directly execute `pkg-config`. it's a great |
14 |
example of people saying "autotools is crap, so let's invent our own kind of |
15 |
crap and ignore lessons learned". this isn't the fault of cmake eclasses, but |
16 |
it'd be nice if we could someone standardize the hacks in there so we don't |
17 |
have to duplicate across ebuilds. |
18 |
|
19 |
just look at how cmake internally utilizes CMAKE_FIND_ROOT_PATH. or grep |
20 |
"pkg-config" in /usr/share/cmake/. or look at find_library usage in cmake |
21 |
macros. it's fundamentally screwed up right now :(. |
22 |
|
23 |
> As for how to fix it, if foo-bar-baz-quux crossdev targets are at |
24 |
> ${EROOT}/usr/foo-bar-baz-quux, putting wrappers in |
25 |
> ${EROOT}/usr/foo-bar-baz-quux/cross-wrappers, or something like that, seems |
26 |
> perfectly reasonable... heck, pure speculation, but it might even |
27 |
> noticeably speed up day-to-day $PATH searching on systems with lots of |
28 |
> crossdev targets installed. |
29 |
|
30 |
if they're in $PATH, then the exact location is irrelevant. they need not be |
31 |
in /usr/bin to cause a problem. if they're not in $PATH, then you're breaking |
32 |
the cross-compilers and that is unacceptable. |
33 |
|
34 |
putting CHOST things in /usr/CTARGET is incorrect. /usr/CHOST/CTARGET/ is for |
35 |
hosting helper programs specific to CTARGET that run on CHOST. |
36 |
-mike |