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]

RE: [PATCH, mingw32]: Port FTZ/DAZ for SSE to mingw32


> >> Hello!
> >>
> >> > PR target/29498
> >> > * config.gcc: Add i386/t-crtfm to tm-file.
> >> > * i386/mingw32.h: (ENDFILE_SPEC): New.
> >> > * i386/t-crtfm: Force -minline-all-stringops to remove
> >> external linkage of
> >> > memset
> >>
> >> The change to t-crtfm is OK.
> >>
> >> (Other changes should be reviewed by mingw maintaner.)
> >
> > The mingw32 specific changes are OK for 4.2.1.
> > Uros, does your approval for  t-crtfm also apply to the the
> > libgcc/config/i386/t-crtfm, on trunk?
> > If so I will also apply the corresponding changes to trunk. 
>  (Bootstap
> > and regtested there on i686-pc-mingw32)
> >
> > Danny
> >

This is what I have committed to trunk, after bootstrap and regtest on
i686-pc-mingw32 and i686-pc-cygwin
and build on i686-pc-linux

I have not yet backported to 4.2.1.
Danny


2007-05-29  Zuxy Meng  <zuxy.meng@gmail.com>
            Danny Smith  <dannysmith@users.sourceforge.net>

libgcc 
	PR target/29498
	* config.host (i[34567]86-*-cygwin* | i[34567]86-*-mingw*) Add
	crtfastmath.o to extra_parts.  Add i386/t-crtfm to tmake_file.
	* config/i386/t-crtfm: Compile crtfastmath.o with
	-minline-all-stringops.

gcc

	PR target/29498
	* config/i386/t-crtfm: Compile crtfastmath.o with
	-minline-all-stringops.
	* config/i386/cygwin.h (ENDFILE_SPECS): Add crtfastmath.o.
	* config/i386/mingw32.h (ENDFILE_SPECS): Add crtfastmath.o.


Index: libgcc/config.host
===================================================================
--- libgcc/config.host	(revision 125108)
+++ libgcc/config.host	(working copy)
@@ -367,9 +367,13 @@
 	;;
 i[4567]86-wrs-vxworks|i[4567]86-wrs-vxworksae)
 	;;
-i[34567]86-*-pe | i[34567]86-*-cygwin*)
+i[34567]86-*-pe)
 	;;
-i[34567]86-*-mingw32* | x86_64-*-mingw*)
+i[34567]86-*-cygwin* | i[34567]86-*-mingw*)
+	extra_parts="crtfastmath.o"
+	tmake_file="i386/t-crtfm"
+	;;
+x86_64-*-mingw*)
 	;;
 i[34567]86-*-uwin*)
 	;;
Index: libgcc/config/i386/t-crtfm
===================================================================
--- libgcc/config/i386/t-crtfm	(revision 125108)
+++ libgcc/config/i386/t-crtfm	(working copy)
@@ -1,2 +1,5 @@
+# This is an endfile, Use -minline-all-stringops to ensure
+# that __builtin_memset doesn't refer to the lib function memset().
 crtfastmath.o: $(gcc_srcdir)/config/i386/crtfastmath.c
-	$(gcc_compile) -msse -c $(gcc_srcdir)/config/i386/crtfastmath.c
+	$(gcc_compile) -msse -minline-all-stringops -c \
+	$(gcc_srcdir)/config/i386/crtfastmath.c
Index: gcc/config/i386/t-crtfm
===================================================================
--- gcc/config/i386/t-crtfm	(revision 125108)
+++ gcc/config/i386/t-crtfm	(working copy)
@@ -1,6 +1,9 @@
 EXTRA_PARTS += crtfastmath.o
 
+# This is an endfile, Use -minline-all-stringops to ensure
+# that __builtin_memset doesn't refer to the lib function memset().
 $(T)crtfastmath.o: $(srcdir)/config/i386/crtfastmath.c $(GCC_PASSES)
-	$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -msse -c \
+	$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -msse \
+		-minline-all-stringops  -c \
 		$(srcdir)/config/i386/crtfastmath.c \
 		-o $(T)crtfastmath$(objext)
Index: gcc/config/i386/cygwin.h
===================================================================
--- gcc/config/i386/cygwin.h	(revision 125108)
+++ gcc/config/i386/cygwin.h	(working copy)
@@ -40,6 +40,10 @@
   %{pg:gcrt0%O%s}}}\
 "
 
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+  "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
+
 /* Normally, -lgcc is not needed since everything in it is in the DLL,
but we
    want to allow things to be added to it when installing new versions
of
    GCC without making a new CYGWIN.DLL, so we leave it.  Profiling is
handled
Index: gcc/config/i386/mingw32.h
===================================================================
--- gcc/config/i386/mingw32.h	(revision 125108)
+++ gcc/config/i386/mingw32.h	(working copy)
@@ -86,6 +86,10 @@
 #define STARTFILE_SPEC "%{shared|mdll:dllcrt2%O%s} \
   %{!shared:%{!mdll:crt2%O%s}} %{pg:gcrt2%O%s}"
 
+#undef ENDFILE_SPEC
+#define ENDFILE_SPEC \
+  "%{ffast-math|funsafe-math-optimizations:crtfastmath.o%s}"
+
 /* Override startfile prefix defaults.  */
 #ifndef STANDARD_STARTFILE_PREFIX_1
 #if TARGET_64BIT_DEFAULT


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