Subject: port-sparc/2434: SPARC profiling kernels do not build
To: None <gnats-bugs@NetBSD.ORG>
From: None <>
List: netbsd-bugs
Date: 05/18/1996 10:57:20
>Number:         2434
>Category:       port-sparc
>Synopsis:       SPARC profiling kernels do not build
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    gnats-admin (GNATS administrator)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat May 18 11:20:01 1996
>Originator:     Aaron Brown
Harvard University Computer Science Department
>Release:        NetBSD-current 18 May 1996
SPARCstation-20, SuperSPARC-II processor
User programs and libraries current as of May 3.
System: NetBSD virtual4 1.1B NetBSD 1.1B (VIRTUAL4) #24: Fri May 3 23:08:57 EDT 1996 abrown@virtual4:/usr/src/sys/arch/sparc/compile/VIRTUAL4 sparc

I configured a Sparc profiling kernel with "config -p GENERIC"
During the build, genassym would not build with the following error:
	cc -o genassym genassym.o
	ld: genassym.o: RRS text relocation at 0x2a60 for "mcount"
	ld: genassym.o: RRS text relocation at 0x2ab0 for "mcount"
	ld: genassym.o: RRS text relocation at 0x2e5c for "mcount"
	./genassym >assym.h
	Segmentation fault
	*** Error code 139

I copied a genassym from a non-profiling build and managed to get a working
assym.h. Then I ran into this problem:

cc1: warnings being treated as errors
machine/profile.h:69: warning: `_mcount' declared `static' but never defined
*** Error code 1


I fixed this by removing the "static" specifier in the declaration of 
_MCOUNT_DECL in sparc/include/profile.h. But I seem to remember this caused
some problem in building libc. 

cd /sys/arch/sparc/conf
config -p GENERIC
cd ../compile/GENERIC

The second problem can be fixed by removing "static" in profile.h. But this
might cause problems elsewhere.

I have no idea what the first error message even means.