1 |
Hi devs, |
2 |
|
3 |
while there is the appreciated multiple ABI portage support going on, |
4 |
a thought on the intentions of the multilib profiles. |
5 |
|
6 |
Some background: |
7 |
I do have to support building an older, but still maintained large |
8 |
application software, that simply does not work when built as 64bit. |
9 |
As it does not have the need itself for >32bit pointers, and all |
10 |
the 64bit target platforms do support 32bit binaries too, the plan |
11 |
to fix the code for 64bits has been cancelled. |
12 |
|
13 |
I'm using gcc to build the application on all the target unices, |
14 |
as well as autotools for build management. |
15 |
|
16 |
As I'm building the toolchain myself too, I configure it with the |
17 |
32bit host triplet on each platform, usually disabling multilib. |
18 |
|
19 |
This simply works for ppc-aix, hppa-hpux, ia64-hpux, sparc-solaris, |
20 |
x86-solaris, even if the underlying OS/kernel is 64bit. |
21 |
It isn't even necessary to explicitly use --{build,host} at all, |
22 |
as config.guess tells the 32bit triplet on these platforms. |
23 |
Additionally, even their default compiler output is 32bit. |
24 |
|
25 |
But Linux "is not Unix": |
26 |
Configuring both binutils and gcc needs to be done with: |
27 |
$ CC="gcc -m32" /path/to/configure --{build,host}=i686-pc-linux-gnu ... |
28 |
This works on 64bit RHEL as well as on 64bit SLES (both have 32bit in /lib, |
29 |
64bit in /lib64, no /lib32), but breaks on amd64+multilib Gentoo Linux. |
30 |
|
31 |
Problem is that, as x86-linux isn't a multilib target, both ld and gcc |
32 |
search for 32bit libs&objects in /usr/lib:/lib, as they don't know about |
33 |
/usr/lib32:/lib32. The error when bootstrapping gcc is: |
34 |
/usr/lib/crti.o: file not recognized: File format not recognized |
35 |
|
36 |
While it is possible to patch binutils[1] and gcc[2] to search in |
37 |
/usr/lib32:/lib32 even with this otherways non-multilib target, |
38 |
it doesn't feel like the "right thing" to enable multilib for |
39 |
just one multilib option. |
40 |
|
41 |
Isn't the intention of multilib to have a new (64bit) system |
42 |
be compatible with the corresponding old (32bit) system? |
43 |
|
44 |
Please comment, thank you! |
45 |
/haubi/ |
46 |
|
47 |
[1] http://overlays.gentoo.org/proj/alt/changeset/51324 |
48 |
[2] http://overlays.gentoo.org/proj/alt/changeset/51325 |