Re: 64-bit machine generate an executable where long is 32-bits and pointers are 64-bits.

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

 



Kraiser <pietiatibia1@xxxxxxxxx> writes:

> Ian Lance Taylor-3 wrote:
>> 
>> Kraiser <pietiatibia1@xxxxxxxxx> writes:
>> 
>>> It's my problem actually any possible way to do that ?
>>> well -m32 isn't actually what i'm looking for because it compiles code
>>> for
>>> 32-bit enviorment along with pointers(32 bit) i need pointers to be
>>> 64-bit
>>> but long = 32bit just like it is on Windows LLP64.
>>> If the feature isn't exist maybe it would be awesome to add this in
>>> future
>>> releases of GCC :?
>>> seems like more people needs it:
>>> http://stackoverflow.com/questions/1857296/can-gcc-on-ubuntu-on-a-64-bit-machine-generate-an-executable-where-long-is-32-bit
>> 
>> Compiler options of this sort are problematic because they change the
>> ABI.  That is, code compiled with this option can not be safely linked
>> with code compiled without this option.  Code compiled with this
>> option can not be safely used with dynamic librares compiled without
>> this option.  Code compiled with this option can not safely make
>> system calls on a kernel compiled without this option (e.g., on
>> GNU/Linux, the stat structure includes fields of type unsigned long,
>> so the stat system call will not work as expected).
>> 
>> So the only people who can safely use this option are people who are
>> prepared to recompile their entire system.
>> 
>> It's a very simple change to make to the source code, but that doesn't
>> necessarily mean that it is a good idea.
>> 
>> Ian
>> 
>> 
> There is an option in config of linux kernel to recompile kernel with it ?

Not as far as I know.

Ian

[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