aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBlue Swirl <blauwirbel@gmail.com>2009-08-06 20:19:20 +0000
committerChristopher Li <sparse@chrisli.org>2009-08-01 20:30:56 -0700
commit0723054e836e8c7c72c8c62f058768cfdfc6ce61 (patch)
treebd16f6d9870b34e2c52d535723e89c24edd65ce4
parent94a27dcf4ac83ca900be9e3f78bb545290a46f79 (diff)
downloadsparse-0723054e836e8c7c72c8c62f058768cfdfc6ce61.tar.gz
Define __LP64__ for x86_64 unless in 32 bit mode
Signed-off-by: Blue Swirl <blauwirbel@gmail.com> Signed-off-by: Christopher Li <sparse@chrisli.org>
-rwxr-xr-xcgcc2
1 files changed, 1 insertions, 1 deletions
diff --git a/cgcc b/cgcc
index 8295fcda..995cc054 100755
--- a/cgcc
+++ b/cgcc
@@ -265,7 +265,7 @@ sub add_specs {
&float_types (1, 1, 33, [24,8], [53,11], [113,15]) .
&define_size_t ("long unsigned int"));
} elsif ($spec eq 'x86_64') {
- return (' -Dx86_64=1 -D__x86_64=1 -D__x86_64__=1' .
+ return (' -Dx86_64=1 -D__x86_64=1 -D__x86_64__=1' . ($m32 ? '' : ' -D__LP64__=1') .
&integer_types (8, 16, 32, $m32 ? 32 : 64, 64, 128) .
&float_types (1, 1, 33, [24,8], [53,11], [113,15]) .
&define_size_t ($m32 ? "unsigned int" : "long unsigned int"));