NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: kern/38563: have the kernel build spit out the kernel version info
The following reply was made to PR kern/38563; it has been noted by GNATS.
From: "Greg A. Woods; Planix, Inc." <woods%planix.ca@localhost>
To: David Holland <dholland-bugs%netbsd.org@localhost>
Cc: matthew green <mrg%eterna.com.au@localhost>,
gnats-bugs%NetBSD.org@localhost
Subject: Re: kern/38563: have the kernel build spit out the kernel version info
Date: Sat, 3 May 2008 12:30:50 -0400
On 2-May-08, at 9:12 PM, David Holland wrote:
> On Sat, May 03, 2008 at 02:47:00AM +1000, matthew green wrote:
>> nice idea, but it can't go in with this patch. it isn't
>> cross-compile friendly.
>>
>> i also want the version. perhaps we can print the 'version'
>> files contents instead, and not depend on a working "what".
>
> How about
>
> ${SED} '/const char sccs/!d;s/.*#)//;s/\\.*//' vers.c
>
> ?
That probably does the trick.
I tried to mimic newvers.sh with this and it seems to work OK too.
Note the call to "size" too. (and I'm not sure why the execute bit is
set)
Index: sys/conf/Makefile.kern.inc
===================================================================
RCS file: /cvs/master/m-NetBSD/main/src/sys/conf/Makefile.kern.inc,v
retrieving revision 1.111
diff -u -r1.111 Makefile.kern.inc
--- sys/conf/Makefile.kern.inc 24 Mar 2008 18:03:27 -0000 1.111
+++ sys/conf/Makefile.kern.inc 2 May 2008 18:12:00 -0000
@@ -200,7 +200,8 @@
${_MKSHECHO}\
${LD} -Map $@.map --cref ${LINKFLAGS} -o $@ '$$
{SYSTEM_OBJ}' '$${EXTRA_OBJ}' vers.o; \
${LD} -Map $@.map --cref ${LINKFLAGS} -o $@ $
{SYSTEM_OBJ} ${EXTRA_OBJ} vers.o
-SYSTEM_LD_TAIL?=@${SIZE} $@; chmod 755 $@
+
+SYSTEM_LD_TAIL?=@echo ""; echo "NetBSD $$(${HOST_SH} $S/conf/
osrelease.sh) (${.CURDIR:T}) \#$$(cat version)"; ${SIZE} $@; chmod 755
$@
TEXTADDR?= ${LOADADDRESS} # backwards
compatibility
LINKTEXT?= ${TEXTADDR:C/.+/-Ttext &/}
--
Greg A. Woods; Planix, Inc.
<woods%planix.ca@localhost>
Home |
Main Index |
Thread Index |
Old Index