Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 5 Apr 1999 11:16:09 +1000
From:      Peter Jeremy <peter.jeremy@auss2.alcatel.com.au>
To:        andreas@klemm.gtn.com
Cc:        freebsd-current@FreeBSD.ORG
Subject:   Re: different systat -vmstat output when using egcs to compile kernel
Message-ID:  <99Apr5.110314est.40323@border.alcanet.com.au>

next in thread | raw e-mail | index | archive | help
Andreas Klemm <andreas@klemm.gtn.com> wrote:
>See the leading \n's in the Interrupts column (see !!!)
>1st is ok using our cc
>2nd is using egcs with different compile options.
>But error remains the same even with no optimitation
...
>  1     1 22       407    2 2533  456  264    1  13908 wire    243 \nclk0 irq
>                                                                   ^^ !!!

I recognize that from gcc-2.8.1:  The cpp behaviour changed and resulted
in the DEVICE_NAMES macro in vector.h being incorrectly expanded.  I
suspect the same `bug' is in EGCS.

The problem is that cpp (from gcc 2.8.1) _does_not_ remove
backslash-newline sequences from string constants (and maybe elsewhere
as well).  This causes problems with the DEVICE_NAMES macro defined in
vector.h and used in vector.s.  I have reported this to bug-gcc (in
mid-June) but haven't seen any response.

At this time, I don't know of any way to disable this - the only work-
around is to use a gcc-2.7.x derived cpp (eg the standard cpp).  This
implies changing NORMAL_S and DRIVER_S in /sys/i386/conf/Makefile.i386
to explicitly use the old (2.7.2.1-derived) cpp in front of as.

[Note that according to the GNU as documentation, gas handles
backslashes inside strings in the same way as C.  This is not (and,
according to one of the gas maintainers, has never been) true].

Given that it seems unlikely that we're going to get a fix in either
egcs or gas in a hurry, our options appear to be:
1) Keep the gcc2.7.2 cpp around for pre-processing .S
2) switch to m4 (yuk)
3) change config to work around the bug.
4) write a sed (or similar script) to pre-process vector.s

Peter


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?99Apr5.110314est.40323>