OSDN Git Service

Use clock_gettime in libgfortran timing intrinsics, cleanup
[pf3gnuchains/gcc-fork.git] / libgcc / Makefile.in
index 369c7fe..7e2ab93 100644 (file)
@@ -1,12 +1,12 @@
 # Makefile.in
 
-# Copyright (C) 2005, 2006 Free Software Foundation
+# Copyright (C) 2005, 2006, 2009, 2010 Free Software Foundation
 #
 # This file is part of GCC.
 #
 # GCC is free software; you can redistribute it and/or modify it under the
 # terms of the GNU Library General Public License as published by the Free
-# Software Foundation; either version 2 of the License, or (at your option)
+# Software Foundation; either version 3 of the License, or (at your option)
 # any later version.
 #
 # GCC is distributed in the hope that it will be useful, but WITHOUT ANY
@@ -15,9 +15,8 @@
 # more details.
 #
 # You should have received a copy of the GNU General Public License along
-# with GCC; see the file COPYING.  If not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301,
-# USA.
+# with GCC; see the file COPYING3.  If not see
+# <http://www.gnu.org/licenses/>.
 #
 
 libgcc_topdir = @libgcc_topdir@
@@ -42,6 +41,7 @@ enable_decimal_float = @enable_decimal_float@
 fixed_point = @fixed_point@
 
 host_noncanonical = @host_noncanonical@
+target_noncanonical = @target_noncanonical@
 
 # List of extra object files that should be compiled for this target machine.
 # The rules for compiling them should be in the t-* file for the machine.
@@ -141,6 +141,18 @@ stamp-h: $(srcdir)/config.in config.status Makefile
 config.status: $(srcdir)/configure $(srcdir)/config.host
        $(SHELL) ./config.status --recheck
 
+AUTOCONF = autoconf
+configure_deps = \
+       $(srcdir)/../config/enable.m4 \
+       $(srcdir)/../config/tls.m4 \
+       $(srcdir)/../config/acx.m4 \
+       $(srcdir)/../config/no-executables.m4 \
+       $(srcdir)/../config/override.m4 \
+       $(srcdir)/../config/dfp.m4 \
+
+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.ac $(configure_deps)
+       cd $(srcdir) && $(AUTOCONF)
+
 include $(gcc_objdir)/libgcc.mvars
 
 # Flags to pass to recursive makes.
@@ -164,6 +176,9 @@ STRIP_FOR_TARGET = $(STRIP)
 libsubdir = $(libdir)/gcc/$(host_noncanonical)/$(version)
 # Used to install the shared libgcc.
 slibdir = @slibdir@
+# Maybe used for DLLs on Windows targets.
+toolexecdir = @toolexecdir@
+toolexeclibdir = @toolexeclibdir@
 
 export AR_FOR_TARGET
 export AR_CREATE_FOR_TARGET
@@ -183,6 +198,8 @@ export STRIP_FOR_TARGET
 export RANLIB_FOR_TARGET
 export libsubdir
 export slibdir
+export toolexecdir
+export toolexeclibdir
 
 version := $(shell $(CC) -dumpversion)
 
@@ -216,7 +233,7 @@ override CFLAGS := $(filter-out -fprofile-generate -fprofile-use,$(CFLAGS))
 # will usually contain -g, so for the moment CFLAGS goes first.  We must
 # include CFLAGS - that's where multilib options live.
 INTERNAL_CFLAGS = $(CFLAGS) $(LIBGCC2_CFLAGS) $(HOST_LIBGCC2_CFLAGS) \
-                 $(INCLUDES) @set_have_cc_tls@
+                 $(INCLUDES) @set_have_cc_tls@ @set_use_emutls@
 
 MULTIDIR := $(shell $(CC) $(CFLAGS) -print-multi-directory)
 MULTIOSDIR := $(shell $(CC) $(CFLAGS) -print-multi-os-directory)
@@ -265,7 +282,9 @@ ASM_HIDDEN_OP = @asm_hidden_op@
 
 define gen-hide-list
 $(NM) -pg $< | \
-  $(AWK) 'NF == 3 && $$2 !~ /^[UN]$$/ { print "\t$(ASM_HIDDEN_OP)", $$3 }' > $@T
+  $(AWK) 'NF == 3 && $$2 !~ /^[UN]$$/ && $$3 !~ /.*_compat/ \
+         && $$3 !~ /.*@.*/ \
+        { print "\t$(ASM_HIDDEN_OP)", $$3 }' > $@T
 mv -f $@T $@
 endef
 else
@@ -372,9 +391,9 @@ ifneq ($(LIB2_SIDITI_CONV_FUNCS),)
 # functions are built with a wordsize of 4; the TImode functions are
 # built with the same labels, but a wordsize of 8.
 
-sifuncs = $(subst XX,si,$(swfloatfuncs))
-difuncs = $(subst XX,di,$(dwfloatfuncs))
-tifuncs = $(subst XX,ti,$(dwfloatfuncs))
+sifuncs := $(filter-out $(LIB2FUNCS_EXCLUDE),$(subst XX,si,$(swfloatfuncs)))
+difuncs := $(filter-out $(LIB2FUNCS_EXCLUDE),$(subst XX,di,$(dwfloatfuncs)))
+tifuncs := $(filter-out $(LIB2FUNCS_EXCLUDE),$(subst XX,ti,$(dwfloatfuncs)))
 
 iter-items := $(sifuncs) $(difuncs) $(tifuncs)
 iter-labels := $(sifuncs) $(difuncs) $(difuncs)
@@ -577,6 +596,54 @@ endif
 
 endif
 
+ifeq ($(LIBGCC_SYNC),yes)
+libgcc-sync-size-funcs := $(foreach op, add sub or and xor nand, \
+                           sync_fetch_and_$(op) \
+                           sync_$(op)_and_fetch) \
+                         sync_bool_compare_and_swap \
+                         sync_val_compare_and_swap \
+                         sync_lock_test_and_set
+
+libgcc-sync-size-funcs := $(foreach prefix, $(libgcc-sync-size-funcs), \
+                           $(foreach suffix, 1 2 4 8 16, \
+                             $(prefix)_$(suffix)))
+
+libgcc-sync-size-funcs-o = $(patsubst %,%$(objext),$(libgcc-sync-size-funcs))
+$(libgcc-sync-size-funcs-o): %$(objext): $(gcc_srcdir)/config/sync.c
+       $(gcc_compile) $(LIBGCC_SYNC_CFLAGS) \
+         -DFN=`echo "$*" | sed 's/_[^_]*$$//'` \
+         -DSIZE=`echo "$*" | sed 's/.*_//'` \
+         -c $(gcc_srcdir)/config/sync.c $(vis_hide)
+libgcc-objects += $(libgcc-sync-size-funcs-o)
+
+libgcc-sync-funcs := sync_synchronize
+
+libgcc-sync-funcs-o = $(patsubst %,%$(objext),$(libgcc-sync-funcs))
+$(libgcc-sync-funcs-o): %$(objext): $(gcc_srcdir)/config/sync.c
+       $(gcc_compile) $(LIBGCC_SYNC_CFLAGS) \
+         -DL$* \
+         -c $(gcc_srcdir)/config/sync.c $(vis_hide)
+libgcc-objects += $(libgcc-sync-funcs-o)
+
+ifeq ($(enable_shared),yes)
+libgcc-sync-size-funcs-s-o = $(patsubst %,%_s$(objext), \
+                              $(libgcc-sync-size-funcs))
+$(libgcc-sync-size-funcs-s-o): %_s$(objext): $(gcc_srcdir)/config/sync.c
+       $(gcc_s_compile) $(LIBGCC_SYNC_CFLAGS) \
+         -DFN=`echo "$*" | sed 's/_[^_]*$$//'` \
+         -DSIZE=`echo "$*" | sed 's/.*_//'` \
+         -c $(gcc_srcdir)/config/sync.c
+libgcc-s-objects += $(libgcc-sync-size-funcs-s-o)
+
+libgcc-sync-funcs-s-o = $(patsubst %,%_s$(objext),$(libgcc-sync-funcs))
+$(libgcc-sync-funcs-s-o): %_s$(objext): $(gcc_srcdir)/config/sync.c
+       $(gcc_s_compile) $(LIBGCC_SYNC_CFLAGS) \
+         -DL$* \
+         -c $(gcc_srcdir)/config/sync.c
+libgcc-s-objects += $(libgcc-sync-funcs-s-o)
+endif
+endif
+
 # Build fixed-point support.
 ifeq ($(fixed_point),yes)
 
@@ -809,6 +876,10 @@ endif
        for file in $$parts; do                                 \
          rm -f $(gcc_objdir)$(MULTISUBDIR)/$$file;             \
          $(INSTALL_DATA) $$file $(gcc_objdir)$(MULTISUBDIR)/;  \
+         case $$file in                                        \
+           *.a)                                                \
+             $(RANLIB) $(gcc_objdir)$(MULTISUBDIR)/$$file ;;   \
+         esac;                                                 \
        done
 
 # Build extra startfiles in the gcc directory, for unconverted
@@ -842,6 +913,10 @@ gcc-extra-parts:
        for file in $$parts; do                                 \
          rm -f $(gcc_objdir)$(MULTISUBDIR)/$$file;             \
          $(INSTALL_DATA) $$file $(gcc_objdir)$(MULTISUBDIR)/;  \
+         case $$file in                                        \
+           *.a)                                                \
+             $(RANLIB) $(gcc_objdir)$(MULTISUBDIR)/$$file ;;   \
+         esac;                                                 \
        done
 
 all: $(extra-parts)
@@ -897,12 +972,18 @@ install-leaf: $(install-shared) $(install-libunwind)
        for file in $$parts; do                                 \
          rm -f $(DESTDIR)$(inst_libdir)/$$file;                \
          $(INSTALL_DATA) $$file $(DESTDIR)$(inst_libdir)/;     \
+         case $$file in                                        \
+           *.a)                                                \
+             $(RANLIB) $(gcc_objdir)$(MULTISUBDIR)/$$file ;;   \
+         esac;                                                 \
        done
 
 install: install-leaf
-       @$(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
+       @: $(MAKE) ; $(MULTIDO) $(FLAGS_TO_PASS) multi-do DO=install
+
+install-strip: install
 
-.PHONY: install install-shared install-libunwind
+.PHONY: install install-shared install-libunwind install-strip
 
 # Don't export variables to the environment, in order to not confuse
 # configure.