f7 32bit/64bit compiles.
Rick Stevens
rstevens at internap.com
Wed Jul 18 23:33:03 UTC 2007
On Wed, 2007-07-18 at 16:55 -0600, clemens at dwf.com wrote:
> OK, a dumb question, but Ive always just assumed that all my machines were
> 32bit, and ignored 64bit stuff.
>
> Now more than 1/2 are 64bit.
>
> So the dumb question: How do you compile in 64bit mode?
> Im sure its there in the gcc man page, but after scanning the first
> 20-30pages Im about to go to sleep...
>
> And, is there some place to put this so that gcc ALWAYS compiles
> in 64bit mode? Or does so by default.
>
> Or does gcc look at the machine architecture and make a decision on
> its own.
>
> So, a quick discussion of the niceties of 32/64bit compiling would be
> appreciated.
A 64-bit machine by default compiles 64 bit code. Conversely, a 32-bit
machine compiles 32-bit stuff.
You can force a 64-bit machine to build 32-bit stuff, specify
"-march=i686" or similar thing. "-m32" is similar, but doesn't optimize
for 686 processors (more of a "generic 32-bit" switch).
So, unless you have a specific need to compile for a 32-bit environment
on a 64-bit system, don't worry about it. The compiler will sort it out
for you.
----------------------------------------------------------------------
- Rick Stevens, Principal Engineer rstevens at internap.com -
- VitalStream, Inc. http://www.vitalstream.com -
- -
- Give me ambiguity or give me something else! -
----------------------------------------------------------------------
More information about the fedora-list
mailing list