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

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

 



HI, Ruoyao,

Thanks indeed for your help!

Best regards,

Dingjun
________________________________
From: Xi Ruoyao <xry111@xxxxxxxxxxx>
Sent: Tuesday, September 26, 2023 3:38 AM
To: David Brown <david.brown@xxxxxxxxxxxx>; gcc-help@xxxxxxxxxxx <gcc-help@xxxxxxxxxxx>
Cc: Dingjun Chen <Dingjun.Chen@xxxxxxxxxxxxxxxxxxx>
Subject: Re: where to download g++ 32 bit compiler?

External Email Warning: Do not click any links or open any attachments unless you trust the sender and know the content is safe. From Geotech IT.



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