This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: mem model defines for various platforms


Bruce Korb wrote:
> 
> Zack Weinberg wrote:
> 
> > > Actually for linux there was no way to specify the model for linux.
> >
> > To be marginally clearer, ia64-linux does not support ILP32 mode at
> > all; it is (as far as I know) purely an HPUX-ism.
> 
> And AIX and Solaris and even x86-linux, for that matter (except that
> x86-linux doesn't support LP64).  I haven't played much with Sol 10
> yet, but I am certain that it supports 32 bit user environments
> even though the kernel is 64 bit only.  Thanks! - Bruce

In fact, for kicks, using native compilers, I checked the following:

emit_def_check()
{
  cat >&4 <<- _EOF_
	#ifdef _${1}
	  fputs( "/* DEFINED:  _${1}   */\n", stdout );
	#endif
	#ifdef __${1}
	  fputs( "/* DEFINED: __${1}   */\n", stdout );
	#endif
	#ifdef __${1}__
	  fputs( "/* DEFINED: __${1}__ */\n", stdout );
	#endif
	_EOF_
}

for f in ILP32 LP64 I32LPx 64BIT 32BIT IxLP64
do
  emit_def_check $f
done

================================
 *  Sizes and offsets on SunOS sun4u platform
 *  using CC=/net/megami/opt/apps/forte62/SUNWspro/bin/cc
 */
.....
/* DEFINED:  _ILP32   */

w/ -xarch=v9 -xregs=no%appl,no%float:

/* DEFINED:  _LP64   */
/* DEFINED:  _I32LPx   */
================================
 *  Sizes and offsets on HP-UX 9000/800 platform
 *  using CC=/usr/bin/cc
 */
.......
/* DEFINED:  _ILP32   */

w/ +DA2.0W +M2 : */
/* DEFINED:  _LP64   */
/* DEFINED: __LP64__ */
================================
 *  Sizes and offsets on HP-UX ia64 platform
 *  using CC=/usr/bin/cc
/* DEFINED:  _ILP32   */

#else /* __LP64__ is defined w/ +DD64: */
/* DEFINED:  _LP64   */
/* DEFINED: __LP64__ */
================================
 *  Sizes and offsets on AIX 0000D99F4C00 platform
 *  using CC=/usr/bin/cc
/* DEFINED:  _ILP32   */

w/ -q64:
<<<fails -- I don't have a 64 bit user environment>>>>

================================
 *  Sizes and offsets on Linux i686 platform
 *  using CC=/usr/bin/cc
<<<NONE OF THEM ARE DEFINED!!>>>

================================
 *  Sizes and offsets on Linux ia64 SLES9 platform
 *  using CC=/usr/bin/cc
/* DEFINED:  _LP64   */
/* DEFINED: __LP64__ */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]