[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: determining 32 v. 64 bit compilatio
From: |
Andrew W. Nosenko |
Subject: |
Re: determining 32 v. 64 bit compilatio |
Date: |
Wed, 30 Jun 2010 12:48:14 +0300 |
On Wed, Jun 30, 2010 at 11:55, Wesley Smith <address@hidden> 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:
>
>
> #ifdef x86_64
>
> typedef signed int int32;
> typedef unsigned int uint32;
>
> #else
>
> typedef signed long int32;
> typedef unsigned long uint32;
>
> #endif
>
>
> In the end it looks like I need to set this based on the size of int
> and long, so calls like AC_CHECK_SIZEOF(unsigned long) seem to be most
> appropriate. Thanks for all of the help. This is my first time doing
> anything with autoconf. It's incredibly helpful to get some much good
> info. Sorry if my questions seem vague. I'm only just starting to
> get a hold of the issues involved in writing a portable build system.
>
Excuse me, but why just don't
#include <inttypes.h>
and use int32_t and uint32_t declared there?
If you want to deal with some heavy non-posix, or just too old system, then
AC_TYPE_INT32_T
autoconf macro (and like) may help you.
--
Andrew W. Nosenko <address@hidden>
- determining 32 v. 64 bit compilatio, Wesley Smith, 2010/06/29
- Re: determining 32 v. 64 bit compilatio, Bob Friesenhahn, 2010/06/29
- Re: determining 32 v. 64 bit compilatio, Mike Frysinger, 2010/06/29
- Re: determining 32 v. 64 bit compilatio, Wesley Smith, 2010/06/29
- Re: determining 32 v. 64 bit compilatio, Mike Frysinger, 2010/06/29
- Re: determining 32 v. 64 bit compilatio, Wesley Smith, 2010/06/29
- Re: determining 32 v. 64 bit compilatio, Raphael 'kena' Poss, 2010/06/29
- Re: determining 32 v. 64 bit compilatio, Wesley Smith, 2010/06/30
- Re: determining 32 v. 64 bit compilatio,
Andrew W. Nosenko <=
- Re: determining 32 v. 64 bit compilatio, John Calcote, 2010/06/30
- Re: determining 32 v. 64 bit compilatio, Wesley Smith, 2010/06/30
- Re: determining 32 v. 64 bit compilatio, Peter O'Gorman, 2010/06/30
- Re: determining 32 v. 64 bit compilatio, Bob Friesenhahn, 2010/06/29
- Re: determining 32 v. 64 bit compilatio, Mike Frysinger, 2010/06/29
- Re: determining 32 v. 64 bit compilatio, Russ Allbery, 2010/06/29
- Re: determining 32 v. 64 bit compilatio, Bob Friesenhahn, 2010/06/29