summaryrefslogtreecommitdiff
path: root/libgomp/configure
diff options
context:
space:
mode:
authorBernd Schmidt <bernds@codesourcery.com>2014-11-13 13:28:56 +0000
committerKirill Yukhin <kyukhin@gcc.gnu.org>2014-11-13 13:28:56 +0000
commit85c64bbee96e9a877a0138a509c42ad6feb4d189 (patch)
tree9e4005cf276444e5ba35ec3bd2b90e585f503eab /libgomp/configure
parente8864c8522f08528685762e6e3611da1354c31c2 (diff)
[PATCH 1/7] OpenMP 4.0 offloading infrastructure: configure and make
* configure: Regenerate. * configure.ac (--enable-as-accelerator-for) (--enable-offload-targets): New configure options. gcc/ * Makefile.in (real_target_noncanonical, accel_dir_suffix) (enable_as_accelerator): New variables substituted by configure. (libsubdir, libexecsubdir, unlibsubdir): Tweak for the possibility of being configured as an offload compiler. (DRIVER_DEFINES): Pass new defines DEFAULT_REAL_TARGET_MACHINE and ACCEL_DIR_SUFFIX. (install-cpp, install-common, install_driver, install-gcc-ar): Do not install for the offload compiler. * config.in: Regenerate. * configure: Regenerate. * configure.ac (real_target_noncanonical, accel_dir_suffix) (enable_as_accelerator): Compute new variables. (ACCEL_COMPILER): Define if the compiler is built as the accel compiler. (OFFLOAD_TARGETS): List of target names suitable for offloading. (ENABLE_OFFLOADING): Define if list of offload targets is not empty. gcc/cp/ * Make-lang.in (c++.install-common): Do not install for the offload compiler. gcc/doc/ * install.texi (Options specification): Document --enable-as-accelerator-for and --enable-offload-targets. gcc/fortran/ * Make-lang.in (fortran.install-common): Do not install for the offload compiler. libgcc/ * Makefile.in (crtoffloadbegin$(objext)): New rule. (crtoffloadend$(objext)): Likewise. * configure: Regenerate. * configure.ac (accel_dir_suffix): Compute new variable. (extra_parts): Add crtoffloadbegin.o and crtoffloadend.o if enable_offload_targets is not empty. * offloadstuff.c: New file. libgomp/ * config.h.in: Regenerate. * configure: Regenerate. * configure.ac: Check for libdl, required for plugin support. (PLUGIN_SUPPORT): Define if plugins are supported. (enable_offload_targets): Support Intel MIC targets. (OFFLOAD_TARGETS): List of target names suitable for offloading. lto-plugin/ * Makefile.am (libexecsubdir): Tweak for the possibility of being configured for offload compiler. (accel_dir_suffix, real_target_noncanonical): New variables substituted by configure. * Makefile.in: Regenerate. * configure: Regenerate. * configure.ac (accel_dir_suffix, real_target_noncanonical): Compute new variables. Co-Authored-By: Andrey Turetskiy <andrey.turetskiy@intel.com> Co-Authored-By: Ilya Verbin <ilya.verbin@intel.com> Co-Authored-By: Thomas Schwinge <thomas@codesourcery.com> From-SVN: r217485
Diffstat (limited to 'libgomp/configure')
-rwxr-xr-xlibgomp/configure77
1 files changed, 77 insertions, 0 deletions
diff --git a/libgomp/configure b/libgomp/configure
index 0f553aa80a3..7cd20b1bca1 100755
--- a/libgomp/configure
+++ b/libgomp/configure
@@ -15052,6 +15052,60 @@ fi
rm -f core conftest.err conftest.$ac_objext \
conftest$ac_exeext conftest.$ac_ext
+plugin_support=yes
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlsym in -ldl" >&5
+$as_echo_n "checking for dlsym in -ldl... " >&6; }
+if test "${ac_cv_lib_dl_dlsym+set}" = set; then :
+ $as_echo_n "(cached) " >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
+LIBS="-ldl $LIBS"
+cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+/* end confdefs.h. */
+
+/* Override any GCC internal prototype to avoid an error.
+ Use char because int might match the return type of a GCC
+ builtin and then its argument prototype would still apply. */
+#ifdef __cplusplus
+extern "C"
+#endif
+char dlsym ();
+int
+main ()
+{
+return dlsym ();
+ ;
+ return 0;
+}
+_ACEOF
+if ac_fn_c_try_link "$LINENO"; then :
+ ac_cv_lib_dl_dlsym=yes
+else
+ ac_cv_lib_dl_dlsym=no
+fi
+rm -f core conftest.err conftest.$ac_objext \
+ conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlsym" >&5
+$as_echo "$ac_cv_lib_dl_dlsym" >&6; }
+if test "x$ac_cv_lib_dl_dlsym" = x""yes; then :
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBDL 1
+_ACEOF
+
+ LIBS="-ldl $LIBS"
+
+else
+ plugin_support=no
+fi
+
+if test x"$plugin_support" = xyes; then
+
+$as_echo "#define PLUGIN_SUPPORT 1" >>confdefs.h
+
+fi
+
# Check for functions needed.
for ac_func in getloadavg clock_gettime strtoull
do :
@@ -16153,6 +16207,29 @@ else
multilib_arg=
fi
+offload_targets=
+if test x"$enable_offload_targets" != x; then
+ for tgt in `echo $enable_offload_targets | sed -e 's#,# #g'`; do
+ tgt=`echo $tgt | sed 's/=.*//'`
+ case $tgt in
+ *-intelmic-* | *-intelmicemul-*)
+ tgt_name="intelmic" ;;
+ *)
+ as_fn_error "unknown offload target specified" "$LINENO" 5 ;;
+ esac
+ if test x"$offload_targets" = x; then
+ offload_targets=$tgt_name
+ else
+ offload_targets=$offload_targets,$tgt_name
+ fi
+ done
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define OFFLOAD_TARGETS "$offload_targets"
+_ACEOF
+
+
# Set up the set of libraries that we need to link against for libgomp.
# Note that the GOMP_SELF_SPEC in gcc.c may force -pthread,
# which will force linkage against -lpthread (or equivalent for the system).