Ability to override compiler from environment
Andrew John Hughes
gnu_andrew at member.fsf.org
Wed Jun 25 22:16:28 UTC 2008
This does seem to happen with JAVAC. At least, I've had build
failures though Gentoo setting JAVAC. The CORBA and JDK builds then
use this variable which will never work because not only is the
compiler binary name replaced, but options such as the bootclasspath
are lost too. This is why IcedTea has JAVAC= now :)
On 23/06/2008, Jonathan Gibbons <Jonathan.Gibbons at sun.com> wrote:
> David,
>
> Some would say that it is a feature of the current build system that random
> environment variables don't get used :-) It makes it that much harder to
> get a predictable build.
>
> -- Jon
>
>
>
> David Herron wrote:
>
> > I was thinking about this issue of compiling with different gcc's and it
> seems the normal way to install multiple gcc's is to use suffixes for the
> version like so:-
> >
> > gcc-4.1 == gcc v4.1.x
> > gcc-3.4 == gcc v3.4.x
> > gcc == gcc v4.2.x
> >
> > I groped around the OpenJDK makefiles and found
> >
> > jdk/make/common/shared/Compiler-gcc.gmk
> > corba/make/common/shared/Compiler-gcc.gmk
> > hotspot/build/linux/makefiles/gcc.make
> >
> > both contain lines which say
> >
> > CC=gcc
> > CPP=g++
> >
> > According to the GNU make manual ..
> http://www.gnu.org/software/make/manual/html_node/Setting.html#Setting
> .. these values could be overridden with a small change in the makefile
> >
> > CC?=gcc
> > CPP?=g++
> >
> > And then setting CC or CPP in the environment would make it so the
> variable is already set and these lines in the makefile would have no
> effect.
> >
> >
> >
> > - David Herron
> >
> >
> >
>
>
--
Andrew :-)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint: F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
More information about the build-dev
mailing list