|
发表于 2005-8-5 10:06:49
|
显示全部楼层
What is multilib and how can I use it?
Every AMD64 processor is able to run 32-bit code as well as 64-bit code. However, when you have a 32-bit application, you are unable to mix it with 64-bit libraries or vice versa. You can, however, natively run 32-bit applications if all shared libraries it needs are available as 32-bit objects. You can choose whether you want multilib support or not by selecting the according profile. The default is a multilib-enabled profile.
Note: If you are using an old profile (2004.3 or older), please upgrade to 2005.0 and read the 2005.0 Upgrade Guide carefully. Compiling 32-bit Applications From A 64-bit Environment (using multilib)
You must first have the standard 32-bit environment up and running from the previous section. Then you need to add multilib to your USE flags in /etc/make.conf and emerge or re-emerge gcc-3.3.3-r5. This will build GCC with multilib support, which will allow you to create 32-bit binaries by using the -m32 CFLAGS setting. Having multilib installed should not affect 64-bit compilations (though you can pass -m64 if you want to be certain for some reason).
Note: We strongly discourage our users from ever adding -m32 to /etc/make.conf or using -m32 with portage in any form what-so-ever, and recommend that to do 32-bit compiles they should be by hand and not via the portage system. Not paying attention to this could seriously mess up your dependancy structure. Don't ask us how to fix this, it's your fault. |
|