Stops trashing the stack and fixes various time/delay/duration issues that were especially noticeable on i386.
Remove unused usleep procedure, enable getting the timezone offset. Tested on i386, amd64 and sparc64. OK? --- lang/gcc/4.6/Makefile | 14 ++++++------ lang/gcc/4.6/distinfo | 12 +++++------ lang/gcc/4.6/patches/patch-gcc_ada_a-calend_adb | 14 ++++++++++++ lang/gcc/4.6/patches/patch-gcc_ada_adaint_c | 17 ++++++++++++--- lang/gcc/4.6/patches/patch-gcc_ada_adaint_h | 12 +++++++++++ lang/gcc/4.6/patches/patch-gcc_ada_g-calend_ads | 16 ++++++++++++++ .../4.6/patches/patch-gcc_ada_s-osinte-openbsd_ads | 11 ++++------ .../4.6/patches/patch-gcc_ada_s-osprim-posix_adb | 25 ++++++++++++++++++++++ lang/gcc/4.6/patches/patch-gcc_ada_sysdep_c | 13 +++++++++++ lang/gcc/4.8/Makefile | 14 ++++++------ lang/gcc/4.8/distinfo | 12 +++++------ lang/gcc/4.8/patches/patch-gcc_ada_a-calend_adb | 14 ++++++++++++ lang/gcc/4.8/patches/patch-gcc_ada_adaint_c | 17 ++++++++++++--- lang/gcc/4.8/patches/patch-gcc_ada_adaint_h | 12 +++++++++++ lang/gcc/4.8/patches/patch-gcc_ada_g-calend_ads | 16 ++++++++++++++ .../4.8/patches/patch-gcc_ada_s-osinte-openbsd_ads | 11 ++++------ .../4.8/patches/patch-gcc_ada_s-osprim-posix_adb | 25 ++++++++++++++++++++++ lang/gcc/4.8/patches/patch-gcc_ada_sysdep_c | 12 +++++++++++ 18 files changed, 221 insertions(+), 46 deletions(-) create mode 100644 lang/gcc/4.6/patches/patch-gcc_ada_a-calend_adb create mode 100644 lang/gcc/4.6/patches/patch-gcc_ada_adaint_h create mode 100644 lang/gcc/4.6/patches/patch-gcc_ada_g-calend_ads create mode 100644 lang/gcc/4.6/patches/patch-gcc_ada_s-osprim-posix_adb create mode 100644 lang/gcc/4.6/patches/patch-gcc_ada_sysdep_c create mode 100644 lang/gcc/4.8/patches/patch-gcc_ada_a-calend_adb create mode 100644 lang/gcc/4.8/patches/patch-gcc_ada_adaint_h create mode 100644 lang/gcc/4.8/patches/patch-gcc_ada_g-calend_ads create mode 100644 lang/gcc/4.8/patches/patch-gcc_ada_s-osprim-posix_adb create mode 100644 lang/gcc/4.8/patches/patch-gcc_ada_sysdep_c diff --git a/lang/gcc/4.6/Makefile b/lang/gcc/4.6/Makefile index 701e9d6..a13b952 100644 --- a/lang/gcc/4.6/Makefile +++ b/lang/gcc/4.6/Makefile @@ -7,12 +7,12 @@ V = 4.6.4 FULL_VERSION = $V FULL_PKGVERSION = $V -ADASTRAP_LIBC-i386 = 70.0 -ADASTRAP-i386 = adastrap-i386-$V-3.tar.xz -ADASTRAP_LIBC-amd64 = 70.0 -ADASTRAP-amd64 = adastrap-amd64-$V-3.tar.xz -ADASTRAP_LIBC-sparc64 = 70.0 -ADASTRAP-sparc64 = adastrap-sparc64-$V-3.tar.xz +ADASTRAP_LIBC-i386 = 73.0 +ADASTRAP-i386 = adastrap-i386-$V-4.tar.xz +ADASTRAP_LIBC-amd64 = 73.0 +ADASTRAP-amd64 = adastrap-amd64-$V-4.tar.xz +ADASTRAP_LIBC-sparc64 = 73.0 +ADASTRAP-sparc64 = adastrap-sparc64-$V-4.tar.xz PKGNAME-main = gcc-${FULL_PKGVERSION} PKGNAME-c++ = g++-${FULL_PKGVERSION} @@ -30,7 +30,7 @@ REVISION-c++ = 4 REVISION-f95 = 4 REVISION-java = 4 REVISION-objc = 3 -REVISION-ada = 6 +REVISION-ada = 7 REVISION-go = 4 SHARED_LIBS = estdc++ 14.0 \ diff --git a/lang/gcc/4.6/distinfo b/lang/gcc/4.6/distinfo index 1a41e54..eb3e6d7 100644 --- a/lang/gcc/4.6/distinfo +++ b/lang/gcc/4.6/distinfo @@ -1,10 +1,10 @@ -SHA256 (gcc/adastrap-amd64-4.6.4-3.tar.xz) = C6WLt25QtQvzPvas+IiKZKTQgce0WgW0sXunetxihcg= -SHA256 (gcc/adastrap-i386-4.6.4-3.tar.xz) = OS8X16WSASH6aujJhY3x4AWWu2oStJ3VdAxbszkX48o= -SHA256 (gcc/adastrap-sparc64-4.6.4-3.tar.xz) = +dMWKALgebV8UMEZcSAwV7swmHsBWMaQWKDliMcI6lc= +SHA256 (gcc/adastrap-amd64-4.6.4-4.tar.xz) = W7bUWobcq5yaR7NgR2+X9IeEPlDMTivafQ/Mcmz3btk= +SHA256 (gcc/adastrap-i386-4.6.4-4.tar.xz) = DpHZc7Ibkrt3uO8BA3j7VgZaTsgMIg6UWzlk9ggu8Qk= +SHA256 (gcc/adastrap-sparc64-4.6.4-4.tar.xz) = T1UMuUloajJY68QWnddbhuYGqpdxmZik1I3kY+l49oI= SHA256 (gcc/ecj-4.5.jar) = mP0Sjx03TZ5C/Z1INr3SScbVEevGwN8X+8G535bD14E= SHA256 (gcc/gcc-4.6.4.tar.bz2) = Na8Wr6C2evm46xXK+3bSvF9WhUBVJSL13CyI3UXZd+g= -SIZE (gcc/adastrap-amd64-4.6.4-3.tar.xz) = 19676880 -SIZE (gcc/adastrap-i386-4.6.4-3.tar.xz) = 17405164 -SIZE (gcc/adastrap-sparc64-4.6.4-3.tar.xz) = 13902500 +SIZE (gcc/adastrap-amd64-4.6.4-4.tar.xz) = 19677348 +SIZE (gcc/adastrap-i386-4.6.4-4.tar.xz) = 18556144 +SIZE (gcc/adastrap-sparc64-4.6.4-4.tar.xz) = 13904728 SIZE (gcc/ecj-4.5.jar) = 1470676 SIZE (gcc/gcc-4.6.4.tar.bz2) = 72006076 diff --git a/lang/gcc/4.6/patches/patch-gcc_ada_a-calend_adb b/lang/gcc/4.6/patches/patch-gcc_ada_a-calend_adb new file mode 100644 index 0000000..100a753 --- /dev/null +++ b/lang/gcc/4.6/patches/patch-gcc_ada_a-calend_adb @@ -0,0 +1,14 @@ +$OpenBSD$ +--- gcc/ada/a-calend.adb.orig Sun Jan 19 01:33:14 2014 ++++ gcc/ada/a-calend.adb Sun Jan 19 01:34:06 2014 +@@ -1448,9 +1448,7 @@ package body Ada.Calendar is + subtype long is Long_Integer; + type long_Pointer is access all long; + +- type time_t is +- range -(2 ** (Standard'Address_Size - Integer'(1))) .. +- +(2 ** (Standard'Address_Size - Integer'(1)) - 1); ++ type time_t is new Long_Long_Integer; + type time_t_Pointer is access all time_t; + + procedure localtime_tzoff diff --git a/lang/gcc/4.6/patches/patch-gcc_ada_adaint_c b/lang/gcc/4.6/patches/patch-gcc_ada_adaint_c index d4d7a58..3f42605 100644 --- a/lang/gcc/4.6/patches/patch-gcc_ada_adaint_c +++ b/lang/gcc/4.6/patches/patch-gcc_ada_adaint_c @@ -1,7 +1,18 @@ $OpenBSD: patch-gcc_ada_adaint_c,v 1.2 2013/05/03 23:13:49 tobiasu Exp $ --- gcc/ada/adaint.c.orig Mon Oct 25 17:26:02 2010 -+++ gcc/ada/adaint.c Sun Apr 14 03:41:35 2013 -@@ -2384,7 +2384,8 @@ __gnat_number_of_cpus (void) ++++ gcc/ada/adaint.c Sun Jan 19 02:45:11 2014 +@@ -1414,8 +1414,9 @@ __gnat_file_time_fd (int fd) + /* Set the file time stamp. */ + + void +-__gnat_set_file_time_name (char *name, time_t time_stamp) ++__gnat_set_file_time_name (char *name, OS_Time ts) + { ++ time_t time_stamp = (time_t) ts; + #if defined (__vxworks) + + /* Code to implement __gnat_set_file_time_name for these systems. */ +@@ -2384,7 +2385,8 @@ __gnat_number_of_cpus (void) int cores = 1; #if defined (linux) || defined (sun) || defined (AIX) \ @@ -11,7 +22,7 @@ $OpenBSD: patch-gcc_ada_adaint_c,v 1.2 2013/05/03 23:13:49 tobiasu Exp $ cores = (int) sysconf (_SC_NPROCESSORS_ONLN); #elif (defined (__mips) && defined (__sgi)) -@@ -3686,3 +3687,9 @@ void *__gnat_lwp_self (void) +@@ -3686,3 +3688,9 @@ void *__gnat_lwp_self (void) return (void *) syscall (__NR_gettid); } #endif diff --git a/lang/gcc/4.6/patches/patch-gcc_ada_adaint_h b/lang/gcc/4.6/patches/patch-gcc_ada_adaint_h new file mode 100644 index 0000000..938bdf0 --- /dev/null +++ b/lang/gcc/4.6/patches/patch-gcc_ada_adaint_h @@ -0,0 +1,12 @@ +$OpenBSD$ +--- gcc/ada/adaint.h.orig Sun Jan 19 02:40:43 2014 ++++ gcc/ada/adaint.h Sun Jan 19 02:41:02 2014 +@@ -146,7 +146,7 @@ extern OS_Time __gnat_file_time_name (c + extern OS_Time __gnat_file_time_fd (int); + /* return -1 in case of error */ + +-extern void __gnat_set_file_time_name (char *, time_t); ++extern void __gnat_set_file_time_name (char *, OS_Time); + + extern int __gnat_dup (int); + extern int __gnat_dup2 (int, int); diff --git a/lang/gcc/4.6/patches/patch-gcc_ada_g-calend_ads b/lang/gcc/4.6/patches/patch-gcc_ada_g-calend_ads new file mode 100644 index 0000000..3959cb4 --- /dev/null +++ b/lang/gcc/4.6/patches/patch-gcc_ada_g-calend_ads @@ -0,0 +1,16 @@ +$OpenBSD$ +--- gcc/ada/g-calend.ads.orig Sun Jan 19 06:14:19 2014 ++++ gcc/ada/g-calend.ads Sun Jan 19 06:17:58 2014 +@@ -129,7 +129,11 @@ private + -- This is a dummy declaration that should be the largest possible timeval + -- structure of all supported targets. + +- type timeval is array (1 .. 2) of Interfaces.C.long; ++ type timeval is ++ record ++ tv_sec : Long_Long_Integer; ++ tv_usec : Interfaces.C.long; ++ end record; + + function Julian_Day + (Year : Ada.Calendar.Year_Number; diff --git a/lang/gcc/4.6/patches/patch-gcc_ada_s-osinte-openbsd_ads b/lang/gcc/4.6/patches/patch-gcc_ada_s-osinte-openbsd_ads index af3a0c6..742752d 100644 --- a/lang/gcc/4.6/patches/patch-gcc_ada_s-osinte-openbsd_ads +++ b/lang/gcc/4.6/patches/patch-gcc_ada_s-osinte-openbsd_ads @@ -1,7 +1,7 @@ $OpenBSD: patch-gcc_ada_s-osinte-openbsd_ads,v 1.1 2013/07/18 16:54:08 tobiasu Exp $ ---- gcc/ada/s-osinte-openbsd.ads.orig Tue Jun 18 17:49:20 2013 -+++ gcc/ada/s-osinte-openbsd.ads Tue Jun 18 17:50:54 2013 -@@ -0,0 +1,650 @@ +--- gcc/ada/s-osinte-openbsd.ads.orig Sun Jan 19 01:19:07 2014 ++++ gcc/ada/s-osinte-openbsd.ads Sun Jan 19 05:53:48 2014 +@@ -0,0 +1,647 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- @@ -228,9 +228,6 @@ $OpenBSD: patch-gcc_ada_s-osinte-openbsd_ads,v 1.1 2013/07/18 16:54:08 tobiasu E + end record; + pragma Convention (C, struct_timezone); + -+ procedure usleep (useconds : unsigned_long); -+ pragma Import (C, usleep, "usleep"); -+ + ------------------------- + -- Priority Scheduling -- + ------------------------- @@ -632,7 +629,7 @@ $OpenBSD: patch-gcc_ada_s-osinte-openbsd_ads,v 1.1 2013/07/18 16:54:08 tobiasu E + type pid_t is new int; + Self_PID : constant pid_t := 0; + -+ type time_t is new long; ++ type time_t is new Long_Long_Integer; + + type timespec is record + ts_sec : time_t; diff --git a/lang/gcc/4.6/patches/patch-gcc_ada_s-osprim-posix_adb b/lang/gcc/4.6/patches/patch-gcc_ada_s-osprim-posix_adb new file mode 100644 index 0000000..04e1502 --- /dev/null +++ b/lang/gcc/4.6/patches/patch-gcc_ada_s-osprim-posix_adb @@ -0,0 +1,25 @@ +$OpenBSD$ +--- gcc/ada/s-osprim-posix.adb.orig Sun Jan 19 03:46:06 2014 ++++ gcc/ada/s-osprim-posix.adb Sun Jan 19 06:31:26 2014 +@@ -38,7 +38,7 @@ package body System.OS_Primitives is + -- these declarations in System.OS_Interface and move these ones in + -- the spec. + +- type time_t is new Long_Integer; ++ type time_t is new Long_Long_Integer; + + type timespec is record + tv_sec : time_t; +@@ -54,7 +54,11 @@ package body System.OS_Primitives is + ----------- + + function Clock return Duration is +- type timeval is array (1 .. 2) of Long_Integer; ++ type timeval is ++ record ++ tv_sec : time_t; ++ tv_usec : Long_Integer; ++ end record; + + procedure timeval_to_duration + (T : not null access timeval; diff --git a/lang/gcc/4.6/patches/patch-gcc_ada_sysdep_c b/lang/gcc/4.6/patches/patch-gcc_ada_sysdep_c new file mode 100644 index 0000000..a15eeb6 --- /dev/null +++ b/lang/gcc/4.6/patches/patch-gcc_ada_sysdep_c @@ -0,0 +1,13 @@ +$OpenBSD$ +--- gcc/ada/sysdep.c.orig Sun Jan 19 01:26:27 2014 ++++ gcc/ada/sysdep.c Sun Jan 19 01:28:13 2014 +@@ -937,7 +937,8 @@ __gnat_localtime_tzoff (const time_t *timer, long *off + struct tm */ + + #elif defined (__APPLE__) || defined (__FreeBSD__) || defined (linux) ||\ +- (defined (__alpha__) && defined (__osf__)) || defined (__GLIBC__) ++ (defined (__alpha__) && defined (__osf__)) || defined (__GLIBC__) ||\ ++ defined (__OpenBSD__) + { + localtime_r (timer, &tp); + *off = tp.tm_gmtoff; diff --git a/lang/gcc/4.8/Makefile b/lang/gcc/4.8/Makefile index 54e45ab..abb9dcf 100644 --- a/lang/gcc/4.8/Makefile +++ b/lang/gcc/4.8/Makefile @@ -7,15 +7,15 @@ V = 4.8.2 FULL_VERSION = $V FULL_PKGVERSION = $V -ADASTRAP_LIBC-i386 = 71.0 +ADASTRAP_LIBC-i386 = 73.0 ADASTRAP_LIBM-i386 = 9.0 -ADASTRAP-i386 = adastrap-i386-$V-0.tar.xz -ADASTRAP_LIBC-amd64 = 71.0 +ADASTRAP-i386 = adastrap-i386-$V-1.tar.xz +ADASTRAP_LIBC-amd64 = 73.0 ADASTRAP_LIBM-amd64 = 9.0 -ADASTRAP-amd64 = adastrap-amd64-$V-0.tar.xz -ADASTRAP_LIBC-sparc64 = 71.0 +ADASTRAP-amd64 = adastrap-amd64-$V-1.tar.xz +ADASTRAP_LIBC-sparc64 = 73.0 ADASTRAP_LIBM-sparc64 = 9.0 -ADASTRAP-sparc64 = adastrap-sparc64-$V-0.tar.xz +ADASTRAP-sparc64 = adastrap-sparc64-$V-1.tar.xz PKGNAME-main = gcc-${FULL_PKGVERSION} PKGNAME-c++ = g++-${FULL_PKGVERSION} @@ -34,7 +34,7 @@ REVISION-c++ = 2 REVISION-f95 = 2 REVISION-java = 2 REVISION-objc = 2 -REVISION-ada = 2 +REVISION-ada = 3 #REVISION-go = SHARED_LIBS = estdc++ 16.0 \ diff --git a/lang/gcc/4.8/distinfo b/lang/gcc/4.8/distinfo index d5b8dbd..dcc8a7b 100644 --- a/lang/gcc/4.8/distinfo +++ b/lang/gcc/4.8/distinfo @@ -1,10 +1,10 @@ -SHA256 (gcc/adastrap-amd64-4.8.2-0.tar.xz) = RuHws36Mtj00vwiG8eQUyW0a8MPEDG7k++R4E7kk5jQ= -SHA256 (gcc/adastrap-i386-4.8.2-0.tar.xz) = n4eXFzsFOTPVAcUS+lXgcowttz+N48KvusskDV0ivRo= -SHA256 (gcc/adastrap-sparc64-4.8.2-0.tar.xz) = BMQfTxEuLm5q0Emscm2iBdr8Hp+QUhDSIMS6E2ksed4= +SHA256 (gcc/adastrap-amd64-4.8.2-1.tar.xz) = Q6JfaPw5HpaVq6sglhuoOCLQb/sbtM9FH7xl60BR4qA= +SHA256 (gcc/adastrap-i386-4.8.2-1.tar.xz) = eTJBBkVAjtFZ8Yw9BwyigK3z7FML/4pezIa6KGAlZaQ= +SHA256 (gcc/adastrap-sparc64-4.8.2-1.tar.xz) = L4YdMjWVCxHrzvb9605kX20XuEOzsvJKftbFDrQ7gbA= SHA256 (gcc/ecj-4.5.jar) = mP0Sjx03TZ5C/Z1INr3SScbVEevGwN8X+8G535bD14E= SHA256 (gcc/gcc-4.8.2.tar.bz2) = Cdwidsc0JLu/2h293GK7v5AMnxhaz38+HXc84tfjzcg= -SIZE (gcc/adastrap-amd64-4.8.2-0.tar.xz) = 33355120 -SIZE (gcc/adastrap-i386-4.8.2-0.tar.xz) = 31194520 -SIZE (gcc/adastrap-sparc64-4.8.2-0.tar.xz) = 27195732 +SIZE (gcc/adastrap-amd64-4.8.2-1.tar.xz) = 33367392 +SIZE (gcc/adastrap-i386-4.8.2-1.tar.xz) = 32559320 +SIZE (gcc/adastrap-sparc64-4.8.2-1.tar.xz) = 27201372 SIZE (gcc/ecj-4.5.jar) = 1470676 SIZE (gcc/gcc-4.8.2.tar.bz2) = 85999682 diff --git a/lang/gcc/4.8/patches/patch-gcc_ada_a-calend_adb b/lang/gcc/4.8/patches/patch-gcc_ada_a-calend_adb new file mode 100644 index 0000000..63a4c13 --- /dev/null +++ b/lang/gcc/4.8/patches/patch-gcc_ada_a-calend_adb @@ -0,0 +1,14 @@ +$OpenBSD$ +--- gcc/ada/a-calend.adb.orig Mon Jan 20 00:59:54 2014 ++++ gcc/ada/a-calend.adb Mon Jan 20 01:00:33 2014 +@@ -684,9 +684,7 @@ package body Ada.Calendar is + type int_Pointer is access all Interfaces.C.int; + type long_Pointer is access all Interfaces.C.long; + +- type time_t is +- range -(2 ** (Standard'Address_Size - Integer'(1))) .. +- +(2 ** (Standard'Address_Size - Integer'(1)) - 1); ++ type time_t is new Long_Long_Integer; + type time_t_Pointer is access all time_t; + + procedure localtime_tzoff diff --git a/lang/gcc/4.8/patches/patch-gcc_ada_adaint_c b/lang/gcc/4.8/patches/patch-gcc_ada_adaint_c index 9561268..a4e807e 100644 --- a/lang/gcc/4.8/patches/patch-gcc_ada_adaint_c +++ b/lang/gcc/4.8/patches/patch-gcc_ada_adaint_c @@ -1,7 +1,18 @@ $OpenBSD: patch-gcc_ada_adaint_c,v 1.2 2013/04/12 10:01:47 tobiasu Exp $ --- gcc/ada/adaint.c.orig Wed Feb 6 13:01:20 2013 -+++ gcc/ada/adaint.c Wed Apr 10 01:42:27 2013 -@@ -2467,7 +2467,8 @@ __gnat_number_of_cpus (void) ++++ gcc/ada/adaint.c Mon Jan 20 01:31:47 2014 +@@ -1463,8 +1463,9 @@ __gnat_file_time_fd (int fd) + /* Set the file time stamp. */ + + void +-__gnat_set_file_time_name (char *name, time_t time_stamp) ++__gnat_set_file_time_name (char *name, OS_Time ts) + { ++ time_t time_stamp = (time_t) ts; + #if defined (__vxworks) + + /* Code to implement __gnat_set_file_time_name for these systems. */ +@@ -2467,7 +2468,8 @@ __gnat_number_of_cpus (void) { int cores = 1; @@ -11,7 +22,7 @@ $OpenBSD: patch-gcc_ada_adaint_c,v 1.2 2013/04/12 10:01:47 tobiasu Exp $ cores = (int) sysconf (_SC_NPROCESSORS_ONLN); #elif defined (__hpux__) -@@ -3855,3 +3856,9 @@ void __gnat_cpu_set (int cpu, size_t count ATTRIBUTE_U +@@ -3855,3 +3857,9 @@ void __gnat_cpu_set (int cpu, size_t count ATTRIBUTE_U #ifdef __cplusplus } #endif diff --git a/lang/gcc/4.8/patches/patch-gcc_ada_adaint_h b/lang/gcc/4.8/patches/patch-gcc_ada_adaint_h new file mode 100644 index 0000000..52df240 --- /dev/null +++ b/lang/gcc/4.8/patches/patch-gcc_ada_adaint_h @@ -0,0 +1,12 @@ +$OpenBSD$ +--- gcc/ada/adaint.h.orig Mon Jan 20 01:53:22 2014 ++++ gcc/ada/adaint.h Mon Jan 20 01:53:44 2014 +@@ -150,7 +150,7 @@ extern OS_Time __gnat_file_time_name (c + extern OS_Time __gnat_file_time_fd (int); + /* return -1 in case of error */ + +-extern void __gnat_set_file_time_name (char *, time_t); ++extern void __gnat_set_file_time_name (char *, OS_Time); + + extern int __gnat_dup (int); + extern int __gnat_dup2 (int, int); diff --git a/lang/gcc/4.8/patches/patch-gcc_ada_g-calend_ads b/lang/gcc/4.8/patches/patch-gcc_ada_g-calend_ads new file mode 100644 index 0000000..35e0e41 --- /dev/null +++ b/lang/gcc/4.8/patches/patch-gcc_ada_g-calend_ads @@ -0,0 +1,16 @@ +$OpenBSD$ +--- gcc/ada/g-calend.ads.orig Mon Jan 20 03:37:23 2014 ++++ gcc/ada/g-calend.ads Mon Jan 20 03:39:20 2014 +@@ -162,7 +162,11 @@ private + -- This is a dummy declaration that should be the largest possible timeval + -- structure of all supported targets. + +- type timeval is array (1 .. 2) of Interfaces.C.long; ++ type timeval is ++ record ++ tv_sec : Long_Long_Integer; ++ tv_usec : Interfaces.C.long; ++ end record; + + function Julian_Day + (Year : Ada.Calendar.Year_Number; diff --git a/lang/gcc/4.8/patches/patch-gcc_ada_s-osinte-openbsd_ads b/lang/gcc/4.8/patches/patch-gcc_ada_s-osinte-openbsd_ads index 9b266af..9977f3f 100644 --- a/lang/gcc/4.8/patches/patch-gcc_ada_s-osinte-openbsd_ads +++ b/lang/gcc/4.8/patches/patch-gcc_ada_s-osinte-openbsd_ads @@ -1,7 +1,7 @@ $OpenBSD: patch-gcc_ada_s-osinte-openbsd_ads,v 1.1 2013/07/18 17:04:08 tobiasu Exp $ ---- gcc/ada/s-osinte-openbsd.ads.orig Mon Jun 17 16:05:29 2013 -+++ gcc/ada/s-osinte-openbsd.ads Mon Jun 17 17:11:52 2013 -@@ -0,0 +1,643 @@ +--- gcc/ada/s-osinte-openbsd.ads.orig Mon Jan 20 00:29:13 2014 ++++ gcc/ada/s-osinte-openbsd.ads Mon Jan 20 02:52:03 2014 +@@ -0,0 +1,640 @@ +------------------------------------------------------------------------------ +-- -- +-- GNAT RUN-TIME LIBRARY (GNARL) COMPONENTS -- @@ -216,9 +216,6 @@ $OpenBSD: patch-gcc_ada_s-osinte-openbsd_ads,v 1.1 2013/07/18 17:04:08 tobiasu E + end record; + pragma Convention (C, struct_timezone); + -+ procedure usleep (useconds : unsigned_long); -+ pragma Import (C, usleep, "usleep"); -+ + ------------------------- + -- Priority Scheduling -- + ------------------------- @@ -628,7 +625,7 @@ $OpenBSD: patch-gcc_ada_s-osinte-openbsd_ads,v 1.1 2013/07/18 17:04:08 tobiasu E + type pid_t is new int; + Self_PID : constant pid_t := 0; + -+ type time_t is new long; ++ type time_t is new Long_Long_Integer; + + type timespec is record + ts_sec : time_t; diff --git a/lang/gcc/4.8/patches/patch-gcc_ada_s-osprim-posix_adb b/lang/gcc/4.8/patches/patch-gcc_ada_s-osprim-posix_adb new file mode 100644 index 0000000..e6e466e --- /dev/null +++ b/lang/gcc/4.8/patches/patch-gcc_ada_s-osprim-posix_adb @@ -0,0 +1,25 @@ +$OpenBSD$ +--- gcc/ada/s-osprim-posix.adb.orig Mon Jan 20 02:55:58 2014 ++++ gcc/ada/s-osprim-posix.adb Mon Jan 20 02:56:39 2014 +@@ -38,7 +38,7 @@ package body System.OS_Primitives is + -- these declarations in System.OS_Interface and move these ones in + -- the spec. + +- type time_t is new Long_Integer; ++ type time_t is new Long_Long_Integer; + + type timespec is record + tv_sec : time_t; +@@ -54,7 +54,11 @@ package body System.OS_Primitives is + ----------- + + function Clock return Duration is +- type timeval is array (1 .. 2) of Long_Integer; ++ type timeval is ++ record ++ tv_sec : time_t; ++ tv_usec : Long_Integer; ++ end record; + + procedure timeval_to_duration + (T : not null access timeval; diff --git a/lang/gcc/4.8/patches/patch-gcc_ada_sysdep_c b/lang/gcc/4.8/patches/patch-gcc_ada_sysdep_c new file mode 100644 index 0000000..9341914 --- /dev/null +++ b/lang/gcc/4.8/patches/patch-gcc_ada_sysdep_c @@ -0,0 +1,12 @@ +$OpenBSD$ +--- gcc/ada/sysdep.c.orig Mon Jan 20 01:02:25 2014 ++++ gcc/ada/sysdep.c Mon Jan 20 01:02:58 2014 +@@ -851,7 +851,7 @@ __gnat_localtime_tzoff (const time_t *timer, const int + struct tm */ + + #elif defined (__APPLE__) || defined (__FreeBSD__) || defined (linux) ||\ +- defined (__GLIBC__) ++ defined (__GLIBC__) || defined (__OpenBSD__) + { + localtime_r (timer, &tp); + *off = tp.tm_gmtoff;