1 |
On Tuesday 20 October 2009 09:06:29 Michael Haubenwallner wrote: |
2 |
> As I'm building the toolchain myself too, I configure it with the |
3 |
> 32bit host triplet on each platform, usually disabling multilib. |
4 |
|
5 |
this doesnt make any sense to me |
6 |
|
7 |
> This simply works for ppc-aix, hppa-hpux, ia64-hpux, sparc-solaris, |
8 |
> x86-solaris, even if the underlying OS/kernel is 64bit. |
9 |
> It isn't even necessary to explicitly use --{build,host} at all, |
10 |
> as config.guess tells the 32bit triplet on these platforms. |
11 |
> Additionally, even their default compiler output is 32bit. |
12 |
> |
13 |
> But Linux "is not Unix": |
14 |
|
15 |
you're right, so i'm not terribly concerned with compatibility with non-Linux |
16 |
systems. comparing the native Gentoo/Linux multilib setup to another Linux |
17 |
multilib setup is the only useful comparison. |
18 |
|
19 |
> Configuring both binutils and gcc needs to be done with: |
20 |
> $ CC="gcc -m32" /path/to/configure --{build,host}=i686-pc-linux-gnu ... |
21 |
> This works on 64bit RHEL as well as on 64bit SLES (both have 32bit in /lib, |
22 |
> 64bit in /lib64, no /lib32), but breaks on amd64+multilib Gentoo Linux. |
23 |
> |
24 |
> Problem is that, as x86-linux isn't a multilib target, both ld and gcc |
25 |
> search for 32bit libs&objects in /usr/lib:/lib, as they don't know about |
26 |
> /usr/lib32:/lib32. The error when bootstrapping gcc is: |
27 |
> /usr/lib/crti.o: file not recognized: File format not recognized |
28 |
|
29 |
i dont get it. why does the i686-pc-linux-gnu toolchain target matter on an |
30 |
amd64 multilib system ? the native x86_64-pc-linux-gnu toolchain should |
31 |
already do the right thing when given -m32. |
32 |
|
33 |
> While it is possible to patch binutils[1] and gcc[2] to search in |
34 |
> /usr/lib32:/lib32 even with this otherways non-multilib target, |
35 |
> it doesn't feel like the "right thing" to enable multilib for |
36 |
> just one multilib option. |
37 |
> |
38 |
> Isn't the intention of multilib to have a new (64bit) system |
39 |
> be compatible with the corresponding old (32bit) system? |
40 |
|
41 |
your description of "compatible" is pretty vague. ignoring /lib -> /lib64 |
42 |
symlink (which shouldnt matter to any binaries), i'm not aware of any |
43 |
differences off the top of my head. |
44 |
-mike |