This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[build] Use crtfastmath.c on IRIX 6


On top of the IRIX 6 toplevel libgcc move, I noticed that IRIX doesn't
use crtfastmath.o yet.  This patch corrects this, bootstrapped without
regressions on mips-sgi-irix6.5.

While doing this, I noticed that libgcc/config/mips/t-crtfm is identical
(modulo $(cpu_type)) to the generic libgcc/config/t-crtfm, so I've
changed the other mips targets that used it, too.

Ok for mainline?

	Rainer


2011-05-21  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	gcc:
	* config/mips/iris6.h (ENDFILE_SPEC): Use crtfastmath.o if
	-ffast-math etc.

	libgcc:
	* config.host (mips-sgi-irix6.5*): Add t-crtfm to tmake_file.
	Add crtfastmath.o to extra_parts.
	(mips64*-*-linux*, mips*-*-linux*): Use t-crtfm instead of
	mips/t-crtfm.
	* config/mips/t-crtfm: Remove.

diff --git a/gcc/config/mips/iris6.h b/gcc/config/mips/iris6.h
--- a/gcc/config/mips/iris6.h
+++ b/gcc/config/mips/iris6.h
@@ -256,7 +256,8 @@ along with GCC; see the file COPYING3.  
 
 #undef ENDFILE_SPEC
 #define ENDFILE_SPEC \
-  "crtend.o%s irix-crtn.o%s \
+  "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \
+   crtend.o%s irix-crtn.o%s \
    %{!shared: \
      %{mabi=n32:%{mips4:/usr/lib32/mips4/crtn.o%s}\
        %{!mips4:/usr/lib32/mips3/crtn.o%s}}\
diff --git a/libgcc/config.host b/libgcc/config.host
--- a/libgcc/config.host
+++ b/libgcc/config.host
@@ -438,19 +438,19 @@ microblaze*-*-*)
         tmake_file="microblaze/t-microblaze"
 	;;
 mips-sgi-irix6.5*)
-	tmake_file="mips/t-irix6 t-slibgcc mips/t-slibgcc-irix"
-	extra_parts="crtbegin.o crtend.o irix-crti.o irix-crtn.o"
+	tmake_file="mips/t-irix6 t-crtfm t-slibgcc mips/t-slibgcc-irix"
+	extra_parts="crtbegin.o crtend.o crtfastmath.o irix-crti.o irix-crtn.o"
 	;;
 mips*-*-netbsd*)			# NetBSD/mips, either endian.
 	;;
 mips64*-*-linux*)
 	extra_parts="$extra_parts crtfastmath.o"
-	tmake_file="{$tmake_file} mips/t-crtfm"
+	tmake_file="{$tmake_file} t-crtfm"
 	md_unwind_header=mips/linux-unwind.h
 	;;
 mips*-*-linux*)				# Linux MIPS, either endian.
 	extra_parts="$extra_parts crtfastmath.o"
-	tmake_file="{$tmake_file} mips/t-crtfm"
+	tmake_file="{$tmake_file} t-crtfm"
 	md_unwind_header=mips/linux-unwind.h
 	;;
 mips*-*-openbsd*)
diff --git a/libgcc/config/mips/t-crtfm b/libgcc/config/mips/t-crtfm
deleted file mode 100644
--- a/libgcc/config/mips/t-crtfm
+++ /dev/null
@@ -1,3 +0,0 @@
-crtfastmath.o: $(gcc_srcdir)/config/mips/crtfastmath.c
-	$(gcc_compile) -c $(gcc_srcdir)/config/mips/crtfastmath.c
-


-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]