rest of the ix86 patch

Jim Wilson wilson@cygnus.com
Fri Apr 17 17:53:00 GMT 1998


	*BUT* this is not really correct since gcc cannot handle this

	%{!mcpu:%{!m486:%{!mpentium*: %(cpp_cpu_default)}}}

	correctly.  The problem is that gcc runs over the string a second
	time, adding __*__ to the defines.  But it does so before the %(...) 
	expressions are expanded (at least this is how I explain me the
	output).

You fix this by using %[cpp_cpu_default] instead of %(cpp_cpu_default).
Using [] instead of () tells gcc that it should add underscores to any
preprocessor defines contained within.  I think this is enough to make
your patch work the way you want it to.

There are still some minor problems though.  First is that we get __FOO__ but
not __FOO.  Normally we get both.  Second is that we get FOO even when -ansi.
Normally we don't.  I'd been meaning to fix these problems but haven't had
time for it yet.  They shouldn't interfere with what you are doing though.

Jim



More information about the Gcc mailing list