diff options
author | Lorry Tar Creator <lorry-tar-importer@baserock.org> | 2015-04-22 10:21:45 +0000 |
---|---|---|
committer | <> | 2015-04-25 21:44:09 +0000 |
commit | f80b5ea1605c9f9408c5aa386ba71c16d918ebbf (patch) | |
tree | bb7eafaa81fc4b8c5c215bc08d517fd158db234a /libcilkrts | |
parent | c27a97d04853380f1e80525391b3f0d156ed4c84 (diff) | |
download | gcc-tarball-f80b5ea1605c9f9408c5aa386ba71c16d918ebbf.tar.gz |
Imported from /home/lorry/working-area/delta_gcc-tarball/gcc-5.1.0.tar.bz2.gcc-5.1.0
Diffstat (limited to 'libcilkrts')
-rw-r--r-- | libcilkrts/ChangeLog | 39 | ||||
-rw-r--r-- | libcilkrts/Makefile.am | 7 | ||||
-rw-r--r-- | libcilkrts/Makefile.in | 11 | ||||
-rw-r--r-- | libcilkrts/configure | 200 | ||||
-rw-r--r-- | libcilkrts/configure.ac | 60 | ||||
-rw-r--r-- | libcilkrts/configure.tgt | 17 | ||||
-rw-r--r-- | libcilkrts/runtime/os-unix.c | 7 |
7 files changed, 203 insertions, 138 deletions
diff --git a/libcilkrts/ChangeLog b/libcilkrts/ChangeLog index 2b7bc43679..ec825309dc 100644 --- a/libcilkrts/ChangeLog +++ b/libcilkrts/ChangeLog @@ -1,14 +1,41 @@ -2014-10-30 Release Manager +2015-04-22 Release Manager - * GCC 4.9.2 released. + * GCC 5.1.0 released. -2014-07-16 Release Manager +2015-01-26 Matthias Klose <doko@ubuntu.com> - * GCC 4.9.1 released. + * configure.ac: Move AM_ENABLE_MULTILIB before AC_PROG_CC. + * configure: Regenerate. + +2014-11-21 H.J. Lu <hongjiu.lu@intel.com> + + PR bootstrap/63784 + * configure: Regenerated. + +2014-11-13 Kirill Yukhin <kirill.yukhin@intel.com> + + * configure.tgt: Use config/target-posix. + +2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> + + PR target/63610 + * configure: Regenerate. + +2014-08-01 Alexander Ivchenko <alexander.ivchenko@intel.com> + + * configure.ac: Move pthread affinity test to the place where + '-pthread' passed to CFLAGS. Otherwise the test always fails. + (XCFLAGS): New variable for correctly passing + '-pthread'. + (XLDFLAGS): New variable for passing the correct pthread lib. + * configure: Regenerate. + * Makefile.am (AM_CFLAGS): Add $XCFLAGS. + (AM_LDFLAGS): Add $XLDFLAGS. + * Makefile.in: Regenerate. -2014-04-22 Release Manager +2014-05-21 John Marino <gnugcc@marino.st> - * GCC 4.9.0 released. + * runtime/os-unix.c (__DragonFly__): New target. 2014-04-11 Barry Tannenbaum <barry.m.tannenbaum@intel.com> diff --git a/libcilkrts/Makefile.am b/libcilkrts/Makefile.am index 84551c8422..70538a21a5 100644 --- a/libcilkrts/Makefile.am +++ b/libcilkrts/Makefile.am @@ -43,9 +43,9 @@ GENERAL_FLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/runtime -I$(top_srcdir)/ # Enable Intel Cilk Plus extension GENERAL_FLAGS += -fcilkplus -AM_CFLAGS = $(GENERAL_FLAGS) -std=c99 +AM_CFLAGS = $(XCFLAGS) $(GENERAL_FLAGS) -std=c99 AM_CPPFLAGS = $(GENERAL_FLAGS) -AM_LDFLAGS = -lpthread +AM_LDFLAGS = $(XLDFLAGS) # May be used by toolexeclibdir. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) @@ -92,7 +92,8 @@ include include/internal/rev.mk #libcilkrts_la_LDFLAGS = -rpath '$(libdir)' libcilkrts_la_LDFLAGS = -version-info 5:0:0 -libcilkrts_la_LDFLAGS += -lpthread @lt_cv_dlopen_libs@ +libcilkrts_la_LDFLAGS += @lt_cv_dlopen_libs@ +libcilkrts_la_LDFLAGS += $(AM_LDFLAGS) # If we're building on Linux, use the Linux version script if LINUX_LINKER_SCRIPT diff --git a/libcilkrts/Makefile.in b/libcilkrts/Makefile.in index 1ee4d8270e..e1a54b5767 100644 --- a/libcilkrts/Makefile.in +++ b/libcilkrts/Makefile.in @@ -270,6 +270,8 @@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ +XCFLAGS = @XCFLAGS@ +XLDFLAGS = @XLDFLAGS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ @@ -344,9 +346,9 @@ ACLOCAL_AMFLAGS = -I .. -I ../config GENERAL_FLAGS = -I$(top_srcdir)/include -I$(top_srcdir)/runtime \ -I$(top_srcdir)/runtime/config/$(config_dir) \ -DIN_CILK_RUNTIME=1 -fcilkplus -AM_CFLAGS = $(GENERAL_FLAGS) -std=c99 +AM_CFLAGS = $(XCFLAGS) $(GENERAL_FLAGS) -std=c99 AM_CPPFLAGS = $(GENERAL_FLAGS) -AM_LDFLAGS = -lpthread +AM_LDFLAGS = $(XLDFLAGS) # May be used by toolexeclibdir. gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER) @@ -393,9 +395,8 @@ CILK_REVISION = 3902 #libcilkrts_la_LDFLAGS = -rpath '$(libdir)' # Hack for Cygwin -libcilkrts_la_LDFLAGS = -version-info 5:0:0 -lpthread \ - @lt_cv_dlopen_libs@ $(am__append_1) $(am__append_2) \ - -no-undefined +libcilkrts_la_LDFLAGS = -version-info 5:0:0 @lt_cv_dlopen_libs@ \ + $(AM_LDFLAGS) $(am__append_1) $(am__append_2) -no-undefined # C/C++ header files for Cilk. # cilkincludedir = $(includedir)/cilk diff --git a/libcilkrts/configure b/libcilkrts/configure index 0dadbbda03..b064630629 100644 --- a/libcilkrts/configure +++ b/libcilkrts/configure @@ -605,6 +605,8 @@ am__EXEEXT_TRUE LTLIBOBJS LIBOBJS link_cilkrts +XLDFLAGS +XCFLAGS lt_cv_dlopen_libs toolexeclibdir toolexecdir @@ -634,7 +636,6 @@ EGREP GREP CPP ALLOCA -multi_basedir am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE @@ -657,6 +658,7 @@ CPPFLAGS LDFLAGS CFLAGS CC +multi_basedir MAINT MAINTAINER_MODE_FALSE MAINTAINER_MODE_TRUE @@ -737,8 +739,8 @@ ac_subst_files='' ac_user_opts=' enable_option_checking enable_maintainer_mode -enable_dependency_tracking enable_multilib +enable_dependency_tracking enable_version_specific_runtime_libs enable_shared enable_static @@ -1383,9 +1385,9 @@ Optional Features: --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer + --enable-multilib build many library versions (default) --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors - --enable-multilib build many library versions (default) --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compi ler-specific directory @@ -2873,6 +2875,44 @@ fi +# Default to --enable-multilib +# Check whether --enable-multilib was given. +if test "${enable_multilib+set}" = set; then : + enableval=$enable_multilib; case "$enableval" in + yes) multilib=yes ;; + no) multilib=no ;; + *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;; + esac +else + multilib=yes +fi + + +# We may get other options which we leave undocumented: +# --with-target-subdir, --with-multisrctop, --with-multisubdir +# See config-ml.in if you want the gory details. + +if test "$srcdir" = "."; then + if test "$with_target_subdir" != "."; then + multi_basedir="$srcdir/$with_multisrctop../.." + else + multi_basedir="$srcdir/$with_multisrctop.." + fi +else + multi_basedir="$srcdir/.." +fi + + +# Even if the default multilib is not a cross compilation, +# it may be that some of the other multilibs are. +if test $cross_compiling = no && test $multilib = yes \ + && test "x${with_multisubdir}" != x ; then + cross_compiling=maybe +fi + +ac_config_commands="$ac_config_commands default-1" + + # Build a DLL on Windows # AC_LIBTOOL_WIN32_DLL ac_ext=c @@ -4217,43 +4257,6 @@ fi # AC_CONFIG_MACRO_DIR([..]) ac_config_files="$ac_config_files Makefile libcilkrts.spec" -# Default to --enable-multilib -# Check whether --enable-multilib was given. -if test "${enable_multilib+set}" = set; then : - enableval=$enable_multilib; case "$enableval" in - yes) multilib=yes ;; - no) multilib=no ;; - *) as_fn_error "bad value $enableval for multilib option" "$LINENO" 5 ;; - esac -else - multilib=yes -fi - - -# We may get other options which we leave undocumented: -# --with-target-subdir, --with-multisrctop, --with-multisubdir -# See config-ml.in if you want the gory details. - -if test "$srcdir" = "."; then - if test "$with_target_subdir" != "."; then - multi_basedir="$srcdir/$with_multisrctop../.." - else - multi_basedir="$srcdir/$with_multisrctop.." - fi -else - multi_basedir="$srcdir/.." -fi - - -# Even if the default multilib is not a cross compilation, -# it may be that some of the other multilibs are. -if test $cross_compiling = no && test $multilib = yes \ - && test "x${with_multisubdir}" != x ; then - cross_compiling=maybe -fi - -ac_config_commands="$ac_config_commands default-1" - ac_ext=c ac_cpp='$CPP $CPPFLAGS' @@ -7544,7 +7547,7 @@ $as_echo "$lt_cv_ld_force_load" >&6; } case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; - 10.[012]*) + 10.[012][,.]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; @@ -8847,7 +8850,7 @@ _LT_EOF if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then - tmp_addflag= + tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler @@ -11057,7 +11060,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11060 "configure" +#line 11063 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11163,7 +11166,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11166 "configure" +#line 11169 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11758,8 +11761,8 @@ with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then - archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' - archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' + archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' + archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' @@ -14421,40 +14424,11 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -# Check for pthread_{,attr_}[sg]etaffinity_np. -cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _GNU_SOURCE - #include <pthread.h> -int -main () -{ -cpu_set_t cpuset; - pthread_attr_t attr; - pthread_getaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset); - if (CPU_ISSET (0, &cpuset)) - CPU_SET (1, &cpuset); - else - CPU_ZERO (&cpuset); - pthread_setaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset); - pthread_attr_init (&attr); - pthread_attr_getaffinity_np (&attr, sizeof (cpu_set_t), &cpuset); - pthread_attr_setaffinity_np (&attr, sizeof (cpu_set_t), &cpuset); - ; - return 0; -} -_ACEOF -if ac_fn_c_try_link "$LINENO"; then : - -$as_echo "#define HAVE_PTHREAD_AFFINITY_NP 1" >>confdefs.h - -fi -rm -f core conftest.err conftest.$ac_objext \ - conftest$ac_exeext conftest.$ac_ext - # Check to see if -pthread or -lpthread is needed. Prefer the former. # Note that the CILK_SELF_SPEC in gcc.c may force -pthread. # In case the pthread.h system header is not found, this test will fail. +XCFLAGS="" +XLDFLAGS="" CFLAGS="$CFLAGS -pthread" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -14469,7 +14443,7 @@ pthread_t t; pthread_create(&t,NULL,g,NULL); } _ACEOF if ac_fn_c_try_link "$LINENO"; then : - + XCFLAGS=" -Wc,-pthread" else CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext @@ -14495,6 +14469,56 @@ fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext +# Check for pthread_{,attr_}[sg]etaffinity_np. +cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#define _GNU_SOURCE + #include <pthread.h> +int +main () +{ +cpu_set_t cpuset; + pthread_attr_t attr; + pthread_getaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset); + if (CPU_ISSET (0, &cpuset)) + CPU_SET (1, &cpuset); + else + CPU_ZERO (&cpuset); + pthread_setaffinity_np (pthread_self (), sizeof (cpu_set_t), &cpuset); + pthread_attr_init (&attr); + pthread_attr_getaffinity_np (&attr, sizeof (cpu_set_t), &cpuset); + pthread_attr_setaffinity_np (&attr, sizeof (cpu_set_t), &cpuset); + ; + return 0; +} +_ACEOF +if ac_fn_c_try_link "$LINENO"; then : + +$as_echo "#define HAVE_PTHREAD_AFFINITY_NP 1" >>confdefs.h + +fi +rm -f core conftest.err conftest.$ac_objext \ + conftest$ac_exeext conftest.$ac_ext + +# Every c++ lib is linking by default with -nostdlib, which leads to the +# fact, that proper pthread library will not be given at link time. We have +# to hard-code that. +case "${target}" in + + *android*) + XLDFLAGS="$XLDFLAGS -lc" + ;; + *) + XLDFLAGS="$XLDFLAGS -lpthread" + ;; + +esac + + + + +CFLAGS="$save_CFLAGS" + if test $enable_shared = yes; then link_cilkrts="-lcilkrts %{static: $LIBS}" else @@ -15232,7 +15256,6 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # -AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" srcdir="$srcdir" host="$host" @@ -15247,6 +15270,7 @@ CC="$CC" CXX="$CXX" GFORTRAN="$GFORTRAN" GCJ="$GCJ" +AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout @@ -15616,10 +15640,10 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 for ac_config_target in $ac_config_targets do case $ac_config_target in + "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "libcilkrts.spec") CONFIG_FILES="$CONFIG_FILES libcilkrts.spec" ;; - "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; @@ -16039,6 +16063,14 @@ $as_echo "$as_me: executing $ac_file commands" >&6;} case $ac_file$ac_mode in + "default-1":C) +# Only add multilib support code if we just rebuilt the top-level +# Makefile. +case " $CONFIG_FILES " in + *" Makefile "*) + ac_file=Makefile . ${multi_basedir}/config-ml.in + ;; +esac ;; "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval @@ -16134,14 +16166,6 @@ $as_echo X"$file" | done } ;; - "default-1":C) -# Only add multilib support code if we just rebuilt the top-level -# Makefile. -case " $CONFIG_FILES " in - *" Makefile "*) - ac_file=Makefile . ${multi_basedir}/config-ml.in - ;; -esac ;; "libtool":C) # See if we are running on zsh, and set the options which allow our diff --git a/libcilkrts/configure.ac b/libcilkrts/configure.ac index fb215052dd..8ad647ea8e 100644 --- a/libcilkrts/configure.ac +++ b/libcilkrts/configure.ac @@ -43,6 +43,8 @@ AM_INIT_AUTOMAKE(foreign no-dist) AM_MAINTAINER_MODE +AM_ENABLE_MULTILIB(, ..) + # Build a DLL on Windows # AC_LIBTOOL_WIN32_DLL AC_PROG_CC @@ -50,7 +52,6 @@ AC_PROG_CXX # AC_PROG_LIBTOOL # AC_CONFIG_MACRO_DIR([..]) AC_CONFIG_FILES([Makefile libcilkrts.spec]) -AM_ENABLE_MULTILIB(, ..) AC_FUNC_ALLOCA # Check whether the target supports protected visibility. @@ -164,6 +165,27 @@ AC_SUBST(toolexeclibdir) AC_SUBST(lt_cv_dlopen_libs) +# Check to see if -pthread or -lpthread is needed. Prefer the former. +# Note that the CILK_SELF_SPEC in gcc.c may force -pthread. +# In case the pthread.h system header is not found, this test will fail. +XCFLAGS="" +XLDFLAGS="" +CFLAGS="$CFLAGS -pthread" +AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [#include <pthread.h> + void *g(void *d) { return NULL; }], + [pthread_t t; pthread_create(&t,NULL,g,NULL);])], + [XCFLAGS=" -Wc,-pthread"], + [CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS" + AC_LINK_IFELSE( + [AC_LANG_PROGRAM( + [#include <pthread.h> + void *g(void *d) { return NULL; }], + [pthread_t t; pthread_create(&t,NULL,g,NULL);])], + [], + [AC_MSG_ERROR([Pthreads are required to build libcilkrts])])]) + # Check for pthread_{,attr_}[sg]etaffinity_np. AC_LINK_IFELSE( [AC_LANG_PROGRAM( @@ -183,24 +205,24 @@ AC_LINK_IFELSE( AC_DEFINE(HAVE_PTHREAD_AFFINITY_NP, 1, [ Define if pthread_{,attr_}{g,s}etaffinity_np is supported.])) -# Check to see if -pthread or -lpthread is needed. Prefer the former. -# Note that the CILK_SELF_SPEC in gcc.c may force -pthread. -# In case the pthread.h system header is not found, this test will fail. -CFLAGS="$CFLAGS -pthread" -AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [#include <pthread.h> - void *g(void *d) { return NULL; }], - [pthread_t t; pthread_create(&t,NULL,g,NULL);])], - [], - [CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS" - AC_LINK_IFELSE( - [AC_LANG_PROGRAM( - [#include <pthread.h> - void *g(void *d) { return NULL; }], - [pthread_t t; pthread_create(&t,NULL,g,NULL);])], - [], - [AC_MSG_ERROR([Pthreads are required to build libcilkrts])])]) +# Every c++ lib is linking by default with -nostdlib, which leads to the +# fact, that proper pthread library will not be given at link time. We have +# to hard-code that. +case "${target}" in + + *android*) + XLDFLAGS="$XLDFLAGS -lc" + ;; + *) + XLDFLAGS="$XLDFLAGS -lpthread" + ;; + +esac + +AC_SUBST(XCFLAGS) +AC_SUBST(XLDFLAGS) + +CFLAGS="$save_CFLAGS" if test $enable_shared = yes; then link_cilkrts="-lcilkrts %{static: $LIBS}" diff --git a/libcilkrts/configure.tgt b/libcilkrts/configure.tgt index f7663521cd..fcda70fb68 100644 --- a/libcilkrts/configure.tgt +++ b/libcilkrts/configure.tgt @@ -43,19 +43,4 @@ case "${target}" in esac # Disable libcilkrts on non POSIX hosted systems. -if test x$enable_libcilkrts = x ; then - # Enable libcilkrts by default on hosted POSIX systems. - case "${target}" in - *-*-linux* | *-*-gnu* | *-*-k*bsd*-gnu | *-*-kopensolaris*-gnu) - ;; - *-*-netbsd* | *-*-freebsd* | *-*-openbsd* | *-*-dragonfly*) - ;; - *-*-solaris2* | *-*-hpux11*) - ;; - *-*-darwin* | *-*-aix*) - ;; - *) - UNSUPPORTED=1 - ;; - esac -fi +. ${srcdir}/../config/target-posix diff --git a/libcilkrts/runtime/os-unix.c b/libcilkrts/runtime/os-unix.c index c9ddbbc596..cb582dd759 100644 --- a/libcilkrts/runtime/os-unix.c +++ b/libcilkrts/runtime/os-unix.c @@ -54,6 +54,8 @@ #elif defined __APPLE__ # include <sys/sysctl.h> // Uses sysconf(_SC_NPROCESSORS_ONLN) in verbose output +#elif defined __DragonFly__ +// No additional include files #elif defined __FreeBSD__ // No additional include files #elif defined __CYGWIN__ @@ -374,7 +376,7 @@ COMMON_SYSDEP int __cilkrts_hardware_cpu_count(void) assert((unsigned)count == count); return count; -#elif defined __FreeBSD__ || defined __CYGWIN__ +#elif defined __FreeBSD__ || defined __CYGWIN__ || defined __DragonFly__ int ncores = sysconf(_SC_NPROCESSORS_ONLN); return ncores; @@ -402,6 +404,9 @@ COMMON_SYSDEP void __cilkrts_yield(void) // 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__) // On MIC, pthread_yield() really trashes things. Arch's measurements // showed that calling _mm_delay_32() (or doing nothing) was a better |