Per-file OPT_CFLAGS is being ignored

David Holmes - Sun Microsystems David.Holmes at Sun.COM
Thu Nov 6 23:03:15 UTC 2008


I'm trying to work around a compiler issue with an older version of the 
JDK, but which uses the same basic build process, and have run into a 
strange problem.

For a product build I was able to bypass a compiler crash by lowering 
the optimization level using:

OPT_CFLAGS/ciEnv.o = $(OPT_CFLAGS/O2)

which sets -xO2 rather than the default -xO4. This was done in product.make

Then I moved to fastdebug and I got the same compiler crash and so again 
added the above to lower the optimization level, in fastdebug.make. But 
I still got the crash. I tried lowering again to no-optimization, and 
still got the crash.

So I used make -n to see what was being passed to CC and much to my 
surprise it shows -xO4 is always being passed. For some reason the 
per-file flag setting is not being picked up.

I'm stumped. Does anyone have any insights on how this might happen 
(make bug?) or some way to further try and diagnoze?

Thanks,
David Holmes



More information about the build-dev mailing list