]> git.ipfire.org Git - thirdparty/gcc.git/blame - lto-plugin/Makefile.am
Make TOPN counter dynamically allocated.
[thirdparty/gcc.git] / lto-plugin / Makefile.am
CommitLineData
ed9b4ae3 1## Process this file with automake to produce Makefile.in.
d7f09764
DN
2
3ACLOCAL_AMFLAGS = -I .. -I ../config
c164615b 4AUTOMAKE_OPTIONS = no-dependencies
d7f09764 5
3c36aa6b 6gcc_version := $(shell @get_gcc_base_ver@ $(top_srcdir)/../gcc/BASE-VER)
d7f09764 7target_noncanonical := @target_noncanonical@
85c64bbe 8libexecsubdir := $(libexecdir)/gcc/$(real_target_noncanonical)/$(gcc_version)$(accel_dir_suffix)
d7f09764 9
48215350 10AM_CPPFLAGS = -I$(top_srcdir)/../include $(DEFS)
8fc8bf80 11AM_CFLAGS = @ac_lto_plugin_warn_cflags@ $(CET_HOST_FLAGS)
5523efdf 12AM_LDFLAGS = @ac_lto_plugin_ldflags@
5b64bab9 13AM_LIBTOOLFLAGS = --tag=disable-static
4f148bbc
JJ
14override CFLAGS := $(filter-out -fsanitize=address,$(CFLAGS))
15override LDFLAGS := $(filter-out -fsanitize=address,$(LDFLAGS))
d7f09764
DN
16
17libexecsub_LTLIBRARIES = liblto_plugin.la
43f4a446 18gcc_build_dir = @gcc_build_dir@
f3d533d3 19in_gcc_libs = $(foreach lib, $(libexecsub_LTLIBRARIES), $(gcc_build_dir)/$(lib))
d7f09764 20
48215350 21liblto_plugin_la_SOURCES = lto-plugin.c
2a7a8388 22# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS.
5523efdf 23liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
2a7a8388
TS
24 $(lt_host_flags) -module -bindir $(libexecsubdir)
25# Can be simplified when libiberty becomes a normal convenience library.
26libiberty = $(with_libiberty)/libiberty.a
27libiberty_noasan = $(with_libiberty)/noasan/libiberty.a
28libiberty_pic = $(with_libiberty)/pic/libiberty.a
29Wc=-Wc,
30liblto_plugin_la_LIBADD = \
31 $(if $(wildcard $(libiberty_noasan)),$(Wc)$(libiberty_noasan), \
32 $(if $(wildcard $(libiberty_pic)),$(Wc)$(libiberty_pic),))
33liblto_plugin_la_LDFLAGS += \
34 $(if $(wildcard $(libiberty_noasan)),, \
35 $(if $(wildcard $(libiberty_pic)),,-Wc,$(libiberty)))
36liblto_plugin_la_DEPENDENCIES = \
37 $(if $(wildcard $(libiberty_noasan)),$(libiberty_noasan), \
38 $(if $(wildcard $(libiberty_pic)),$(libiberty_pic),))
39LTLDFLAGS = $(shell $(SHELL) $(top_srcdir)/../libtool-ldflags $(LDFLAGS))
ffe7f7a7
JJ
40liblto_plugin_la_LINK = $(LIBTOOL) --tag=CC $(AM_LIBTOOLFLAGS) \
41 $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
42 $(liblto_plugin_la_LDFLAGS) $(LTLDFLAGS) -o $@
553fc582 43
3917813c 44all-local: $(in_gcc_libs)
553fc582 45
f3d533d3
AO
46$(in_gcc_libs) : $(gcc_build_dir)/%: %
47 @if test "X`dlname=; . ./$*; echo dlname:$$dlname`" = "Xdlname:"; then \
48 echo WARNING: $* is static, not copying to $@ >&2 ; \
49 else \
50 $(mkinstalldirs) $(gcc_build_dir) && \
51 $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $* `pwd`/$@ ; \
52 fi