1 |
On Sunday 18 October 2009 14:46:07 Thomas Sachau wrote: |
2 |
> Mike Frysinger schrieb: |
3 |
> > another quick look at _setup_abi_env() looks like it needs work: |
4 |
> > - LD should not default to `ld` |
5 |
> |
6 |
> Whats your suggestion? |
7 |
|
8 |
the majority of the time, the compiler driver (i.e. `gcc`) should be used for |
9 |
linking. very few packages should invoke the linker directly. that is why |
10 |
currently the toolchain-func.eclass has tc-getLD return `ld` -- a few packages |
11 |
need it, but not most. if we're going to be forcing the setting of the LD env |
12 |
var all the time, then it needs to default to ${CC}. packages that need funky |
13 |
behavior should still work as they will be calling $(tc-getLD) anyways. |
14 |
|
15 |
> > - the -L paths to system dirs in LDFLAGS should not be there -- the |
16 |
> > toolchain can handle these just fine |
17 |
> |
18 |
> Last time i tried without, some packages failed to compile, will test it |
19 |
> again to check, if its still needed |
20 |
|
21 |
if things are failing, then we should look at gcc/binutils to make sure they |
22 |
use the right default search paths when given -m32/-m64 |
23 |
|
24 |
> > how do you control whether the multilib headers are needed ? it'll |
25 |
> > probably make sense in general, but there are def some packages where |
26 |
> > this will only get in the way (the toolchain ones). |
27 |
> |
28 |
> What do you mean here? If the diff between ABIs makes sense to install |
29 |
> seperate versions? |
30 |
|
31 |
some packages (like glibc and linux-headers) already handle the multilib |
32 |
situation. forcing the unnecessary Gentoo layer into the stack can easily |
33 |
break things. |
34 |
|
35 |
i imagine there are many other packages out there that use the same exact |
36 |
header regardless of the ABI in use -- let the compiler figure out padding of |
37 |
structs and sizes of types. |
38 |
|
39 |
> > how do you differentiate between packages where multi ABIs make no sense |
40 |
> > ? for example, most packages that dont install any libraries but just |
41 |
> > binaries. let's use the simple package app-text/tree. |
42 |
> |
43 |
> I dont differentiate. Currently i build for every ABI, if lib32 useflag is |
44 |
> set and multilib useflag is not set. The idea behind it is to allow the |
45 |
> installation of additional 32bit binaries, if requested. |
46 |
|
47 |
that's is an immense waste of time. if we ran all the source phases for a |
48 |
single ABI in one go, it should be easy to dynamically detect when a multilib |
49 |
multipass is necessary (by looking at library paths in $D). and for the odd |
50 |
package out, create a hook of some sort (EMULTIABI=true) to force behavior. |
51 |
|
52 |
i dont think there is any inherit reliance on running the multilib pass on |
53 |
each src step every time (other than that was easiest to implement) ? |
54 |
|
55 |
> > a lot of this multilib code should probably continue to live in the tree |
56 |
> > as it's a pretty big base of code to formalize that could do with fixes |
57 |
> > over time. i.e. we figure out that certain paths / define protections |
58 |
> > dont work so well, so changing them to something else would require PMS |
59 |
> > changing !? there has been talk before about pushing a lot of basic |
60 |
> > stuff to the tree so things dont have to be encoded in the PMS. |
61 |
> |
62 |
> How do you want to do this? Require package managers to inherit some |
63 |
> file/eclass? |
64 |
|
65 |
considering this requires changes to the PM already, i dont see why not. and |
66 |
it wouldnt really be an inherit in the current sense of the word. more like a |
67 |
simple source. |
68 |
|
69 |
> > how are packages handled that can only be used via 1 ABI ? any of the |
70 |
> > packages listed in the amd64 no-multilib package.mask for example. while |
71 |
> > these are mostly binary-only, this isnt a binary-specific issue. there |
72 |
> > are a number of packages which only work on x86/ppc but could easily work |
73 |
> > in a multilib amd64/ppc64 as a 32bit binary (source code sucks, is |
74 |
> > heavily asm, something else). |
75 |
> |
76 |
> The binary-only ones are easy. Since they dont interact with the env, they |
77 |
> can be installed as usual. If they depend on a new enough package manager |
78 |
> with multilib support, they could also depend on the useflag for the |
79 |
> additional 32bit libs they need. |
80 |
|
81 |
if it's a binary package, we know the ABI of it ahead of time. so if the |
82 |
package declared the binary ABI that it uses, then portage could handle the |
83 |
rest (making sure the deps are resolved against the ABI that it requires). we |
84 |
dont want to rewrite every binary ebuild to include an explicit [foo] ABI flag |
85 |
on each of its deps. |
86 |
|
87 |
> >> 2. Adding the internal lib32 useflag and usedeps with some workarounds |
88 |
> > |
89 |
> > what exactly does this "lib32" do ? naming USE flags according to |
90 |
> > specific ABI implementations is a bad idea. you have to forget special |
91 |
> > casing anything to "lib32 vs lib64". amd64, while the most common, is |
92 |
> > hardly extensible. we must handle multiple ABIs which easily might have |
93 |
> > the same bitsize. |
94 |
> |
95 |
> "lib32" is added to IUSE, you can enable as as every other useflag. |
96 |
> Internally, portage does add [lib32?] usedeps to all dependencies. So if |
97 |
> you enable the lib32 useflag, portage will require this useflag for all |
98 |
> dependencies too. I dont mind renaming it, if there is some other sane |
99 |
> naming for it. |
100 |
|
101 |
i think every package will need tagging for each ABI, not just relative to the |
102 |
default one. so the profile on an amd64 multilib would declare that it wants |
103 |
both x86 and x86_64 binaries by default. in the normal case, the PM can then |
104 |
automatically resolve all dependencies as requiring all ABIs. if a binary |
105 |
package is emerged, the ebuild itself declares the ABIs it provides, and then |
106 |
the PM only resolves the dependencies for the ABIs the package provides. |
107 |
-mike |