Subject: port-sparc/1852: changes for sparc for gcc 2.7.2
To: None <gnats-bugs@gnats.netbsd.org>
From: matthew green <mrg@eterna.com.au>
List: netbsd-bugs
Date: 12/21/1995 20:06:53
>Number:         1852
>Category:       port-sparc
>Synopsis:       changes for sparc for gcc 2.7.2
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Thu Dec 21 04:20:04 1995
>Last-Modified:
>Originator:     matthew green
>Organization:
bozotic softwar foundation
>Release:        <NetBSD-current source date> 18 dec 95.
>Environment:
	
System: NetBSD splode.eterna.com.au 1.1A NetBSD 1.1A (_splode_) #274: Wed Dec 20 19:33:56 EST 1995 mrg@splode.eterna.com.au:/orb/q/build/src/sys/arch/sparc/compile/_splode_ sparc


>Description:
	try to use gcc 2.7.2 to build a sparc kernel.  get errors
	in db_output.c.

>How-To-Repeat:
	build a sparc kernel with gcc 2.7.2.
>Fix:
	this fix to <stdarg.h> should be enough.  why wasn't it
	done this way to begin with?


Index: stdarg.h
===================================================================
RCS file: /local/cvs/src/sys/arch/sparc/include/stdarg.h,v
retrieving revision 1.1.1.2
diff -c -r1.1.1.2 stdarg.h
*** stdarg.h	1995/02/26 09:44:26	1.1.1.2
--- stdarg.h	1995/12/21 09:03:43
***************
*** 62,70 ****
   *
   * va_end cleans up after va_start.  There is nothing to do there.
   */
! #ifdef __GCC_NEW_VARARGS__	/* gcc 2.4.5 */
  #define va_start(ap, l)	((ap) = (va_list)__builtin_saveregs())
! #else				/* gcc 2.3.3 */
  #define va_start(ap, l)	(__builtin_saveregs(), \
  			 (ap) = (va_list)__builtin_next_arg())
  #endif
--- 62,70 ----
   *
   * va_end cleans up after va_start.  There is nothing to do there.
   */
! #if __GNUC__ >= 2 && __GNUC_MINOR__ >= 4	/* gcc 2.4.5 */
  #define va_start(ap, l)	((ap) = (va_list)__builtin_saveregs())
! #else						/* gcc 2.3.3 */
  #define va_start(ap, l)	(__builtin_saveregs(), \
  			 (ap) = (va_list)__builtin_next_arg())
  #endif
>Audit-Trail:
>Unformatted: