Subject: building powernow_k7.o fails
To: None <current-users@netbsd.org>
From: Jukka Salmi <j+nbsd@2006.salmi.ch>
List: current-users
Date: 02/04/2006 08:48:16
--uAKRQypu60I7Lcqm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Hi,
building a kernel based on GENERIC_LAPTOP just failed with
# compile ANOLE.APM/powernow_k7.o
/opt/tools/i386/bin/i386--netbsdelf-gcc -ffreestanding -O2 -Werror -Wall -Wno-main -Wno-format-zero-length -Wpointer-arith -Wmissing-prototypes -Wstrict-prototypes -Wreturn-type -Wswitch -Wshadow -Wcast-qual -Wwrite-strings -Wno-sign-compare -fno-zero-initialized-in-bss -Di386 -I. -I/usr/src/sys/arch -I/usr/src/sys -nostdinc -DLKM -DMAXUSERS=32 -D_KERNEL -D_KERNEL_OPT -I/usr/src/sys/lib/libkern/../../../common/lib/libc/quad -I/usr/src/sys/lib/libkern/../../../common/lib/libc/string -I/usr/src/sys/lib/libkern/../../../common/lib/libc/arch/i386/string -I/usr/src/sys/dist/ipf -c /usr/src/sys/arch/i386/i386/powernow_k7.c/usr/src/sys/arch/i386/i386/powernow_k7.c:117: warning: `sysctllog' defined but not used
*** Failed target: powernow_k7.o
[...]
*** Error code 1
Stop.
nbmake: stopped in /build/nbsd/i386/sys/arch/i386/compile/ANOLE.APM
I think the attached patch fixes this problem.
Regards, Jukka
--
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
--uAKRQypu60I7Lcqm
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff
Index: sys/arch/i386/i386/powernow_k7.c
===================================================================
RCS file: /cvsroot/src/sys/arch/i386/i386/powernow_k7.c,v
retrieving revision 1.6
diff -u -p -r1.6 powernow_k7.c
--- sys/arch/i386/i386/powernow_k7.c 3 Feb 2006 02:37:57 -0000 1.6
+++ sys/arch/i386/i386/powernow_k7.c 4 Feb 2006 07:43:54 -0000
@@ -114,7 +114,6 @@ static int fid_codes[32] = {
/* Static variables */
static struct freq_table_s *freq_table;
-static struct sysctllog *sysctllog;
static unsigned int fsb;
static unsigned int cur_freq;
static unsigned int ttime;
@@ -125,6 +124,7 @@ static size_t freq_names_len;
static int powernow_cpu;
#ifdef _LKM
+static struct sysctllog *sysctllog;
#define SYSCTLLOG &sysctllog
#else
#define SYSCTLLOG NULL
--uAKRQypu60I7Lcqm--