Review for 7141242: build-infra merge: Rename CPP->CXX and LINK->LD (original) (raw)

David Holmes david.holmes at oracle.com
Thu Feb 2 02:33:08 UTC 2012


Hi Erik,

On 1/02/2012 7:13 PM, Erik Joelsson wrote:

http://cr.openjdk.java.net/~erikj/7141242/webrev.00/ 240 lines changed: 0 ins; 19 del; 221 mod; 6363 unchg

7141242: build-infra merge: Rename CPP->CXX and LINK->LD

Lots of CCC to CXX too :)

One compatibility concern: anyone currently setting CPP_FLAGS or LINK_FLAGS etc, externally, will need to change to the new names. Probably worth sending a wider email (jdk8-dev?) when this gets pushed.


make/bsd/makefiles/gcc.make

infinite recursion or a tautology? :)


make/*/makefiles/launcher.make

Not your doing but this has highlighted some strange rules eg:

C++ flags passed to C compiler?


make/*/makefiles/rules.make

-# (CC)istheccompiler(cc/gcc),(CC) is the c compiler (cc/gcc), (CC)istheccompiler(cc/gcc),(CCC) is the c++ compiler (CC/g++). -C_COMPILE = (CC)(CC) (CC)(CPPFLAGS) $(CFLAGS) -CC_COMPILE = (CCC)(CCC) (CCC)(CPPFLAGS) $(CFLAGS) +# (CC)istheccompiler(cc/gcc),(CC) is the c compiler (cc/gcc), (CC)istheccompiler(cc/gcc),(CXX) is the c++ compiler (CC/g++). +C_COMPILE = (CC)(CC) (CC)(CXXFLAGS) $(CFLAGS) +CC_COMPILE = (CXX)(CXX) (CXX)(CXXFLAGS) $(CFLAGS)

The original code is confusing, given that CC is the C compiler it makes no sense that a C++ compile be called CC_COMPILE. Is it worth changing these to CC_COMPILE and CXX_COMPILE? Maybe a secondary cleanup?

And again C++ flags passed to C compiler :(


You missed a couple of scripts on Windows that use LINK_VER:

windows/get_msc_ver.sh windows/build_vm_def.sh

Cheers, David

The build-infra project is starting to move into jdk8. For the hotspot build to stay compatible with the changes, the naming of standard make variables, like CC and LD need to be standardized across the build. Currently hotspot names the C++ compiler CPP, which is traditionally the name of the preprocessor. The windows nmake files name the linker LINK. We would like to rename the C++ compiler to CXX and have the linker named LD everywhere.

Patch is tested with hsx/hotspot-rt. Testing with jdk7u is in progress. /Erik



More information about the build-dev mailing list