aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/201-cilkrts.patch
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2016-07-01 12:28:16 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-07-05 17:56:14 +0000
commit5b7befa1b989315a57f4fb49b8381ce06ded96c9 (patch)
treeef08980d3525ee01131078415e2f553f7d58c156 /main/gcc/201-cilkrts.patch
parent25c19fed5767953094db3d80079717b8c83baa05 (diff)
downloadaports-5b7befa1b989315a57f4fb49b8381ce06ded96c9.tar.bz2
aports-5b7befa1b989315a57f4fb49b8381ce06ded96c9.tar.xz
main/gcc: upgrade to 6.1.0
- use --enable-default-pie - patch bind now, ssp-strong, fortify and as-needed to be defaults - remove gentoo esp patches as unneeded (deprecated by the above) - update ecj - remove upstreamed musl patches, add current musl patches - support musl's static pie - fix some bootstrapping related issues
Diffstat (limited to 'main/gcc/201-cilkrts.patch')
-rw-r--r--main/gcc/201-cilkrts.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/main/gcc/201-cilkrts.patch b/main/gcc/201-cilkrts.patch
new file mode 100644
index 0000000000..4aac10d6d9
--- /dev/null
+++ b/main/gcc/201-cilkrts.patch
@@ -0,0 +1,59 @@
+From 594e3c1ab576daddeb86015efc8b1677020b1878 Mon Sep 17 00:00:00 2001
+From: Szabolcs Nagy <nsz@port70.net>
+Date: Sat, 24 Oct 2015 20:39:30 +0000
+Subject: [PATCH 1/6] cilkrts
+
+---
+ libcilkrts/runtime/os-unix.c | 22 +++++++---------------
+ 1 file changed, 7 insertions(+), 15 deletions(-)
+
+diff --git a/libcilkrts/runtime/os-unix.c b/libcilkrts/runtime/os-unix.c
+index cb582dd..e43d7d5 100644
+--- a/libcilkrts/runtime/os-unix.c
++++ b/libcilkrts/runtime/os-unix.c
+@@ -51,6 +51,7 @@
+ #if defined __linux__
+ # include <sys/sysinfo.h>
+ # include <sys/syscall.h>
++# include <sched.h>
+ #elif defined __APPLE__
+ # include <sys/sysctl.h>
+ // Uses sysconf(_SC_NPROCESSORS_ONLN) in verbose output
+@@ -400,28 +401,19 @@ COMMON_SYSDEP void __cilkrts_sleep(void)
+
+ COMMON_SYSDEP void __cilkrts_yield(void)
+ {
+-#if __APPLE__ || __FreeBSD__ || __VXWORKS__
+- // On MacOS, call sched_yield to yield quantum. I'm not sure why we
+- // don't do this on Linux also.
+- sched_yield();
+-#elif defined(__DragonFly__)
+- // On DragonFly BSD, call sched_yield to yield quantum.
+- sched_yield();
+-#elif defined(__MIC__)
++#if defined(__MIC__)
+ // On MIC, pthread_yield() really trashes things. Arch's measurements
+ // showed that calling _mm_delay_32() (or doing nothing) was a better
+ // option. Delaying 1024 clock cycles is a reasonable compromise between
+ // giving up the processor and latency starting up when work becomes
+ // available
+ _mm_delay_32(1024);
+-#elif defined(__ANDROID__) || (defined(__sun__) && defined(__svr4__))
+- // On Android and Solaris, call sched_yield to yield quantum. I'm not
+- // sure why we don't do this on Linux also.
+- sched_yield();
+-#else
+- // On Linux, call pthread_yield (which in turn will call sched_yield)
+- // to yield quantum.
++#elif defined(__sun__) && !defined(__svr4__)
++ // On old SunOS call pthread_yield to yield a quantum.
+ pthread_yield();
++#else
++ // On other platforms call sched_yield to yield a quantum.
++ sched_yield();
+ #endif
+ }
+
+--
+2.8.1
+