Re: where to download g++ 32 bit compiler?

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

 



On Mon, 2023-09-25 at 19:50 +0200, David Brown wrote:
> You don't need a 32-bit compiler to build 32-bit applications - you can 
> happily use a 64-bit compiler with a 32-bit target.  If you are 
> targeting x86 (I'm guessing you are, since you did not specify), you use 
> the "-m32" flag to generate 32-bit code.

A caveat here: -m32 does not necessarily imply -march=i686.  So if you
build something with a x86_64 compiler and -m32, there is no guarantee
that the object code can run correctly on a "pure" 32-bit x86 CPU.

In previous GCC releases the documentation did not mention this caveat
and might puzzle people.

Some distros are using --with-arch-32=i686 configuring GCC to imply -
march=i686 with -m32, but it's not the default of vanilla GCC.

-- 
Xi Ruoyao <xry111@xxxxxxxxxxx>
School of Aerospace Science and Technology, Xidian University




[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