This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
3.2 PATCH: Build multilibbed crtfastmath.o on 64-bit Solaris 2
- From: Rainer Orth <ro at TechFak dot Uni-Bielefeld dot DE>
- To: gcc-patches at gcc dot gnu dot org
- Date: Thu, 20 Jun 2002 14:31:34 +0200 (MEST)
- Subject: 3.2 PATCH: Build multilibbed crtfastmath.o on 64-bit Solaris 2
I noticed that two testcases fail on sparc-sun-solaris2.8 with -m64:
FAIL: gcc.dg/20020607-2.c (test for excess errors)
Excess errors:
ld: fatal: file /vol/gcc/obj/gcc-3.2-20020617/8-gcc-no-ada/gcc/crtfastmath.o: wrong machine class
ld: fatal: File processing errors. No output written to ./20020607-2.exe
FAIL: gcc.dg/fnegate-1.c (test for excess errors)
Excess errors:
ld: fatal: file /vol/gcc/obj/gcc-3.2-20020617/8-gcc-no-ada/gcc/crtfastmath.o: wrong machine class
ld: fatal: File processing errors. No output written to ./fnegate-1.exe
This happens because crtfastmath.o isn't built separately for the sparcv9
multilib. The following patch fixes this.
Tested by a C-only bootstrap on sparc-sun-solaris2.8: no testsuite changes
except that those two testcases now pass.
Ok for mainline?
Rainer
Wed Jun 19 19:05:29 2002 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* config/sparc/t-crtfm (crtfastmath.o): Prefix with $(T) for
multilibs.
* config/sparc/t-sol2-64 (EXTRA_MULTILIB_PARTS): Add crtfastmath.o.
Index: gcc/config/sparc/t-crtfm
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/t-crtfm,v
retrieving revision 1.1
diff -u -p -r1.1 t-crtfm
--- gcc/config/sparc/t-crtfm 3 Apr 2002 20:13:50 -0000 1.1
+++ gcc/config/sparc/t-crtfm 20 Jun 2002 11:14:44 -0000
@@ -1,4 +1,4 @@
EXTRA_PARTS += crtfastmath.o
-crtfastmath.o: $(srcdir)/config/sparc/crtfastmath.c $(GCC_PASSES)
- $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) -c -o crtfastmath.o $(srcdir)/config/sparc/crtfastmath.c
+$(T)crtfastmath.o: $(srcdir)/config/sparc/crtfastmath.c $(GCC_PASSES)
+ $(GCC_FOR_TARGET) $(MULTILIB_CFLAGS) $(LIBGCC2_CFLAGS) -c -o $(T)crtfastmath.o $(srcdir)/config/sparc/crtfastmath.c
Index: gcc/config/sparc/t-sol2-64
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/sparc/t-sol2-64,v
retrieving revision 1.3
diff -u -p -r1.3 t-sol2-64
--- gcc/config/sparc/t-sol2-64 9 May 2002 21:01:53 -0000 1.3
+++ gcc/config/sparc/t-sol2-64 20 Jun 2002 11:14:44 -0000
@@ -5,6 +5,7 @@ MULTILIB_MATCHES =
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
-EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o gmon.o crt1.o crti.o crtn.o gcrt1.o
+EXTRA_MULTILIB_PARTS=crtbegin.o crtend.o gmon.o crt1.o crti.o crtn.o gcrt1.o \
+ crtfastmath.o
SHLIB_SLIBDIR_SUFFIXES = sparcv9:/sparcv9 sparcv7: