Subject: port-arm32/11555: can't compile libbfd with -g...
To: None <gnats-bugs@gnats.netbsd.org>
From: None <lukem@wasabisystems.com>
List: netbsd-bugs
Date: 11/23/2000 16:55:13
>Number:         11555
>Category:       port-arm32
>Synopsis:       can't compile libbfd on shark with -g
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-arm32-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Nov 23 16:55:00 PST 2000
>Closed-Date:
>Last-Modified:
>Originator:     Luke Mewburn
>Release:        current
>Organization:
Luke Mewburn  <lukem@wasabisystems.com>  http://www.wasabisystems.com
Luke Mewburn     <lukem@netbsd.org>      http://www.netbsd.org
Wasabi Systems - providing NetBSD sales, support and service.
>Environment:
NetBSD scylla 1.5K NetBSD 1.5K (SCYLLA) #0: Sat Nov 18 05:49:23 EST
2000     lukem@scylla:/z/src/current/src/sys/arch/arm32/compile/SCYLLA
arm32

>Description:
	gnu/lib/libbfd/cpu-arm.so can't compile if you're using -g:

	/z/src/current/src/gnu/lib/libbfd/../../dist/bfd/cpu-arm.c:128:
	Internal compiler error, output_operand_lossage `invalid
	expression as operand'

>How-To-Repeat:
	have 'COPTS+=-g' in /etc/mk.conf
	try compiling that file

>Fix:
	workaround is to add -g0 to the gnu/lib/libbfd/Makefile.
	however, this turns off -g for the entire directory..

diff -p -r1.16 Makefile
*** Makefile    2000/05/20 20:30:48     1.16
--- Makefile    2000/11/24 00:53:33
*************** MKPROFILE=      no
*** 9,14 ****
--- 9,18 ----
  # for MKPIC, BFD_SLIM, BFD_UNIFIED, OBJECT_FMT
  .include <bsd.own.mk>
  
+ .if (${MACHINE} == "arm32")
+ COPTS+=-g0
+ .endif
+ 
  .if ${MKPIC} != "no"
  MKLINKLIB=    no
  .endif

>Release-Note:
>Audit-Trail:
>Unformatted: