@@ -112,8 +112,8 @@ target_triplet = @target@
DIST_COMMON = $(srcdir)/include/internal/rev.mk README ChangeLog \
$(srcdir)/Makefile.in $(srcdir)/Makefile.am \
$(top_srcdir)/configure $(am__configure_deps) \
- $(srcdir)/../mkinstalldirs $(srcdir)/../depcomp \
- $(cilkinclude_HEADERS)
+ $(srcdir)/../mkinstalldirs $(srcdir)/libcilkrts.spec.in \
+ $(srcdir)/../depcomp $(cilkinclude_HEADERS)
# If we're building on Linux, use the Linux version script
@LINUX_LINKER_SCRIPT_TRUE@am__append_1 = -Wl,--version-script,$(srcdir)/runtime/linux-symbols.ver
@@ -134,7 +134,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
configure.lineno config.status.lineno
mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs
-CONFIG_CLEAN_FILES =
+CONFIG_CLEAN_FILES = libcilkrts.spec
CONFIG_CLEAN_VPATH_FILES =
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
am__vpath_adj = case $$p in \
@@ -158,7 +158,8 @@ am__base_list = \
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
am__installdirs = "$(DESTDIR)$(toolexeclibdir)" \
- "$(DESTDIR)$(cilkincludedir)" "$(DESTDIR)$(cilkincludedir)"
+ "$(DESTDIR)$(cilkincludedir)" "$(DESTDIR)$(cilkincludedir)" \
+ "$(DESTDIR)$(toolexeclibdir)"
LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
libcilkrts_la_LIBADD =
am_libcilkrts_la_OBJECTS = cilk-abi-vla.lo os-unix-sysdep.lo bug.lo \
@@ -202,7 +203,8 @@ MULTIDIRS =
MULTISUBDIR =
MULTIDO = true
MULTICLEAN = true
-HEADERS = $(cilkinclude_HEADERS) $(nodist_cilkinclude_HEADERS)
+HEADERS = $(cilkinclude_HEADERS) $(nodist_cilkinclude_HEADERS) \
+ $(nodist_toolexeclib_HEADERS)
ETAGS = etags
CTAGS = ctags
ACLOCAL = @ACLOCAL@
@@ -306,6 +308,7 @@ infodir = @infodir@
install_sh = @install_sh@
libdir = @libdir@
libexecdir = @libexecdir@
+link_cilkrts = @link_cilkrts@
localedir = @localedir@
localstatedir = @localstatedir@
lt_cv_dlopen_libs = @lt_cv_dlopen_libs@
@@ -356,6 +359,7 @@ cilkincludedir = $(libdir)/gcc/$(target_alias)/$(gcc_version)/include/cilk
# Target list.
toolexeclib_LTLIBRARIES = libcilkrts.la
+nodist_toolexeclib_HEADERS = libcilkrts.spec
nodist_cilkinclude_HEADERS = include/cilk/cilk.h
libcilkrts_la_SOURCES = \
runtime/config/$(config_dir)/cilk-abi-vla.c \
@@ -501,6 +505,8 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
$(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
$(am__aclocal_m4_deps):
+libcilkrts.spec: $(top_builddir)/config.status $(srcdir)/libcilkrts.spec.in
+ cd $(top_builddir) && $(SHELL) ./config.status $@
install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
@$(NORMAL_INSTALL)
test -z "$(toolexeclibdir)" || $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)"
@@ -889,6 +895,26 @@ uninstall-nodist_cilkincludeHEADERS:
test -n "$$files" || exit 0; \
echo " ( cd '$(DESTDIR)$(cilkincludedir)' && rm -f" $$files ")"; \
cd "$(DESTDIR)$(cilkincludedir)" && rm -f $$files
+install-nodist_toolexeclibHEADERS: $(nodist_toolexeclib_HEADERS)
+ @$(NORMAL_INSTALL)
+ test -z "$(toolexeclibdir)" || $(MKDIR_P) "$(DESTDIR)$(toolexeclibdir)"
+ @list='$(nodist_toolexeclib_HEADERS)'; test -n "$(toolexeclibdir)" || list=; \
+ for p in $$list; do \
+ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+ echo "$$d$$p"; \
+ done | $(am__base_list) | \
+ while read files; do \
+ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(toolexeclibdir)'"; \
+ $(INSTALL_HEADER) $$files "$(DESTDIR)$(toolexeclibdir)" || exit $$?; \
+ done
+
+uninstall-nodist_toolexeclibHEADERS:
+ @$(NORMAL_UNINSTALL)
+ @list='$(nodist_toolexeclib_HEADERS)'; test -n "$(toolexeclibdir)" || list=; \
+ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
+ test -n "$$files" || exit 0; \
+ echo " ( cd '$(DESTDIR)$(toolexeclibdir)' && rm -f" $$files ")"; \
+ cd "$(DESTDIR)$(toolexeclibdir)" && rm -f $$files
ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -945,7 +971,7 @@ check-am: all-am
check: check-am
all-am: Makefile $(LTLIBRARIES) all-multi $(HEADERS)
installdirs:
- for dir in "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(cilkincludedir)" "$(DESTDIR)$(cilkincludedir)"; do \
+ for dir in "$(DESTDIR)$(toolexeclibdir)" "$(DESTDIR)$(cilkincludedir)" "$(DESTDIR)$(cilkincludedir)" "$(DESTDIR)$(toolexeclibdir)"; do \
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
done
install: install-am
@@ -1004,7 +1030,8 @@ install-dvi: install-dvi-am
install-dvi-am:
-install-exec-am: install-multi install-toolexeclibLTLIBRARIES
+install-exec-am: install-multi install-nodist_toolexeclibHEADERS \
+ install-toolexeclibLTLIBRARIES
install-html: install-html-am
@@ -1048,6 +1075,7 @@ ps-am:
uninstall-am: uninstall-cilkincludeHEADERS \
uninstall-nodist_cilkincludeHEADERS \
+ uninstall-nodist_toolexeclibHEADERS \
uninstall-toolexeclibLTLIBRARIES
.MAKE: all-multi clean-multi distclean-multi install-am install-multi \
@@ -1062,7 +1090,8 @@ uninstall-am: uninstall-cilkincludeHEADERS \
install-data-am install-dvi install-dvi-am install-exec \
install-exec-am install-html install-html-am install-info \
install-info-am install-man install-multi \
- install-nodist_cilkincludeHEADERS install-pdf install-pdf-am \
+ install-nodist_cilkincludeHEADERS \
+ install-nodist_toolexeclibHEADERS install-pdf install-pdf-am \
install-ps install-ps-am install-strip \
install-toolexeclibLTLIBRARIES installcheck installcheck-am \
installdirs maintainer-clean maintainer-clean-generic \
@@ -1071,6 +1100,7 @@ uninstall-am: uninstall-cilkincludeHEADERS \
pdf-am ps ps-am tags uninstall uninstall-am \
uninstall-cilkincludeHEADERS \
uninstall-nodist_cilkincludeHEADERS \
+ uninstall-nodist_toolexeclibHEADERS \
uninstall-toolexeclibLTLIBRARIES
@@ -604,6 +604,7 @@ ac_subst_vars='am__EXEEXT_FALSE
am__EXEEXT_TRUE
LTLIBOBJS
LIBOBJS
+link_cilkrts
lt_cv_dlopen_libs
toolexeclibdir
toolexecdir
@@ -4214,7 +4215,7 @@ fi
# AC_PROG_LIBTOOL
# AC_CONFIG_MACRO_DIR([..])
-ac_config_files="$ac_config_files Makefile"
+ac_config_files="$ac_config_files Makefile libcilkrts.spec"
# Default to --enable-multilib
# Check whether --enable-multilib was given.
@@ -11056,7 +11057,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11059 "configure"
+#line 11060 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -11162,7 +11163,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11165 "configure"
+#line 11166 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -14451,6 +14452,60 @@ 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.
+# In case the pthread.h system header is not found, this test will fail.
+XPCFLAGS=""
+CFLAGS="$CFLAGS -pthread"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+ void *g(void *d) { return NULL; }
+int
+main ()
+{
+pthread_t t; pthread_create(&t,NULL,g,NULL);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ XPCFLAGS=" -Wc,-pthread"
+else
+ CFLAGS="$save_CFLAGS" LIBS="-lpthread $LIBS"
+ cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+#include <pthread.h>
+ void *g(void *d) { return NULL; }
+int
+main ()
+{
+pthread_t t; pthread_create(&t,NULL,g,NULL);
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+
+else
+ as_fn_error "Pthreads are required to build libcilkrts" "$LINENO" 5
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+
+# Set up the set of libraries that we need to link against for libcilkrts.
+# Note that the CILK_SELF_SPEC in gcc.c may force -pthread,
+# which will force linkage against -lpthread (or equivalent for the system).
+# That's not 100% ideal, but about the best we can do easily.
+if test $enable_shared = yes; then
+ link_cilkrts="-lcilkrts %{static: $LIBS}"
+else
+ link_cilkrts="-lcilkrts $LIBS"
+fi
+
+
# Must be last
cat >confcache <<\_ACEOF
@@ -15567,6 +15622,7 @@ do
case $ac_config_target in
"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" ;;