Subject: Re: %: , %b still in kernel sources
To: Jaromir Dolecek <dolecek@ics.muni.cz>
From: Brian C. Grayson <bgrayson@ece.utexas.edu>
List: current-users
Date: 03/20/1997 21:07:23
Jaromir Dolecek wrote:
>
> While compiling i386 kernel from about week ago ...
>
> cc1: warnings being treated as errors
> ../../../../kern/subr_prf.c: In function `panic':
> ../../../../kern/subr_prf.c:126: warning: unknown conversion type character `:' in format
> ../../../../kern/subr_prf.c:126: warning: too many arguments for format
>
> line 126 was:
> printf("panic: %:\n", fmt, ap);
By any chance, did you install gcc yourself? If you are
unsure which cc the compile is using (/usr/bin/cc vs.
/usr/local/bin/cc, for example), try:
rm subr_prf.o && make CFLAGS=-v subr_prf.o
That should spit out all sorts of semi-useful stuff, including
the full path of the compiler, assembler, etc. If it includes a
line of /usr/local/bin/cc, then <bingo> I know the problem --
read on. If not, just delete this message!
The problem is that if you have installed gcc yourself, into
/usr/local/bin (say, because you wanted gcc-2.7.2.2 instead of
just 2.7.2), and if /usr/local/bin/cc ends up being on your
path before /usr/bin/cc, then kernel compiles will use
/usr/local/bin/cc, which knows nothing about %: and friends.
In February I sent a message to the then-new mailing
list tech-toolchain, describing this problem, in addition to
another "/usr/local/bin/gcc versus /usr/bin/gcc" problem. In
short, I also thought occurrences of %: and %b were supposed to
be obsolete, and mentioned that still using them breaks kernel
builds using, for example, gcc-2.7.2.2 instead of /usr/bin/gcc.
No one responded with any indication that still having %: and
%b was a bug, so I didn't send in a PR. Is this the case? Maybe
tech-toolchain just had too small of an audience at first to get
the attention of Someone Who Knows(tm)...
The easy work-around is to use 'make CC=/usr/bin/cc' when
building kernels, or add
makeoptions CC=/usr/bin/cc
to your kernel config file, until this issue is resolved.
Hope this helps!
Brian
--
Brian Grayson (bgrayson@ece.utexas.edu)
Graduate Student, Electrical and Computer Engineering
The University of Texas at Austin
Office: ENS 406 (512) 471-8011
Finger bgrayson@orac.ece.utexas.edu for PGP key.