This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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]: More precisely control crt* output on Sparc.


From: David Miller <davem@davemloft.net>
Date: Mon, 05 May 2008 12:22:55 -0700 (PDT)

> From: Jakub Jelinek <jakub@redhat.com>
> Date: Mon, 5 May 2008 11:55:47 +0200
> 
> > On Thu, May 01, 2008 at 02:28:38AM -0700, David Miller wrote:
> > > I noticed this while hacking on Gold sparc support a few
> > > weeks ago.
> > > 
> > > If we're generating an 32-bit sparc glibc, with v9 optimizations,
> > > the base CSU files should still only use the most basic sparc
> > > instructions so that they do not get marked as v8+.
> > 
> > Why isn't appending -mcpu=v7 to CFLAGS-initfini.s for 32-bit sparc libc
> > sufficient?
> 
> Yes, that would work too.
> 
> But it doesn't get rid of the call_gprof_*() function :-)

Anyways, here is the (tested) patch that solves the problem that way
if you prefer it:

2008-05-05  David S. Miller  <davem@davemloft.net>

	* sysdeps/sparc/sparc32/Makefile: Use -mcpu=v7 for initfini.s build.
	* sysdeps/sparc/sparc64/Makefile: Use -mcpu=v9 for initfini.s build.

diff --git a/sysdeps/sparc/sparc32/Makefile b/sysdeps/sparc/sparc32/Makefile
index ed4fba7..6529ad8 100644
--- a/sysdeps/sparc/sparc32/Makefile
+++ b/sysdeps/sparc/sparc32/Makefile
@@ -20,6 +20,10 @@ ifeq ($(subdir),gnulib)
 sysdep_routines = dotmul umul $(divrem) alloca
 endif	# gnulib
 
+ifeq ($(subdir),csu)
+CFLAGS-initfini.s += -mcpu=v7
+endif
+
 # We distribute these files, even though they are generated,
 # so as to avoid the need for a functioning m4 to build the library.
 divrem := sdiv udiv rem urem
diff --git a/sysdeps/sparc/sparc64/Makefile b/sysdeps/sparc/sparc64/Makefile
index c1df317..3bb0238 100644
--- a/sysdeps/sparc/sparc64/Makefile
+++ b/sysdeps/sparc/sparc64/Makefile
@@ -2,3 +2,7 @@ ifeq ($(subdir),csu)
 sysdep_routines += hp-timing
 elide-routines.os += hp-timing
 endif
+
+ifeq ($(subdir),csu)
+CFLAGS-initfini.s += -mcpu=v9
+endif


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