public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: gcc-patches@gcc.gnu.org
Cc: Paolo Bonzini <bonzini@gnu.org>
Subject: [build] Use crtfastmath.c on IRIX 6
Date: Mon, 06 Jun 2011 09:32:00 -0000	[thread overview]
Message-ID: <yddwrgzpap6.fsf@manam.CeBiTec.Uni-Bielefeld.DE> (raw)

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

             reply	other threads:[~2011-06-06  9:32 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-06-06  9:32 Rainer Orth [this message]
2011-06-06  9:46 ` Paolo Bonzini

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=yddwrgzpap6.fsf@manam.CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=bonzini@gnu.org \
    --cc=gcc-patches@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).