2015-05-13 13:30:22 +02:00
|
|
|
## Process this file with automake to produce Makefile.in.
|
2009-10-03 23:10:11 +02:00
|
|
|
|
|
|
|
ACLOCAL_AMFLAGS = -I .. -I ../config
|
2010-01-11 13:38:09 +01:00
|
|
|
AUTOMAKE_OPTIONS = no-dependencies
|
2009-10-03 23:10:11 +02:00
|
|
|
|
|
|
|
gcc_version := $(shell cat $(top_srcdir)/../gcc/BASE-VER)
|
|
|
|
target_noncanonical := @target_noncanonical@
|
[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
|
|
|
libexecsubdir := $(libexecdir)/gcc/$(real_target_noncanonical)/$(gcc_version)$(accel_dir_suffix)
|
2009-10-03 23:10:11 +02:00
|
|
|
|
2010-11-03 10:14:32 +01:00
|
|
|
AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS)
|
2011-08-10 10:48:37 +02:00
|
|
|
AM_CFLAGS = @ac_lto_plugin_warn_cflags@
|
2014-03-17 14:04:12 +01:00
|
|
|
AM_LDFLAGS = @ac_lto_plugin_ldflags@
|
2010-12-20 18:03:10 +01:00
|
|
|
AM_LIBTOOLFLAGS = --tag=disable-static
|
2014-04-17 14:25:25 +02:00
|
|
|
override CFLAGS := $(filter-out -fsanitize=address,$(CFLAGS))
|
|
|
|
override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
|
2009-10-03 23:10:11 +02:00
|
|
|
|
|
|
|
libexecsub_LTLIBRARIES = liblto_plugin.la
|
2014-08-26 16:47:15 +02:00
|
|
|
gcc_build_dir = @gcc_build_dir@
|
2011-02-12 13:02:24 +01:00
|
|
|
in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
|
2009-10-03 23:10:11 +02:00
|
|
|
|
2010-11-03 10:14:32 +01:00
|
|
|
liblto_plugin_la_SOURCES = lto-plugin.c
|
2014-06-13 16:30:46 +02:00
|
|
|
# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS.
|
2014-03-17 14:04:12 +01:00
|
|
|
liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
|
2014-06-13 16:30:46 +02:00
|
|
|
$(lt_host_flags) -module -bindir $(libexecsubdir)
|
|
|
|
# Can be simplified when libiberty becomes a normal convenience library.
|
|
|
|
libiberty = $(with_libiberty)/libiberty.a
|
|
|
|
libiberty_noasan = $(with_libiberty)/noasan/libiberty.a
|
|
|
|
libiberty_pic = $(with_libiberty)/pic/libiberty.a
|
|
|
|
Wc=-Wc,
|
|
|
|
liblto_plugin_la_LIBADD = \
|
|
|
|
$(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
|
|
|
|
$(if $(wildcard $(libiberty_pic)),$(Wc)$(libiberty_pic),))
|
|
|
|
liblto_plugin_la_LDFLAGS += \
|
|
|
|
$(if $(wildcard $(libiberty_noasan)),, \
|
|
|
|
$(if $(wildcard $(libiberty_pic)),,-Wc,$(libiberty)))
|
|
|
|
liblto_plugin_la_DEPENDENCIES = \
|
|
|
|
$(if $(wildcard $(libiberty_noasan)),$(libiberty_noasan), \
|
|
|
|
$(if $(wildcard $(libiberty_pic)),$(libiberty_pic),))
|
|
|
|
LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
|
2014-04-17 14:23:28 +02:00
|
|
|
liblto_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
|
|
|
|
$(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
|
|
|
|
$(liblto_plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
|
2010-07-22 14:50:00 +02:00
|
|
|
|
2011-02-12 16:48:15 +01:00
|
|
|
all-local: $(in_gcc_libs)
|
2010-07-22 14:50:00 +02:00
|
|
|
|
2011-02-12 13:02:24 +01:00
|
|
|
$(in_gcc_libs) : $(gcc_build_dir)/%: %
|
|
|
|
@if test "X`dlname=; . ./$*; echo dlname:$$dlname`" = "Xdlname:"; then \
|
|
|
|
echo WARNING: $* is static, not copying to $@ >&2 ; \
|
|
|
|
else \
|
|
|
|
$(mkinstalldirs) $(gcc_build_dir) && \
|
|
|
|
$(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $* `pwd`/$@ ; \
|
|
|
|
fi
|