Use of CC_COMPILE and CXX_COMPILE
Andrew Hughes
gnu.andrew at redhat.com
Wed Jul 17 07:20:39 PDT 2013
In the Solaris, *BSD and GNU/Linux makefiles, it states:
"# $(CC) is the c compiler (cc/gcc), $(CXX) is the c++ compiler (CC/g++)."
(make/{solaris,bsd,linux}/makefiles/rules.make)
However, both CC_COMPILE and CXX_COMPILE are then defined in the same way.
CC_COMPILE = $(CC) $(CXXFLAGS) $(CFLAGS)
CXX_COMPILE = $(CXX) $(CXXFLAGS) $(CFLAGS)
Shouldn't CXXFLAGS only be added to CXX_COMPILE and not CC_COMPILE?
It also appears that C++ flags are being added to $(CFLAGS):
make/solaris/makefiles/gcc.make:CFLAGS += -fcheck-new
make/bsd/makefiles/gcc.make:CFLAGS += -fcheck-new
make/linux/makefiles/gcc.make:CFLAGS += -fcheck-new
We hit this when trying to build some C code (mkbc.c for our ARM32 port)
using $(CC_COMPILE). Has $(CC_COMPILE) ever been used with C code?
Is there any in HotSpot itself?
Thanks,
--
Andrew :)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
PGP Key: 248BDC07 (https://keys.indymedia.org/)
Fingerprint = EC5A 1F5E C0AD 1D15 8F1F 8F91 3B96 A578 248B DC07
More information about the hotspot-dev
mailing list