Subject: kern/12051: kernel builds don't make dependencies for .S files
To: None <gnats-bugs@gnats.netbsd.org>
From: None <chris@paradox.demon.co.uk>
List: netbsd-bugs
Date: 01/26/2001 14:51:29
>Number: 12051
>Category: kern
>Synopsis: kernel builds don't make dependencies for .S files
>Confidential: yes
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Fri Jan 26 14:54:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:
>Release: 2001-01-26
>Organization:
>Environment:
System: NetBSD pinky.paradox.demon.co.uk 1.5Q NetBSD 1.5Q (PINKY2) #6: Mon Jan 22 23:15:41 GMT 2001 chris@pinky.buzzbee.freeserve.co.uk:/usr/src/src/sys/arch/i386/compile/PINKY2 i386
Architecture: i386
Machine: i386
>Description:
config doesn't add the .S files into the Makefile for kernels. When doing a rebuild of an updated kernel .S files may not be rebuilt when required.
>How-To-Repeat:
edit a .h file that should cause a .S file to rebuild, it won't as the .depend file doesn't include info for .S files.
>Fix:
This is a patch suggested by Richard Earnshaw on the arm32 list, it works on i386, arm32 and sparc:
Index: usr.sbin/config/mkmakefile.c
===================================================================
RCS file: /usr/src/local.cvs/netbsd/usr.sbin/config/mkmakefile.c,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 mkmakefile.c
--- usr.sbin/config/mkmakefile.c 2001/01/11 22:46:07 1.1.1.1
+++ usr.sbin/config/mkmakefile.c 2001/01/25 00:27:40
@@ -62,7 +62,7 @@ static const char *srcpath(struct files
static const char *prefix_prologue(const char *);
static int emitdefs(FILE *);
-static int emitfiles(FILE *, int);
+static int emitfiles(FILE *, int, int);
static int emitobjs(FILE *);
static int emitcfiles(FILE *);
@@ -307,18 +307,18 @@ static int
emitcfiles(FILE *fp)
{
- return (emitfiles(fp, 'c'));
+ return (emitfiles(fp, 'c', 0));
}
static int
emitsfiles(FILE *fp)
{
- return (emitfiles(fp, 's'));
+ return (emitfiles(fp, 's', 1));
}
static int
-emitfiles(FILE *fp, int suffix)
+emitfiles(FILE *fp, int suffix, int upper_suffix)
{
struct files *fi;
struct config *cf;
@@ -336,7 +336,8 @@ emitfiles(FILE *fp, int suffix)
if ((fpath = srcpath(fi)) == NULL)
return (1);
len = strlen(fpath);
- if (fpath[len - 1] != suffix)
+ if (! ((fpath[len - 1] == suffix) ||
+ (upper_suffix && fpath[len - 1] == toupper(suffix))))
continue;
if (*fpath != '/') {
len += 3; /* "$S/" */
>Release-Note:
>Audit-Trail:
>Unformatted:
no
dependency information is not generated for .S files in kernel builds
non-critical
high
change-request