diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2013-01-10 08:38:48 -0800 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2013-01-10 08:38:48 -0800 |
commit | 1a20cb20ff0201815691ccd3249d139a7cbfbfa8 (patch) | |
tree | 5de7f34fd3c774a3bf8d221e6d725a7f380cc145 /sysdeps/unix/sysv/linux/x86/bits | |
parent | 176f2fe0a1c2aeb7551eeddf651b2b32eb456137 (diff) | |
download | glibc-1a20cb20ff0201815691ccd3249d139a7cbfbfa8.tar.gz glibc-1a20cb20ff0201815691ccd3249d139a7cbfbfa8.tar.xz glibc-1a20cb20ff0201815691ccd3249d139a7cbfbfa8.zip |
Correct _XXX_ILP32_OFFBIG for x32
Diffstat (limited to 'sysdeps/unix/sysv/linux/x86/bits')
-rw-r--r-- | sysdeps/unix/sysv/linux/x86/bits/environments.h | 25 |
1 files changed, 17 insertions, 8 deletions
diff --git a/sysdeps/unix/sysv/linux/x86/bits/environments.h b/sysdeps/unix/sysv/linux/x86/bits/environments.h index 0fe1e3f5fd..27b37b30e7 100644 --- a/sysdeps/unix/sysv/linux/x86/bits/environments.h +++ b/sysdeps/unix/sysv/linux/x86/bits/environments.h @@ -64,15 +64,19 @@ #else /* __WORDSIZE == 32 */ -/* By default we have 32-bit wide `int', `long int', pointers and `off_t' - and all platforms support LFS. */ -# define _POSIX_V7_ILP32_OFF32 1 +/* We have 32-bit wide `int', `long int' and pointers and all platforms + support LFS. -mx32 has 64-bit wide `off_t'. */ # define _POSIX_V7_ILP32_OFFBIG 1 -# define _POSIX_V6_ILP32_OFF32 1 -# define _POSIX_V6_ILP32_OFFBIG 1 -# define _XBS5_ILP32_OFF32 1 +# define _POSIX_V6_ILP32_OFFBIG 1 # define _XBS5_ILP32_OFFBIG 1 +# ifndef __x86_64__ +/* -m32 has 32-bit wide `off_t'. */ +# define _POSIX_V7_ILP32_OFF32 1 +# define _POSIX_V6_ILP32_OFF32 1 +# define _XBS5_ILP32_OFF32 1 +# endif + /* We optionally provide an environment with the above size but an 64-bit side `off_t'. Therefore we don't define _POSIX_V7_ILP32_OFFBIG. */ @@ -89,8 +93,13 @@ #endif /* __WORDSIZE == 32 */ #define __ILP32_OFF32_CFLAGS "-m32" -#define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" #define __ILP32_OFF32_LDFLAGS "-m32" -#define __ILP32_OFFBIG_LDFLAGS "-m32" +#if defined __x86_64__ && defined __ILP32__ +# define __ILP32_OFFBIG_CFLAGS "-mx32" +# define __ILP32_OFFBIG_LDFLAGS "-mx32" +#else +# define __ILP32_OFFBIG_CFLAGS "-m32 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" +# define __ILP32_OFFBIG_LDFLAGS "-m32" +#endif #define __LP64_OFF64_CFLAGS "-m64" #define __LP64_OFF64_LDFLAGS "-m64" |