public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* MIPS glibc-2.3.2 build failure with gcc-3.4
@ 2004-01-22  2:41 Michael Eager
  2004-01-22  6:42 ` Eric Christopher
  2004-01-22 11:29 ` Richard Sandiford
  0 siblings, 2 replies; 5+ messages in thread
From: Michael Eager @ 2004-01-22  2:41 UTC (permalink / raw)
  To: gcc; +Cc: amodra

[-- Attachment #1: Type: text/plain, Size: 610 bytes --]

I'm building glibc-2.3.2 for mips with the gcc-3.4-20040114 snapshot.

I'm getting an error building sigaction.c:
   ../sysdeps/unix/sysv/linux/mips/sigaction.c:83: error: $1 cannot be used in asm here

This code compiles using gcc-3.3.1.

The error is in global_alloc (global.c:355), in code which was added to 
fix PR 13169 (http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13169)

I've attached a cutdown version of sigaction.c.

Command line is "mips-gcc -O2 -c sigaction.c".

Suggestions?


--
Michael Eager     eager@mvista.com	408-328-8426	
MontaVista Software, Inc. 1237 E. Arques Ave., Sunnyvale, CA  94085

[-- Attachment #2: sigaction.c --]
[-- Type: text/plain, Size: 1138 bytes --]

extern int *__errno_location (void) __attribute__ ((__const__));

int
__libc_sigaction (sig, act, oact)
     int sig;
     int *act;
     int *oact;
{
  int result;
    {
      int kact, koact;
      if (act)
      result = (
	{ 
	  long err; 
	  long result_var = (
	    { 	
	     	long _sys_result; 
		{ 
		  register long __v0 asm("$2"); 
		  register long __a0 asm("$4") = (long) sig; 
		  register long __a1 asm("$5") = (long) act ? (&kact) : ((void *)0); 
		  register long __a2 asm("$6") = (long) oact ? (&koact) : ((void *)0); 
		  register long __a3 asm("$7") = (long) sizeof (int); 
		  __asm__ volatile ( 
			".set\tnoreorder\n\t" 
			"li\t$2, %5\t\t\t# "
			"rt_sigaction" "\n\t" 
			"syscall\n\t" 
			".set\treorder" 
			: "=r" (__v0), "+r" (__a3) 
			: "r" (__a0), "r" (__a1), "r" (__a2), "i" ((4000 + 194)) 
			: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13", "$14", "$15", "$24", "$25");
		   err = __a3;
		   _sys_result = __v0;
		   } _sys_result; 
		});
	      if ( ((long) (err)) ) 
		{ ((*__errno_location ()) = ((result_var))); 
		  result_var = -1L; 
	        } result_var; 
	});

 {
   return result;
 }
}
}


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

end of thread, other threads:[~2004-01-22 20:07 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-01-22  2:41 MIPS glibc-2.3.2 build failure with gcc-3.4 Michael Eager
2004-01-22  6:42 ` Eric Christopher
2004-01-22 11:29 ` Richard Sandiford
2004-01-22 11:31   ` Richard Sandiford
2004-01-22 20:09   ` Michael Eager

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).