aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/cgcc
diff options
Diffstat (limited to 'cgcc')
-rwxr-xr-xcgcc18
1 files changed, 8 insertions, 10 deletions
diff --git a/cgcc b/cgcc
index f3909ae8..a99a3a1c 100755
--- a/cgcc
+++ b/cgcc
@@ -287,16 +287,16 @@ sub add_specs {
" -D'__fastcall=__attribute__((__fastcall__))'" .
" -D'__declspec(x)=__attribute__((x))'";
} elsif ($spec eq 'i386') {
- return (' -D__i386=1 -D__i386__=1' .
+ return (
&float_types (1, 1, 21, [24,8], [53,11], [64,15]));
} elsif ($spec eq 'sparc') {
- return (' -D__sparc=1 -D__sparc__=1' .
+ return (
&integer_types (8, 16, 32, $m64 ? 64 : 32, 64) .
&float_types (1, 1, 33, [24,8], [53,11], [113,15]) .
&define_size_t ($m64 ? "long unsigned int" : "unsigned int") .
' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4'));
} elsif ($spec eq 'sparc64') {
- return (' -D__sparc=1 -D__sparc__=1 -D__sparcv9__=1 -D__sparc64__=1 -D__arch64__=1 -D__LP64__=1' .
+ return (
&integer_types (8, 16, 32, 64, 64, 128) .
&float_types (1, 1, 33, [24,8], [53,11], [113,15]) .
&define_size_t ("long unsigned int") .
@@ -304,25 +304,23 @@ sub add_specs {
} elsif ($spec eq 'x86_64') {
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' .
+ return (' -D_BIG_ENDIAN -D_STRING_ARCH_unaligned=1' .
&integer_types (8, 16, 32, $m64 ? 64 : 32, 64) .
&float_types (1, 1, 21, [24,8], [53,11], [113,15]) .
&define_size_t ($m64 ? "long unsigned int" : "unsigned int") .
' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4'));
} elsif ($spec eq 'ppc64') {
- return (' -D__powerpc__=1 -D__PPC__=1 -D_STRING_ARCH_unaligned=1' .
- ' -D__powerpc64__=1 -D__PPC64__=1' .
- ' -m64' .
+ return (' -D_STRING_ARCH_unaligned=1 -m64' .
&float_types (1, 1, 21, [24,8], [53,11], [113,15]));
} elsif ($spec eq 's390x') {
- return (' -D__s390x__ -D__s390__ -D_BIG_ENDIAN' .
+ return (' -D_BIG_ENDIAN' .
&integer_types (8, 16, 32, $m64 ? 64 : 32, 64) .
&float_types (1, 1, 36, [24,8], [53,11], [113,15]) .
&define_size_t ("long unsigned int") .
' -D__SIZEOF_POINTER__=' . ($m64 ? '8' : '4'));
} elsif ($spec eq 'arm') {
chomp (my $gccmachine = `$cc -dumpmachine`);
- my $cppsymbols = ' -D__arm__=1 -m32';
+ my $cppsymbols = ' -m32';
if ($gccmachine eq 'arm-linux-gnueabihf') {
$cppsymbols .= ' -D__ARM_PCS_VFP=1';
@@ -331,7 +329,7 @@ sub add_specs {
return ($cppsymbols .
&float_types (1, 1, 36, [24,8], [53,11], [53, 11]));
} elsif ($spec eq 'aarch64') {
- return (' -D__aarch64__=1 -m64' .
+ return (' -m64' .
&float_types (1, 1, 36, [24,8], [53,11], [113,15]));
} elsif ($spec eq 'host_os_specs') {
my $os = `uname -s`;