]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/Makefile.in
configure: Implement --enable-host-pie
[thirdparty/gcc.git] / gcc / Makefile.in
index 001506f8abf7b9da2a5e431d15f016e1889f1043..5a78c7476d2813027ac3eedb098280ac304d3219 100644 (file)
@@ -158,6 +158,9 @@ LDFLAGS = @LDFLAGS@
 # 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.
@@ -266,18 +269,17 @@ LINKER = $(CC)
 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)
@@ -1060,18 +1062,21 @@ ALL_CPPFLAGS = $(INCLUDES) $(CPPFLAGS)
 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
 
@@ -1249,12 +1254,15 @@ C_COMMON_OBJS = c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o \
 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 \
@@ -1262,6 +1270,8 @@ ANALYZER_OBJS = \
        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 \
@@ -1353,7 +1363,6 @@ OBJS = \
        data-streamer.o \
        data-streamer-in.o \
        data-streamer-out.o \
-       dbxout.o \
        dbgcnt.o \
        dce.o \
        ddg.o \
@@ -1416,6 +1425,7 @@ OBJS = \
        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 \
@@ -1548,6 +1558,7 @@ OBJS = \
        profile-count.o \
        range.o \
        range-op.o \
+       range-op-float.o \
        read-md.o \
        read-rtl.o \
        read-rtl-function.o \
@@ -1726,7 +1737,6 @@ OBJS = \
        web.o \
        wide-int.o \
        wide-int-print.o \
-       xcoffout.o \
        $(out_object_file) \
        $(ANALYZER_OBJS) \
        $(EXTRA_OBJS) \
@@ -2660,6 +2670,7 @@ s-match: build/genmatch$(build_exeext) $(srcdir)/match.pd cfn-operators.pd
 
 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 \
@@ -2675,7 +2686,7 @@ GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.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 \
@@ -2738,6 +2749,7 @@ GTFILES = $(CPPLIB_H) $(srcdir)/input.h $(srcdir)/coretypes.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,
@@ -3165,24 +3177,27 @@ stmp-int-hdrs: $(STMP_FIXINC) $(T_GLIMITS_H) $(T_STDINT_GCC_H) $(USER_H) fixinc_
        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
@@ -3267,13 +3282,6 @@ stmp-fixinc: gsyslimits.h macro_list fixinc_list \
              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
@@ -3991,7 +3999,7 @@ install-mkheaders: stmp-int-hdrs install-itoolsdirs \
        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 ; \