re PR libfortran/77868 (Fail to NULL guard check for internal unit in inquire_via_unit)
[gcc.git] / libgcc / Makefile.in
index 357e15c37614ce7a5dad44aaaeba9fc652314320..873cad04b78741b0cf8d76ad72f9c77e28bf47f7 100644 (file)
@@ -1,6 +1,6 @@
 # Makefile.in
 
-# Copyright (C) 2005-2014 Free Software Foundation, Inc.
+# Copyright (C) 2005-2016 Free Software Foundation, Inc.
 #
 # This file is part of GCC.
 #
@@ -42,8 +42,15 @@ decimal_float = @decimal_float@
 enable_vtable_verify = @enable_vtable_verify@
 enable_decimal_float = @enable_decimal_float@
 fixed_point = @fixed_point@
+with_aix_soname = @with_aix_soname@
+enable_execute_stack = @enable_execute_stack@
+unwind_header = @unwind_header@
+md_unwind_header = @md_unwind_header@
+sfp_machine_header = @sfp_machine_header@
+thread_header = @thread_header@
 
 host_noncanonical = @host_noncanonical@
+real_host_noncanonical = @real_host_noncanonical@
 target_noncanonical = @target_noncanonical@
 
 # List of extra object files that should be compiled for this target machine.
@@ -184,7 +191,7 @@ STRIP = @STRIP@
 STRIP_FOR_TARGET = $(STRIP)
 
 # Directory in which the compiler finds libraries etc.
-libsubdir = $(libdir)/gcc/$(host_noncanonical)/$(version)
+libsubdir = $(libdir)/gcc/$(real_host_noncanonical)/$(version)@accel_dir_suffix@
 # Used to install the shared libgcc.
 slibdir = @slibdir@
 # Maybe used for DLLs on Windows targets.
@@ -283,7 +290,7 @@ INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
 
 # Options to use when compiling crtbegin/end.
 CRTSTUFF_CFLAGS = -O2 $(GCC_CFLAGS) $(INCLUDES) $(MULTILIB_CFLAGS) -g0 \
-  -finhibit-size-directive -fno-inline -fno-exceptions \
+  $(NO_PIE_CFLAGS) -finhibit-size-directive -fno-inline -fno-exceptions \
   -fno-zero-initialized-in-bss -fno-toplevel-reorder -fno-tree-vectorize \
   -fbuilding-libgcc -fno-stack-protector $(FORCE_EXPLICIT_EH_REGISTRY) \
   $(INHIBIT_LIBC_CFLAGS)
@@ -343,6 +350,21 @@ SHLIBUNWIND_INSTALL =
 tmake_file = @tmake_file@
 include $(srcdir)/empty.mk $(tmake_file)
 
+# Create links to files specified in config.host.
+LIBGCC_LINKS = enable-execute-stack.c unwind.h md-unwind-support.h \
+               sfp-machine.h gthr-default.h
+
+enable-execute-stack.c: $(srcdir)/$(enable_execute_stack)
+       -$(LN_S) $< $@
+unwind.h: $(srcdir)/$(unwind_header)
+       -$(LN_S) $< $@
+md-unwind-support.h: $(srcdir)/config/$(md_unwind_header)
+       -$(LN_S) $< $@
+sfp-machine.h: $(srcdir)/config/$(sfp_machine_header)
+       -$(LN_S) $< $@
+gthr-default.h: $(srcdir)/$(thread_header)
+       -$(LN_S) $< $@
+
 # Collect target defines and headers from config.host.
 libgcc_tm_defines = @tm_defines@
 libgcc_tm_file = @tm_file@
@@ -412,8 +434,9 @@ lib2funcs = _muldi3 _negdi2 _lshrdi3 _ashldi3 _ashrdi3 _cmpdi2 _ucmpdi2        \
            _negvsi2 _negvdi2 _ctors _ffssi2 _ffsdi2 _clz _clzsi2 _clzdi2  \
            _ctzsi2 _ctzdi2 _popcount_tab _popcountsi2 _popcountdi2        \
            _paritysi2 _paritydi2 _powisf2 _powidf2 _powixf2 _powitf2      \
-           _mulsc3 _muldc3 _mulxc3 _multc3 _divsc3 _divdc3 _divxc3        \
-           _divtc3 _bswapsi2 _bswapdi2 _clrsbsi2 _clrsbdi2
+           _mulhc3 _mulsc3 _muldc3 _mulxc3 _multc3 _divhc3 _divsc3        \
+           _divdc3 _divxc3 _divtc3 _bswapsi2 _bswapdi2 _clrsbsi2          \
+           _clrsbdi2
 
 # The floating-point conversion routines that involve a single-word integer.
 # XX stands for the integer mode.
@@ -854,12 +877,20 @@ include $(iterator)
 
 # Build libgcov components.
 
-LIBGCOV_MERGE = _gcov_merge_add _gcov_merge_single _gcov_merge_delta   \
+LIBGCOV_MERGE = _gcov_merge_add _gcov_merge_single                     \
        _gcov_merge_ior _gcov_merge_time_profile _gcov_merge_icall_topn
-LIBGCOV_PROFILER = _gcov_interval_profiler _gcov_pow2_profiler         \
-       _gcov_one_value_profiler _gcov_indirect_call_profiler           \
-       _gcov_average_profiler _gcov_ior_profiler                       \
-       _gcov_indirect_call_profiler_v2 _gcov_time_profiler             \
+LIBGCOV_PROFILER = _gcov_interval_profiler                             \
+       _gcov_interval_profiler_atomic                                  \
+       _gcov_pow2_profiler                                             \
+       _gcov_pow2_profiler_atomic                                      \
+       _gcov_one_value_profiler                                        \
+       _gcov_one_value_profiler_atomic                                 \
+       _gcov_average_profiler                                          \
+       _gcov_average_profiler_atomic                                   \
+       _gcov_ior_profiler                                              \
+       _gcov_ior_profiler_atomic                                       \
+       _gcov_indirect_call_profiler_v2                                 \
+       _gcov_time_profiler                                             \
        _gcov_indirect_call_topn_profiler
 LIBGCOV_INTERFACE = _gcov_dump _gcov_flush _gcov_fork                  \
        _gcov_execl _gcov_execlp                                        \
@@ -908,18 +939,15 @@ all: libgcc.a libgcov.a
 
 ifneq ($(LIBUNWIND),)
 all: libunwind.a
-libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
 endif
 
 ifeq ($(enable_shared),yes)
 all: libgcc_eh.a libgcc_s$(SHLIB_EXT)
 ifneq ($(LIBUNWIND),)
 all: libunwind$(SHLIB_EXT)
-endif
+libgcc_s$(SHLIB_EXT): libunwind$(SHLIB_EXT)
 endif
 
-ifeq ($(enable_shared),yes)
-
 # Map-file generation.
 ifneq ($(SHLIB_MKMAP),)
 libgcc.map.in: $(SHLIB_MAPFILES)
@@ -995,21 +1023,38 @@ crtendS$(objext): $(srcdir)/crtstuff.c
 crtbeginT$(objext): $(srcdir)/crtstuff.c
        $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN -DCRTSTUFFT_O
 
+# crtoffloadbegin and crtoffloadend contain symbols, that mark the begin and
+# the end of tables with addresses, required for offloading.  crtoffloadtable
+# contains the array with addresses of those symbols.
+crtoffloadbegin$(objext): $(srcdir)/offloadstuff.c
+       $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_BEGIN
+
+crtoffloadend$(objext): $(srcdir)/offloadstuff.c
+       $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_END
+
+crtoffloadtable$(objext): $(srcdir)/offloadstuff.c
+       $(crt_compile) $(CRTSTUFF_T_CFLAGS) -c $< -DCRT_TABLE
+endif
+
 ifeq ($(enable_vtable_verify),yes)
 # These are used in vtable verification; see comments in source files for
 # more details.
+
+# Override -finhibit-size-directive to avoid mismatch between libgcc and libvtv
+# compilations.
+VTV_CFLAGS = $(CRTSTUFF_T_CFLAGS_S) -fno-inhibit-size-directive
+
 vtv_start$(objext): $(srcdir)/vtv_start.c
-       $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) -c $(srcdir)/vtv_start.c
+       $(crt_compile) $(VTV_CFLAGS) -c $(srcdir)/vtv_start.c
 
 vtv_end$(objext): $(srcdir)/vtv_end.c
-       $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) -c $(srcdir)/vtv_end.c
+       $(crt_compile) $(VTV_CFLAGS) -c $(srcdir)/vtv_end.c
 
 vtv_start_preinit$(objext): $(srcdir)/vtv_start_preinit.c
-       $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) -c $(srcdir)/vtv_start_preinit.c
+       $(crt_compile) $(VTV_CFLAGS) -c $(srcdir)/vtv_start_preinit.c
 
 vtv_end_preinit$(objext): $(srcdir)/vtv_end_preinit.c
-       $(crt_compile) $(CRTSTUFF_T_CFLAGS_S) -c $(srcdir)/vtv_end_preinit.c
-endif
+       $(crt_compile) $(VTV_CFLAGS) -c $(srcdir)/vtv_end_preinit.c
 endif
 
 ifeq ($(CUSTOM_CRTIN),)
@@ -1044,10 +1089,10 @@ all: $(extra-parts)
 $(libgcc-objects) $(libgcc-s-objects) $(libgcc-eh-objects) \
        $(libgcov-objects) \
        $(libunwind-objects) $(libunwind-s-objects) \
-       $(EXTRA_PARTS): libgcc_tm.h
+       $(EXTRA_PARTS): $(LIBGCC_LINKS) libgcc_tm.h
 
 # Copy unwind.h to the place where gcc will look for it at build-time
-install-unwind_h-forbuild:
+install-unwind_h-forbuild: unwind.h
        dest=$(gcc_objdir)/include/tmp$$$$-unwind.h; \
        cp unwind.h $$dest; \
        chmod a+r $$dest; \