autoconf
[Top][All Lists]
Advanced

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

Re: determining 32 v. 64 bit compilatio


From: Peter O'Gorman
Subject: Re: determining 32 v. 64 bit compilatio
Date: Wed, 30 Jun 2010 22:27:08 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Thunderbird/3.0.5

On 06/30/2010 03:55 AM, Wesley Smith wrote:
I don't disagree, but let's consider this an academic exercise at this
point.  I'd actually like to know how to do this regardless of whether
it violates anyones code sensibilities.

Before we answer your question, I'd like a clarification: what would be the 
proper setting on OS X for you, when the compiler generates both 32-bit and 
64-bit code in the same object?

In other words, are you looking for a configuration variable that changes the 
way your code is compiled, or are you looking for a way to change the name of 
the files that are generated by the compiler?

On OSX, I'm looking for something that adapts to the -arch i386 -arch
x86_64 flags, so it should depend on the compiler settings, not
generate them.  Looking further into the library (which is open source
fortunately), I find where the flag is used:


On OS X either use #ifdef __x86_64__ or __LP64__ (the latter is also defined for ppc64) which are defined by the compiler.

If you want to limit the check for OS X, check for __APPLE__ too.

Peter




reply via email to

[Prev in Thread] Current Thread [Next in Thread]