public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [build] Use crtfastmath.c on IRIX 6
@ 2011-06-06  9:32 Rainer Orth
  2011-06-06  9:46 ` Paolo Bonzini
  0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2011-06-06  9:32 UTC (permalink / raw)
  To: gcc-patches; +Cc: Paolo Bonzini

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2011-06-06  9:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-06-06  9:32 [build] Use crtfastmath.c on IRIX 6 Rainer Orth
2011-06-06  9:46 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).