diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-04-27 12:05:38 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-05-01 17:11:29 +0200 |
| commit | 8ddbf2e8157938e219ff2cf19da34b9c6f5f1d4f (patch) | |
| tree | c67080566d90ea783a634b580cb0843c34dd9dbf /cgcc | |
| parent | 234a9d0cb7d0f211744146261e212d520c0d5b07 (diff) | |
| download | sparse-dev-8ddbf2e8157938e219ff2cf19da34b9c6f5f1d4f.tar.gz | |
let cgcc use sparse's predefines for i386 & x86-64
Currently, cgcc contains the logic to add predefined symbols
like __INT_MAX or __SIZEOF_POINTER, but:
1) this logic is now completly present in sparse itself
2) cgcc hasn't the logic needed for x86-64-x32 which sparse now has.
So, drop these defines in cgcc and let cgcc simply use the ones
predefined by sparse itself.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Acked-by: Ramsay Jones <ramsay@ramsayjones.plus.com>
Diffstat (limited to 'cgcc')
| -rwxr-xr-x | cgcc | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -265,10 +265,7 @@ sub add_specs { " -D'__declspec(x)=__attribute__((x))'"; } elsif ($spec eq 'i86') { return (' -D__i386=1 -D__i386__=1' . - &integer_types (8, 16, 32, $m64 ? 64 : 32, 64) . - &float_types (1, 1, 21, [24,8], [53,11], [64,15]) . - &define_size_t ($m64 ? "long unsigned int" : "unsigned int") . - ' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4')); + &float_types (1, 1, 21, [24,8], [53,11], [64,15])); } elsif ($spec eq 'sparc') { return (' -D__sparc=1 -D__sparc__=1' . &integer_types (8, 16, 32, $m64 ? 64 : 32, 64) . @@ -282,11 +279,7 @@ sub add_specs { &define_size_t ("long unsigned int") . ' -D__SIZEOF_POINTER__=8'); } elsif ($spec eq 'x86_64') { - return (' -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") . - ' -D__SIZEOF_POINTER__=' . ($m32 ? '4' : '8')); + return &float_types (1, 1, 33, [24,8], [53,11], [113,15]); } elsif ($spec eq 'ppc') { return (' -D__powerpc__=1 -D_BIG_ENDIAN -D_STRING_ARCH_unaligned=1' . &integer_types (8, 16, 32, $m64 ? 64 : 32, 64) . |
