Re: configure gcc to build 32-bit binaries on x86_64

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andrew, 

thanks for the hints. I realized that important part of the game is that 
we distribute GCC as a part of our development environment. 
Is it possible to build GCC itself on 64-bit machine in a way that it 
could be used on both 32-bit and 64-bit architectures? 

Thanks, 
  Natalia

On Thu, 18 Jan 2007, Andrew Haley wrote:

> natasha@xxxxxxxx writes:
>  > 
>  > We plan to use x86_64 linux machine to build binary code that can
>  > eventually run on i386 machine. I know it's possible with -m32. 
>  > 
>  > I wonder if there is an easy way to configure/build GCC so that it would 
>  > produce 32-bit binaries by default?   
>  > 
>  > The reason I want this is because we build many products, and it may be 
>  > more difficult to implant -m32 option in every build system. 
> 
> You can do this by building a custom version of gcc, with special
> option processing.  Also, you can edit gcc's specs.
> 
> But I wouldn't do that: it's too much trouble to solve a trivial
> problem.  Instead I'd write a script, like this:
> 
> exec /path/to/gcc -m32 $*
> 
> You can override -m32 with -m64 if you need it.
> 
> Andrew.
> 

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux