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

Erik Joelsson erik.joelsson at
Thu Feb 2 01:59:17 PST 2012

Hello David,

Thanks for taking a look!

New webrev here:
JPRT job running.

In this version a lot more has changes, see comments inline.

On 2012-02-02 03:33, David Holmes wrote:
> Hi Erik,
> Lots of CCC to CXX too :)
Right, it looked to me like CCC was used in rules.make by someone who 
didn't like using CPP for the C++ compiler. I couldn't see any need for 
an intermediate variable there, just extra confusion.

> 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.
Good point. We will need to send it out both to jdk8 and jdk7 consumers 
as this will (unfortunately) also hit 7u4.
> make/bsd/makefiles/gcc.make
> - CPP = $(CXX)
> + CXX = $(CXX)
Thanks for spotting that. Fixed in new webrev. I think I've created 
variations on this patch too many times now.
> C++ flags passed to C compiler?
That looks weird yes. I don't dare changing it in the scope of this work 
> make/*/makefiles/rules.make
> -# $(CC) is the c compiler (cc/gcc), $(CCC) is the c++ compiler (CC/g++).
> -C_COMPILE       = $(CC) $(CPPFLAGS) $(CFLAGS)
> +# $(CC) is the c compiler (cc/gcc), $(CXX) is the c++ compiler (CC/g++).
> +C_COMPILE       = $(CC) $(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?
Either a secondary cleanup or all at once. The new webrev deals with 
these and the related COMPILE.CC. These changes aren't needed for 
build-infra but they sure make the code clearer. Basically:

*.CC -> *.CXX
*.c -> *.CC
Removed *.cpp as they weren't used

Question is, how far do we want to go? With these changes, we have 
consistent naming of CC and CXX in all cases that I have found.

> You missed a couple of scripts on Windows that use LINK_VER:
> windows/
> windows/
I skipped the scripts as it didn't seem needed for my purposes, but 
included them in the new webrev.


More information about the hotspot-runtime-dev mailing list