From hsu@katiska.clinet.fi  Wed Dec  3 11:13:53 1997
Received: from lohi.clinet.fi (root@lohi.clinet.fi [194.100.0.7])
          by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id LAA04633
          for <FreeBSD-gnats-submit@freebsd.org>; Wed, 3 Dec 1997 11:13:49 -0800 (PST)
          (envelope-from hsu@katiska.clinet.fi)
Received: from katiska.clinet.fi (katiska.clinet.fi [194.100.0.4])
	by lohi.clinet.fi (8.8.7/8.8.6) with ESMTP id VAA12441
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 3 Dec 1997 21:16:25 +0200 (EET)
Received: (from root@localhost)
	by katiska.clinet.fi (8.8.8/8.8.6) id VAA27930;
	Wed, 3 Dec 1997 21:13:45 +0200 (EET)
Message-Id: <199712031913.VAA27930@katiska.clinet.fi>
Date: Wed, 3 Dec 1997 21:13:45 +0200 (EET)
From: Heikki Suonsivu <hsu@katiska.clinet.fi>
Reply-To: hsu@katiska.clinet.fi
To: FreeBSD-gnats-submit@freebsd.org
Subject: -g breaks kernel compile, clean does not remove something?
X-Send-Pr-Version: 3.2

>Number:         5204
>Category:       kern
>Synopsis:       -g breaks kernel compile, clean does not remove something?
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Dec  3 11:20:00 PST 1997
>Closed-Date:    Fri May 8 13:53:19 PDT 1998
>Last-Modified:  Fri May  8 13:53:43 PDT 1998
>Originator:     Heikki Suonsivu
>Release:        FreeBSD 2.2-STABLE i386
>Organization:
Clinet, Espoo, Finland
>Environment:

2.2-STABLE

>Description:

config KERNELCONFIGFILE

make depend
make clean
make DEBUG='-g -pipe'

cc -c -O -pipe -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit  -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith -g -pipe -nostdinc -I- -I. -I../.. -I../../../include -DPROBE_VERBOSE -DDEVFS -DMSDOSFS -DNFS -DFFS -DIPACCT -DINET -DCOMPAT_43 -DFAILSAFE -DSOMAXCONN=512 -DKERNEL  ../../nfs/nfs_vfsops.c
cc -c -O -pipe -Wreturn-type -Wcomment -Wredundant-decls -Wimplicit  -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes  -Wpointer-arith -g -pipe -nostdinc -I- -I. -I../.. -I../../../include -DPROBE_VERBOSE -DDEVFS -DMSDOSFS -DNFS -DFFS -DIPACCT -DINET -DCOMPAT_43 -DFAILSAFE -DSOMAXCONN=512 -DKERNEL  ../../nfs/nfs_vnops.c
make -f ../../dev/aic7xxx/Makefile MAKESRCPATH=../../dev/aic7xxx
Warning: Object directory not changed from original /usr/src/sys/compile/CLINETSERVER
cc -O -m486 -pipe -I. -DDEBUG -g   -c aicasm_gram.c
cc -O -m486 -pipe -I. -DDEBUG -g   -c aicasm_scan.c
cc -O -m486 -pipe -I. -DDEBUG -g   -c ../../dev/aic7xxx/aicasm.c
cc -O -m486 -pipe -I. -DDEBUG -g   -c ../../dev/aic7xxx/aicasm_symbol.c
cc -O -m486 -pipe -I. -DDEBUG -g    -o aicasm aicasm_gram.o aicasm_scan.o aicasm.o aicasm_symbol.o  -ll
../../dev/aic7xxx/aicasm.c:97: Undefined symbol `_yy_flex_debug' referenced from text segment
../../dev/aic7xxx/aicasm.c:104: Undefined symbol `_yy_flex_debug' referenced from text segment
*** Error code 1

Stop.
*** Error code 1

Stop.

It seems that make clean does not correctly clean something.  Removing the
directory cleans things up.  By comparing directories, I can see the
following differences:

*** .ls.orig    Wed Dec  3 21:08:10 1997
--- .ls.2       Wed Dec  3 21:07:00 1997
***************
*** 1,8 ****
--- 1,13 ----
+ .ls.1
+ .ls.2
+ .make
  Makefile
  aha.h
  ahb.h
  ahc.h
  aic.h
+ aicasm_gram.c
+ aicasm_scan.c
  amd.h
  apm.h
  ar.h
***************
*** 175,180 ****
--- 180,186 ----
  umapfs.h
  union.h
  vector.h
+ version
  vn.h
  vt.h
  vx.h
***************
*** 185,189 ****
--- 191,196 ----
  wl.h
  worm.h
  wt.h
+ y.tab.h
  ze.h
  zp.h

I guess one or more of these is they source of the problem and make clean
should remove them.

>How-To-Repeat:

I think following brings this up:

config GENERIC
pushd ../../compile/GENERIC
make depend
make
make clean
make DEBUG='-g -pipe'

>Fix:
	
Add removal of y.tab.h aicasm_gram.c aicasm_scan.c to the make clean rule ?

-- 
Heikki Suonsivu, T{ysikuu 10 C 83/02210 Espoo/FINLAND, hsu@clinet.fi
mobile +358-40-5519679 work +358-9-43542270 fax -4555276
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Fri May 8 13:53:19 PDT 1998 
State-Changed-Why:  
use "config -g" to configure kernel for debugging. 
>Unformatted:
