summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaakov Selkowitz <yselkowitz@users.sourceforge.net>2014-01-21 21:16:05 -0600
committerYaakov Selkowitz <yselkowitz@users.sourceforge.net>2014-01-21 21:16:05 -0600
commitc64e06f28763e20b6106e1d9c99d37ffc97230b1 (patch)
tree1cffd4a57ee84a1d6bb3013af151a1cf3880ce8b
parent9c12f197370d831072e7d3f57997eb9ce479b993 (diff)
downloadcygwin-gcc-c64e06f28763e20b6106e1d9c99d37ffc97230b1.tar.gz
cygwin-gcc-c64e06f28763e20b6106e1d9c99d37ffc97230b1.tar.xz
cygwin-gcc-c64e06f28763e20b6106e1d9c99d37ffc97230b1.zip
Fix 64-bit builtin types
-rw-r--r--cygwin-gcc.spec5
-rw-r--r--gcc48-specs-cygwin.patch73
2 files changed, 30 insertions, 48 deletions
diff --git a/cygwin-gcc.spec b/cygwin-gcc.spec
index 2bc8d19..ba3e4ee 100644
--- a/cygwin-gcc.spec
+++ b/cygwin-gcc.spec
@@ -7,7 +7,7 @@
%global gcc_version %{gcc_major}.%{gcc_minor}.%{gcc_micro}
# Note, gcc_release must be integer, if you want to add suffixes to
# %%{release}, append them after %%{gcc_release} on Release: line.
-%global gcc_release 1
+%global gcc_release 2
%global build_ada 1
# building cross-gnat requires matching X.Y version of native gnat
@@ -524,6 +524,9 @@ rm -rf $RPM_BUILD_ROOT
%changelog
+* Tue Jan 21 2014 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 4.8.2-2
+- Fix 64-bit builtin types for i686-cygwin target.
+
* Sun Jan 19 2014 Yaakov Selkowitz <yselkowitz@users.sourceforge.net> - 4.8.2-1
- Version bump.
- Enable Ada on systems with native gcc-gnat-4.8.x.
diff --git a/gcc48-specs-cygwin.patch b/gcc48-specs-cygwin.patch
index 6b17a2c..f29eec6 100644
--- a/gcc48-specs-cygwin.patch
+++ b/gcc48-specs-cygwin.patch
@@ -67,79 +67,58 @@
host_xmake_file="${host_xmake_file} i386/x-cygwin"
--- gcc/config/i386/cygwin-stdint.h (revision 196430)
+++ gcc/config/i386/cygwin-stdint.h (working copy)
-@@ -24,39 +24,71 @@
+@@ -24,39 +24,39 @@
#define INT8_TYPE "signed char"
#define INT16_TYPE "short int"
#define INT32_TYPE "int"
-+#ifdef __x86_64__
-+#define INT64_TYPE "long int"
-+#else
- #define INT64_TYPE "long long int"
-+#endif
+-#define INT64_TYPE "long long int"
++#define INT64_TYPE (TARGET_64BIT ? "long int" : "long long int")
#define UINT8_TYPE "unsigned char"
#define UINT16_TYPE "short unsigned int"
#define UINT32_TYPE "unsigned int"
-+#ifdef __x86_64__
-+#define UINT64_TYPE "long unsigned int"
-+#else
- #define UINT64_TYPE "long long unsigned int"
-+#endif
+-#define UINT64_TYPE "long long unsigned int"
++#define UINT64_TYPE (TARGET_64BIT ? "long unsigned int" : "long long unsigned int")
/* Minimum-width integer types */
#define INT_LEAST8_TYPE "signed char"
#define INT_LEAST16_TYPE "short int"
#define INT_LEAST32_TYPE "int"
-+#ifdef __x86_64__
-+#define INT_LEAST64_TYPE "long int"
-+#else
- #define INT_LEAST64_TYPE "long long int"
-+#endif
+-#define INT_LEAST64_TYPE "long long int"
++#define INT_LEAST64_TYPE (TARGET_64BIT ? "long int" : "long long int")
#define UINT_LEAST8_TYPE "unsigned char"
#define UINT_LEAST16_TYPE "short unsigned int"
#define UINT_LEAST32_TYPE "unsigned int"
-+#ifdef __x86_64__
-+#define UINT_LEAST64_TYPE "long unsigned int"
-+#else
- #define UINT_LEAST64_TYPE "long long unsigned int"
-+#endif
+-#define UINT_LEAST64_TYPE "long long unsigned int"
++#define UINT_LEAST64_TYPE (TARGET_64BIT ? "long unsigned int" : "long long unsigned int")
/* Fastest minimum-width integer types */
#define INT_FAST8_TYPE "signed char"
-+#ifdef __x86_64__
-+#define INT_FAST16_TYPE "long int"
-+#define INT_FAST32_TYPE "long int"
-+#define INT_FAST64_TYPE "long int"
-+#else
- #define INT_FAST16_TYPE "int"
- #define INT_FAST32_TYPE "int"
- #define INT_FAST64_TYPE "long long int"
-+#endif
+-#define INT_FAST16_TYPE "int"
+-#define INT_FAST32_TYPE "int"
+-#define INT_FAST64_TYPE "long long int"
++#define INT_FAST16_TYPE (TARGET_64BIT ? "long int" : "int")
++#define INT_FAST32_TYPE (TARGET_64BIT ? "long int" : "int")
++#define INT_FAST64_TYPE (TARGET_64BIT ? "long int" : "long long int")
#define UINT_FAST8_TYPE "unsigned char"
-+#ifdef __x86_64__
-+#define UINT_FAST16_TYPE "long unsigned int"
-+#define UINT_FAST32_TYPE "long unsigned int"
-+#define UINT_FAST64_TYPE "long unsigned int"
-+#else
- #define UINT_FAST16_TYPE "unsigned int"
- #define UINT_FAST32_TYPE "unsigned int"
- #define UINT_FAST64_TYPE "long long unsigned int"
-+#endif
+-#define UINT_FAST16_TYPE "unsigned int"
+-#define UINT_FAST32_TYPE "unsigned int"
+-#define UINT_FAST64_TYPE "long long unsigned int"
++#define UINT_FAST16_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
++#define UINT_FAST32_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
++#define UINT_FAST64_TYPE (TARGET_64BIT ? "long unsigned int" : "long long unsigned int")
/* Integer types capable of holding object pointers */
-+#ifdef __x86_64__
-+#define INTPTR_TYPE "long int"
-+#define UINTPTR_TYPE "long unsigned int"
-+#else
- #define INTPTR_TYPE "int"
- #define UINTPTR_TYPE "unsigned int"
--
-+#endif
+-#define INTPTR_TYPE "int"
+-#define UINTPTR_TYPE "unsigned int"
++#define INTPTR_TYPE (TARGET_64BIT ? "long int" : "int")
++#define UINTPTR_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
+
--- gcc/config/i386/cygwin.h (revision 196430)
+++ gcc/config/i386/cygwin.h (working copy)
@@ -18,11 +18,20 @@