diff options
Diffstat (limited to 'libgomp')
-rw-r--r-- | libgomp/ChangeLog | 12 | ||||
-rw-r--r-- | libgomp/config.h.in | 9 | ||||
-rwxr-xr-x | libgomp/configure | 77 | ||||
-rw-r--r-- | libgomp/configure.ac | 27 |
4 files changed, 125 insertions, 0 deletions
diff --git a/libgomp/ChangeLog b/libgomp/ChangeLog index 53a9e68..df1d820 100644 --- a/libgomp/ChangeLog +++ b/libgomp/ChangeLog @@ -1,3 +1,15 @@ +2014-11-13 Bernd Schmidt <bernds@codesourcery.com> + Thomas Schwinge <thomas@codesourcery.com> + Ilya Verbin <ilya.verbin@intel.com> + Andrey Turetskiy <andrey.turetskiy@intel.com> + + * 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. + 2014-11-11 Francois-Xavier Coudert <fxcoudert@gcc.gnu.org> PR target/63610 diff --git a/libgomp/config.h.in b/libgomp/config.h.in index 14c7e2a..94a2b3b 100644 --- a/libgomp/config.h.in +++ b/libgomp/config.h.in @@ -30,6 +30,9 @@ /* Define to 1 if you have the <inttypes.h> header file. */ #undef HAVE_INTTYPES_H +/* Define to 1 if you have the `dl' library (-ldl). */ +#undef HAVE_LIBDL + /* Define to 1 if you have the <memory.h> header file. */ #undef HAVE_MEMORY_H @@ -86,6 +89,9 @@ */ #undef LT_OBJDIR +/* Define to hold the list of target names suitable for offloading. */ +#undef OFFLOAD_TARGETS + /* Name of package */ #undef PACKAGE @@ -107,6 +113,9 @@ /* Define to the version of this package. */ #undef PACKAGE_VERSION +/* Define if all infrastructure, needed for plugins, is supported. */ +#undef PLUGIN_SUPPORT + /* The size of `char', as computed by sizeof. */ #undef SIZEOF_CHAR diff --git a/libgomp/configure b/libgomp/configure index 0f553aa..7cd20b1 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). diff --git a/libgomp/configure.ac b/libgomp/configure.ac index 84d250f..3f34ff8e 100644 --- a/libgomp/configure.ac +++ b/libgomp/configure.ac @@ -193,6 +193,13 @@ AC_LINK_IFELSE( [], [AC_MSG_ERROR([Pthreads are required to build libgomp])])]) +plugin_support=yes +AC_CHECK_LIB(dl, dlsym, , [plugin_support=no]) +if test x"$plugin_support" = xyes; then + AC_DEFINE(PLUGIN_SUPPORT, 1, + [Define if all infrastructure, needed for plugins, is supported.]) +fi + # Check for functions needed. AC_CHECK_FUNCS(getloadavg clock_gettime strtoull) @@ -273,6 +280,26 @@ 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" ;; + *) + AC_MSG_ERROR([unknown offload target specified]) ;; + esac + if test x"$offload_targets" = x; then + offload_targets=$tgt_name + else + offload_targets=$offload_targets,$tgt_name + fi + done +fi +AC_DEFINE_UNQUOTED(OFFLOAD_TARGETS, "$offload_targets", + [Define to hold the list of target names suitable for offloading.]) + # 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). |