OSDN Git Service

Daily bump.
[pf3gnuchains/gcc-fork.git] / libgcc / Makefile.in
index 2ea6ca6..bcd9284 100644 (file)
@@ -223,8 +223,7 @@ endif
 #
 LIBGCC2_DEBUG_CFLAGS = -g
 LIBGCC2_CFLAGS = -O2 $(LIBGCC2_INCLUDES) $(GCC_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
-                $(LIBGCC2_DEBUG_CFLAGS) $(GTHREAD_FLAGS) \
-                -DIN_LIBGCC2 \
+                $(LIBGCC2_DEBUG_CFLAGS) -DIN_LIBGCC2 \
                 -fbuilding-libgcc -fno-stack-protector \
                 $(INHIBIT_LIBC_CFLAGS)
 
@@ -395,6 +394,9 @@ endif
 
 LIB2ADD += enable-execute-stack.c
 
+# While emutls.c has nothing to do with EH, it is in LIB2ADDEH*
+# instead of LIB2ADD because that's the way to be sure on some targets
+# (e.g. *-*-darwin*) only one copy of it is linked.
 LIB2ADDEH += $(srcdir)/emutls.c
 LIB2ADDEHSTATIC += $(srcdir)/emutls.c
 LIB2ADDEHSHARED += $(srcdir)/emutls.c
@@ -828,9 +830,10 @@ include $(iterator)
 
 endif
 
-# Build LIBUNWIND.
+# Build LIBUNWIND. Use -fno-exceptions so that the unwind library does
+# not generate calls to __gcc_personality_v0.
 
-c_flags := -fexceptions
+c_flags := -fno-exceptions
 
 libunwind-objects += $(addsuffix $(objext),$(basename $(notdir $(LIBUNWIND))))
 
@@ -997,15 +1000,27 @@ 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_tm.h
 
-install-unwind_h:
+# Copy unwind.h to the place where gcc will look for it at build-time
+install-unwind_h-forbuild:
        dest=$(gcc_objdir)/include/tmp$$$$-unwind.h; \
        cp unwind.h $$dest; \
        chmod a+r $$dest; \
        sh $(srcdir)/../move-if-change $$dest $(gcc_objdir)/include/unwind.h
 
-all: install-unwind_h
+# Copy unwind.h to the place where gcc will look at run-time, once installed
+#
+# This is redundant with the internal copy above when using a regular toplevel
+# "install" target, because gcc's install will copy to the destination as well.
+#
+# This is however useful for "install-no-fixincludes" case, when only the gcc
+# internal headers are copied by gcc's install.
+install-unwind_h:
+       $(mkinstalldirs) $(DESTDIR)$(libsubdir)/include
+       $(INSTALL_DATA) unwind.h $(DESTDIR)$(libsubdir)/include
+
+all: install-unwind_h-forbuild
 
 # Documentation targets (empty).
 .PHONY: info html dvi pdf install-info install-html install-pdf
@@ -1064,12 +1079,13 @@ install-leaf: $(install-shared) $(install-libunwind)
          esac;                                                 \
        done
 
-install: install-leaf
+install: install-leaf install-unwind_h
        @: $(MAKE) ; $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
 
 install-strip: install
 
 .PHONY: install install-shared install-libunwind install-strip
+.PHONY: install-unwind_h install-unwind_h-forbuild
 
 # Don't export variables to the environment, in order to not confuse
 # configure.