From owner-freebsd-current Wed Jan 17 21:57:31 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id VAA17341 for current-outgoing; Wed, 17 Jan 1996 21:57:31 -0800 (PST) Received: from phaeton.artisoft.com (phaeton.Artisoft.COM [198.17.250.211]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id VAA17332 for ; Wed, 17 Jan 1996 21:57:28 -0800 (PST) Received: (from terry@localhost) by phaeton.artisoft.com (8.6.11/8.6.9) id WAA04806; Wed, 17 Jan 1996 22:50:44 -0700 From: Terry Lambert Message-Id: <199601180550.WAA04806@phaeton.artisoft.com> Subject: Re: src/lib/libc/sys/Makefile.inc: proposed change To: jdp@polstra.com (John Polstra) Date: Wed, 17 Jan 1996 22:50:43 -0700 (MST) Cc: freebsd-current@FreeBSD.org In-Reply-To: <199601180127.RAA19205@austin.polstra.com> from "John Polstra" at Jan 17, 96 05:27:17 pm X-Mailer: ELM [version 2.4 PL24] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-current@FreeBSD.org Precedence: bulk > I want to see if anybody envisions any problems with a change I want to > make to it. > > I was making a modified local version of the libc tree for generating > an ELF library. That involved creating a couple of new preprocessor > macros, and using them in some of the assembly language files. I > don't have the precise details handy, but an assembly died on a > statement something like this: > > movl $FOO,%eax > > where "FOO" was one of the new macros I defined. > > The problem was that, by default, "cpp" considers `$' to be a valid > character in an identifier. So it was interpreting `$FOO' as an > identifier, rather than as two separate tokens. This is never correct > in i386 assembly language, since `$' is an operator that means > "interpret as a literal". > > So I want to modify "Makefile.inc" in that directory so that cpp is > invoked with the "-$" option, which makes `$' _not_ a valid identifier > character. (Yes, I know I have to double the dollar sign in the > makefile.) I tried it locally, and it seemed to work fine. > > Do any of you see any problem with making that change? Why not: movl $ ## FOO,%eax Instead? If it hits the preprocessor first, it should be no problem. Terry Lambert terry@lambert.org --- Any opinions in this posting are my own and not those of my present or previous employers.