This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
second part of patches for #64271 (bootstrap on NetBSD)
- From: "Kai-Uwe Eckhardt" <kuehro at gmx dot de>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 11 Dec 2014 19:35:21 +0100
- Subject: second part of patches for #64271 (bootstrap on NetBSD)
- Authentication-results: sourceware.org; auth=none
- Sensitivity: Normal
here are the non-libstdc++ patches:
--- libgfortran/configure.orig 2014-12-10 22:34:06.000000000 +0100
+++ libgfortran/configure 2014-12-10 22:33:57.000000000 +0100
@@ -26447,7 +26447,7 @@
fi
case "$host" in
- *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* )
+ *-*-darwin* | *-*-hpux* | *-*-cygwin* | *-*-mingw* | *-*-netbsd* )
$as_echo "#define GTHREAD_USE_WEAK 0" >>confdefs.h
--- libcilkrts/configure.orig 2014-12-10 22:28:55.000000000 +0100
+++ libcilkrts/configure 2014-12-10 22:28:38.000000000 +0100
@@ -14519,7 +14519,7 @@
CFLAGS="$save_CFLAGS"
if test $enable_shared = yes; then
- link_cilkrts="-lcilkrts %{static: $LIBS}"
+ link_cilkrts="-rpath ${prefix}/lib --as-needed -lgcc_s -lcilkrts %{static $LIBS}"
else
link_cilkrts="-lcilkrts $LIBS"
fi
--- libcilkrts/runtime/os-unix.c.orig 2014-12-10 22:29:28.000000000 +0100
+++ libcilkrts/runtime/os-unix.c 2014-12-10 22:29:40.000000000 +0100
@@ -56,7 +56,9 @@
// Uses sysconf(_SC_NPROCESSORS_ONLN) in verbose output
#elif defined __DragonFly__
// No additional include files
-#elif defined __FreeBSD__
+#elif defined __FreeBSD__
+// No additional include files
+#elif defined __NetBSD__
// No additional include files
#elif defined __CYGWIN__
// Cygwin on Windows - no additional include files
@@ -376,7 +378,7 @@
assert((unsigned)count == count);
return count;
-#elif defined __FreeBSD__ || defined __CYGWIN__ || defined __DragonFly__
+#elif defined __FreeBSD__ || defined __CYGWIN__ || defined __DragonFly__ || defined __NetBSD__
int ncores = sysconf(_SC_NPROCESSORS_ONLN);
return ncores;
@@ -400,7 +402,7 @@
COMMON_SYSDEP void __cilkrts_yield(void)
{
-#if __APPLE__ || __FreeBSD__ || __VXWORKS__
+#if __APPLE__ || __FreeBSD__ || __NetBSD__ || __VXWORKS__
// On MacOS, call sched_yield to yield quantum. I'm not sure why we
// don't do this on Linux also.
sched_yield();