From owner-freebsd-current Sun Apr 4 18:18:24 1999 Delivered-To: freebsd-current@freebsd.org Received: from alcanet.com.au (news.alcanet.com.au [203.62.196.10]) by hub.freebsd.org (Postfix) with ESMTP id B919915288 for ; Sun, 4 Apr 1999 18:18:18 -0700 (PDT) (envelope-from peter.jeremy@auss2.alcatel.com.au) Received: by border.alcanet.com.au id <40323>; Mon, 5 Apr 1999 11:03:14 +1000 Date: Mon, 5 Apr 1999 11:16:09 +1000 From: Peter Jeremy Subject: Re: different systat -vmstat output when using egcs to compile kernel To: andreas@klemm.gtn.com Cc: freebsd-current@FreeBSD.ORG Message-Id: <99Apr5.110314est.40323@border.alcanet.com.au> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Andreas Klemm 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