RFR: JDK-8199338 Use -g0 on solstudio also for compiling C programs

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Thu Mar 8 15:44:10 UTC 2018


On solstudio, we have used -g for generating debug information when compiling C files, but -g0 when compiling C++ programs.

This is due to the fact that -g, when compiling C++ programs, will prohibit inlining. We do not want that, since we build with debug symbols even in release builds, to get a proper debuginfo file per library. So, we must use -g0. And thus we must have different flags for generating debug symbols for C and C++...

... except that the C compiler also accepts -g0, which is an alias for -g. So we can use -g0 everywhere, and have things working like right now, but get the benefit of not having to separate C and C++ flags.

I have verified locally using BUILD_COMPARE that we do not get any changes in the resulting binaries using this change on solaris. I am also currently running a compare build on all our platforms to verify that I do not break anything else.

Bug: https://bugs.openjdk.java.net/browse/JDK-8199338 <https://bugs.openjdk.java.net/browse/JDK-8199338>
WebRev: http://cr.openjdk.java.net/~ihse/JDK-8199338-use-g0-on-solstudio-always/webrev.01 <http://cr.openjdk.java.net/~ihse/JDK-8199338-use-g0-on-solstudio-always/webrev.01>

/Magnus


More information about the build-dev mailing list