You are not logged in.

#1 2009-07-19 00:25:30

Marenz
Member
Registered: 2008-06-22
Posts: 48

multilib-capable gcc on 64bit systems

Hello there,

I post this for those who are interested in building 32bit binaries without a chroot.
I just finished building and testing my gcc-multilib package.
It allows you to build 32bit binaries using the -m32 paramter, like this:

 
> uname -m
x86_64
> g++ -m32 main.cpp
./a.out 
I am a 32bit binary!
> file a.out 
a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.18, not stripped
> ldd32 a.out 
    linux-gate.so.1 =>  (0xf7f3d000)
    libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7e27000)
    libm.so.6 => /lib32/libm.so.6 (0xf7e01000)
    libgcc_s.so.1 => /usr/lib32/libgcc_s.so.1 (0xf7de5000)
    libc.so.6 => /lib32/libc.so.6 (0xf7c9f000)
    /lib32/ld-linux.so.2 (0xf7f3e000)

You can find the AUR package here:
http://aur.archlinux.org/packages.php?ID=28545

But to build it you need a multilib capable gcc, so most of you wont be able to use this.
For you, I have put an already compiled version up, you can find it here:
  [Update]: Fixed a lot of things in the package, now at release 7
  http://timeoutd.org/gcc-multilib-4.4.0- … pkg.tar.gz MD5 1b094d6bb0cbaa56f60b7f31280eb9b4


Vote for the AUR package smile

Have fun compiling!

PS: Should I add this to the wiki?

--Marenz

Last edited by Marenz (2009-07-21 05:18:53)

Offline

#2 2009-07-19 05:58:45

djszapi
Member
From: Cambridge, United Kingdom
Registered: 2009-06-14
Posts: 1,439
Website

Re: multilib-capable gcc on 64bit systems

Should I add this to the wiki?

Feel free to do it, welcome to the community smile

Btw, Doesn't know the default built gcc this? On fedora i used this, it's sure with the default.

Offline

#3 2009-07-19 06:19:35

Marenz
Member
Registered: 2008-06-22
Posts: 48

Re: multilib-capable gcc on 64bit systems

Yes, by default it is enabled, but it was decided to disable it in arch64.

--Marenz

Offline

#4 2009-08-15 10:58:31

priorit
Member
Registered: 2008-12-23
Posts: 21

Re: multilib-capable gcc on 64bit systems

I recently opened a wish on the bug-tracker, but unfortunately they answer is "no". http://bugs.archlinux.org/task/15928

Does anyone here have an up to date multilibs package?

Offline

#5 2009-11-16 13:46:16

Marenz
Member
Registered: 2008-06-22
Posts: 48

Re: multilib-capable gcc on 64bit systems

Updated to latest gcc version.
Binary available at

http://timeoutd.org/gcc-multilib-4.4.2- … pkg.tar.gz
9bda35e858dde3a16ce69c08bdc3d4ae


--Marenz

Offline

Board footer

Powered by FluxBB