# Should we build position-independent host code?
PICFLAG = @PICFLAG@
+# The linker flag for the above.
+LD_PICFLAG = @LD_PICFLAG@
+
# Flags to determine code coverage. When coverage is disabled, this will
# contain the optimization flags, as you normally want code coverage
# without optimization.
LINKER_FLAGS = $(CFLAGS)
endif
+enable_host_pie = @enable_host_pie@
+
# Enable Intel CET on Intel CET enabled host if needed.
CET_HOST_FLAGS = @CET_HOST_FLAGS@
COMPILER += $(CET_HOST_FLAGS)
-NO_PIE_CFLAGS = @NO_PIE_CFLAGS@
-NO_PIE_FLAG = @NO_PIE_FLAG@
-
-# We don't want to compile the compilers with -fPIE, it make PCH fail.
-COMPILER += $(NO_PIE_CFLAGS)
+# Maybe compile the compilers with -fPIE or -fPIC.
+COMPILER += $(PICFLAG)
-# Link with -no-pie since we compile the compiler with -fno-PIE.
-LINKER += $(NO_PIE_FLAG)
+# Link with -pie, or -no-pie, depending on the above.
+LINKER += $(LD_PICFLAG)
# Like LINKER, but use a mutex for serializing front end links.
ifeq (@DO_LINK_MUTEX@,true)
ALL_COMPILERFLAGS = $(ALL_CXXFLAGS)
# This is the variable to use when using $(LINKER).
-ALL_LINKERFLAGS = $(ALL_CXXFLAGS)
+ALL_LINKERFLAGS = $(ALL_CXXFLAGS) $(LD_PICFLAG)
# Build and host support libraries.
-# Use the "pic" build of libiberty if --enable-host-shared, unless we are
-# building for mingw.
+# Use the "pic" build of libiberty if --enable-host-shared or --enable-host-pie,
+# unless we are building for mingw.
LIBIBERTY_PICDIR=$(if $(findstring mingw,$(target)),,pic)
-ifeq ($(enable_host_shared),yes)
+ifneq ($(enable_host_shared)$(enable_host_pie),)
LIBIBERTY = ../libiberty/$(LIBIBERTY_PICDIR)/libiberty.a
-BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/$(LIBIBERTY_PICDIR)/libiberty.a
else
LIBIBERTY = ../libiberty/libiberty.a
+endif
+ifeq ($(enable_host_shared),yes)
+BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/$(LIBIBERTY_PICDIR)/libiberty.a
+else
BUILD_LIBIBERTY = $(build_libobjdir)/libiberty/libiberty.a
endif
ANALYZER_OBJS = \
analyzer/analysis-plan.o \
analyzer/analyzer.o \
+ analyzer/analyzer-language.o \
analyzer/analyzer-logging.o \
analyzer/analyzer-pass.o \
analyzer/analyzer-selftests.o \
analyzer/bar-chart.o \
analyzer/call-info.o \
analyzer/call-string.o \
+ analyzer/call-summary.o \
+ analyzer/checker-event.o \
analyzer/checker-path.o \
analyzer/complexity.o \
analyzer/constraint-manager.o \
analyzer/engine.o \
analyzer/feasible-graph.o \
analyzer/function-set.o \
+ analyzer/infinite-recursion.o \
+ analyzer/known-function-manager.o \
analyzer/pending-diagnostic.o \
analyzer/program-point.o \
analyzer/program-state.o \
data-streamer.o \
data-streamer-in.o \
data-streamer-out.o \
- dbxout.o \
dbgcnt.o \
dce.o \
ddg.o \
gimple-range-fold.o \
gimple-range-gori.o \
gimple-range-infer.o \
+ gimple-range-op.o \
gimple-range-trace.o \
gimple-ssa-backprop.o \
gimple-ssa-isolate-paths.o \
profile-count.o \
range.o \
range-op.o \
+ range-op-float.o \
read-md.o \
read-rtl.o \
read-rtl-function.o \
web.o \
wide-int.o \
wide-int-print.o \
- xcoffout.o \
$(out_object_file) \
$(ANALYZER_OBJS) \
$(EXTRA_OBJS) \
GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.h \
$(host_xm_file_list) \
+ $(OPTIONS_H_EXTRA) \
$(tm_file_list) $(HASHTAB_H) $(SPLAY_TREE_H) $(srcdir)/bitmap.h \
$(srcdir)/wide-int.h $(srcdir)/alias.h \
$(srcdir)/coverage.cc $(srcdir)/rtl.h \
$(srcdir)/reload.h $(srcdir)/caller-save.cc $(srcdir)/symtab.cc \
$(srcdir)/alias.cc $(srcdir)/bitmap.cc $(srcdir)/cselib.cc $(srcdir)/cgraph.cc \
$(srcdir)/ipa-prop.cc $(srcdir)/ipa-cp.cc $(srcdir)/ipa-utils.h \
- $(srcdir)/ipa-param-manipulation.h $(srcdir)/ipa-sra.cc $(srcdir)/dbxout.cc \
+ $(srcdir)/ipa-param-manipulation.h $(srcdir)/ipa-sra.cc \
$(srcdir)/ipa-modref.h $(srcdir)/ipa-modref.cc \
$(srcdir)/ipa-modref-tree.h \
$(srcdir)/signop.h \
$(srcdir)/internal-fn.h \
$(srcdir)/calls.cc \
$(srcdir)/omp-general.h \
+ $(srcdir)/analyzer/analyzer-language.cc \
@all_gtfiles@
# Compute the list of GT header files from the corresponding C sources,
set -e; for ml in `cat fixinc_list`; do \
sysroot_headers_suffix=`echo $${ml} | sed -e 's/;.*$$//'`; \
multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
- fix_dir=include-fixed$${multi_dir}; \
+ include_dir=include$${multi_dir}; \
if $(LIMITS_H_TEST) ; then \
cat $(srcdir)/limitx.h $(T_GLIMITS_H) $(srcdir)/limity.h > tmp-xlimits.h; \
else \
cat $(T_GLIMITS_H) > tmp-xlimits.h; \
fi; \
- $(mkinstalldirs) $${fix_dir}; \
- chmod a+rx $${fix_dir} || true; \
+ $(mkinstalldirs) $${include_dir}; \
+ chmod a+rx $${include_dir} || true; \
$(SHELL) $(srcdir)/../move-if-change \
tmp-xlimits.h tmp-limits.h; \
- rm -f $${fix_dir}/limits.h; \
- cp -p tmp-limits.h $${fix_dir}/limits.h; \
- chmod a+r $${fix_dir}/limits.h; \
+ rm -f $${include_dir}/limits.h; \
+ cp -p tmp-limits.h $${include_dir}/limits.h; \
+ chmod a+r $${include_dir}/limits.h; \
+ cp $(srcdir)/gsyslimits.h $${include_dir}/syslimits.h; \
done
# Install the README
- rm -f include-fixed/README
- cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README
- chmod a+r include-fixed/README
+ if [ x$(STMP_FIXINC) != x ]; then \
+ rm -f include-fixed/README; \
+ cp $(srcdir)/../fixincludes/README-fixinc include-fixed/README; \
+ chmod a+r include-fixed/README; \
+ fi;
$(STAMP) $@
.PHONY: install-gcc-tooldir
cd $(build_objdir)/fixincludes && \
$(SHELL) ./fixinc.sh "$${gcc_dir}/$${fix_dir}" \
$(BUILD_SYSTEM_HEADER_DIR) $(OTHER_FIXINCLUDES_DIRS) ); \
- rm -f $${fix_dir}/syslimits.h; \
- if [ -f $${fix_dir}/limits.h ]; then \
- mv $${fix_dir}/limits.h $${fix_dir}/syslimits.h; \
- else \
- cp $(srcdir)/gsyslimits.h $${fix_dir}/syslimits.h; \
- fi; \
- chmod a+r $${fix_dir}/syslimits.h; \
done; \
fi
$(STAMP) stmp-fixinc
set -e; for ml in `cat fixinc_list`; do \
multi_dir=`echo $${ml} | sed -e 's/^[^;]*;//'`; \
$(mkinstalldirs) $(DESTDIR)$(itoolsdatadir)/include$${multi_dir}; \
- $(INSTALL_DATA) include-fixed$${multi_dir}/limits.h $(DESTDIR)$(itoolsdatadir)/include$${multi_dir}/limits.h; \
+ $(INSTALL_DATA) include$${multi_dir}/limits.h $(DESTDIR)$(itoolsdatadir)/include$${multi_dir}/limits.h; \
done
$(INSTALL_SCRIPT) $(srcdir)/../mkinstalldirs \
$(DESTDIR)$(itoolsdir)/mkinstalldirs ; \