2009-10-03 23:10:11 +02:00
|
|
|
AC_PREREQ(2.64)
|
|
|
|
AC_INIT([LTO plugin for ld], 0.1,,[lto-plugin])
|
2010-10-09 07:06:21 +02:00
|
|
|
AC_CANONICAL_SYSTEM
|
2009-10-03 23:10:11 +02:00
|
|
|
GCC_TOPLEV_SUBDIRS
|
2010-05-04 20:58:11 +02:00
|
|
|
AM_INIT_AUTOMAKE([foreign no-dist])
|
2009-10-26 17:05:36 +01:00
|
|
|
AM_MAINTAINER_MODE
|
2014-06-13 16:30:46 +02:00
|
|
|
AC_ARG_WITH(libiberty,
|
|
|
|
[AS_HELP_STRING([--with-libiberty=PATH],
|
|
|
|
[specify the directory where to find libiberty [../libiberty]])],
|
|
|
|
[], with_libiberty=../libiberty)
|
|
|
|
AC_SUBST(with_libiberty)
|
2009-10-03 23:10:11 +02:00
|
|
|
AC_PROG_CC
|
2009-10-27 19:17:13 +01:00
|
|
|
AC_SYS_LARGEFILE
|
2011-08-10 10:48:37 +02:00
|
|
|
ACX_PROG_CC_WARNING_OPTS([-Wall], [ac_lto_plugin_warn_cflags])
|
2014-05-15 11:52:37 +02:00
|
|
|
|
|
|
|
# Check whether -static-libgcc is supported.
|
|
|
|
saved_LDFLAGS="$LDFLAGS"
|
|
|
|
LDFLAGS="$LDFLAGS -static-libgcc"
|
|
|
|
AC_MSG_CHECKING([for -static-libgcc])
|
|
|
|
AC_LINK_IFELSE([
|
|
|
|
int main() {}], [have_static_libgcc=yes], [have_static_libgcc=no])
|
|
|
|
AC_MSG_RESULT($have_static_libgcc);
|
|
|
|
LDFLAGS="$saved_LDFLAGS"
|
2014-03-17 14:04:12 +01:00
|
|
|
# Need -Wc to get it through libtool.
|
2014-05-15 11:52:37 +02:00
|
|
|
if test "x$have_static_libgcc" = xyes; then
|
|
|
|
ac_lto_plugin_ldflags="-Wc,-static-libgcc"
|
|
|
|
fi
|
2014-03-17 14:04:12 +01:00
|
|
|
AC_SUBST(ac_lto_plugin_ldflags)
|
2014-05-15 11:52:37 +02:00
|
|
|
|
2014-08-26 16:47:15 +02:00
|
|
|
if test x"$host_subdir" = x.; then
|
|
|
|
gcc_build_dir=../gcc
|
|
|
|
else
|
|
|
|
gcc_build_dir=../../$host_subdir/gcc
|
|
|
|
fi
|
|
|
|
AC_SUBST(gcc_build_dir)
|
|
|
|
|
[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
2014-11-13 14:28:56 +01:00
|
|
|
# Used for constructing correct paths for offload compilers.
|
|
|
|
accel_dir_suffix=
|
|
|
|
real_target_noncanonical=${target_noncanonical}
|
|
|
|
if test x"$enable_as_accelerator_for" != x; then
|
|
|
|
accel_dir_suffix=/accel/${target_noncanonical}
|
|
|
|
real_target_noncanonical=${enable_as_accelerator_for}
|
|
|
|
fi
|
|
|
|
AC_SUBST(accel_dir_suffix)
|
|
|
|
AC_SUBST(real_target_noncanonical)
|
|
|
|
|
2009-10-03 23:10:11 +02:00
|
|
|
AM_PROG_LIBTOOL
|
2010-12-06 01:50:04 +01:00
|
|
|
ACX_LT_HOST_FLAGS
|
2009-10-03 23:10:11 +02:00
|
|
|
AC_SUBST(target_noncanonical)
|
2010-11-11 14:33:59 +01:00
|
|
|
AC_TYPE_INT64_T
|
2009-10-19 17:11:35 +02:00
|
|
|
AC_TYPE_UINT64_T
|
2010-12-05 09:06:25 +01:00
|
|
|
AC_HEADER_SYS_WAIT
|
2009-10-03 23:10:11 +02:00
|
|
|
AC_CONFIG_FILES(Makefile)
|
2010-11-03 10:14:32 +01:00
|
|
|
AC_CONFIG_HEADERS(config.h)
|
2009-10-03 23:10:11 +02:00
|
|
|
AC_OUTPUT
|