Subject: toolchain/17320: Disable warn_references
To: None <gnats-bugs@gnats.netbsd.org>
From: Ian Dall <Ian.Dall@dsto.defence.gov.au>
List: netbsd-bugs
Date: 06/19/2002 18:05:48
>Number:         17320
>Category:       toolchain
>Synopsis:       Disable warn_references
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    toolchain-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Wed Jun 19 01:45:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Ian Dall
>Release:        NetBSD 1.5ZC
>Organization:
private
>Environment:
	
	
System: NetBSD gateway.beware.dropbear.id.au 1.5ZC NetBSD 1.5ZC (SIBYL) #2: Sat Jun 15 00:22:45 CST 2002 ian@sibyl.beware.dropbear.id.au:/usr1/local/src/netbsd/src/sys/arch/pc532/compile/SIBYL pc532
Architecture: ns32k
Machine: pc532
>Description:
	
External linkers may not support the __warn_references macros.

>How-To-Repeat:
	
>Fix:
	
The following code allows __warn_references to be disabled by setting
CFLAGS=-D__NO_WARN_REFERENCES. Is there a better way?

Index: netbsd/src/sys/sys/cdefs_aout.h
diff -c netbsd/src/sys/sys/cdefs_aout.h:1.1.1.3 netbsd/src/sys/sys/cdefs_aout.h:1.3
*** netbsd/src/sys/sys/cdefs_aout.h:1.1.1.3	Wed Jun 12 12:22:16 2002
--- netbsd/src/sys/sys/cdefs_aout.h	Wed Jun 12 15:01:20 2002
***************
*** 17,23 ****
  #define	____RENAME(x)	__asm__(___STRING(x))
  #endif
  
! #ifdef __GNUC__
  #if __STDC__
  #define	__indr_reference(sym,alias)					\
  	__asm__(".stabs \"_" #alias "\",11,0,0,0");			\
--- 17,23 ----
  #define	____RENAME(x)	__asm__(___STRING(x))
  #endif
  
! #if defined(__GNUC__) && ! defined(__NO_WARN_REFERENCES)
  #if __STDC__
  #define	__indr_reference(sym,alias)					\
  	__asm__(".stabs \"_" #alias "\",11,0,0,0");			\
>Release-Note:
>Audit-Trail:
>Unformatted: