Questions on using configure
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Thu Oct 20 02:30:29 PDT 2011
Hi David,
I'll try to answer from the best of my knowledge.
On 2011-10-18 08:38, David Holmes wrote:
> 1. ./configure created a build/linux-i586-clientANDserver-release
> directory for its output. How do I manually define the two components
> in that path? (I couldn't see any configure args that appeared to
> control it)
Do you mean the "client" and "server" in "clientANDserver"? This
somewhat strange name is the result of how Hotspot is build. On certain
platforms, certain combinations of JVMs are built. If I remember
correctly, on linux 32-bit you get the clientANDserver; but on windows
32-bit you get clientANDserverANDkernel. On 64-bit systems, you get just
server. For someone like me who haven't been long in the JDK team, this
feels quite odd. I believe Fredrik used this naming scheme to highlight
this fact. However, in the initial part of this projct, we don't want to
change what's actually built.
Also, this is controlled by the Hotspot makefiles, which we haven't
started to look at yet.
You can change this by --with-jvm-variant, however, you cannot mix and
match all kinds of JVMs, just chose between the configurations already
in use by Hotspot.
Or do you mean like "build" and "linux-i586-clientANDserver-release"?
"build" is the default output directory, and the default configuration
is named "<host*>-<jvm-variant>-<debug-level>" where host is the
traditional "os-cpu" for currently supported platforms.
This is just the default. You can do something like:
build-infra$ mkdir -p my-output/my-build
build-infra$ cd my-output/my-build/
build-infra/my-output/my-build$ ../../configure
build-infra/my-output/my-build$ make
and it will work fine.
>
> 2. configure uses that build/linux...-release path as the value to
> which ALT_OUTPUTDIR is set. Can I control the value of ALT_OUTPUTDIR
> any other way?
What is it that you want to achieve?
ALT_OUTPUTDIR is used to communicate to the "old" makefiles where the
output should end up. The idea with configure is that the way this is
communicated should be hidden from the user. So, basically, no you can't
change ALT_OUTPUTDIR. But I'm certain there's a good way of achieving
what you want to achieve anyway. :)
> 3. The spec.gmk states that "make install" will create the images and
> then copy to the installation directory. I would want to create images
> but I would not want to install them anywhere. How do I do this?
"make images"
"make install" is basically "make images" followed by a copying stage. I
imagine that "make images" is what most JDK developers will use. "make
install" is more targeted at end users who want to build and install the
JDK locally on their machine.
> 4. Cross-compilation seems to be controlled only via the HOST setting
> but I don't see any details on the format of that setting and how it
> impacts what configure will do. At present to cross-compile I need to
> set environment variables that:
> - set the target arch as CROSS_COMPILE_ARCH
> - set the path to the cross-compiler as ALT_COMPILER_PATH
> - set EXTRA_CFLAGS to define the arch specific arguments to the
> compiler (eg to request soft-float vs hard-float, different
> instruction set levels etc)
> How do I do all that with HOST and/or other configure variables?
Unfortunately we have not been able to spend much time on
cross-compilation yet. :( Would you be interested in helping us getting
it to work?
> 5. What env/make variables can still be defined at the actual build
> time (ie when make is invoked) - for example can I set
> BUILD_HOTSPOT=false to skip the hotspot build? Put another way, what
> variables are set at configure time and which can be overridden at
> build time?
The basic idea is that variables that affect the build are set at
configure time, and not at make time. It might not have been fully
implemented yet. I'm not sure about specific variables.
/Magnus
More information about the build-infra-dev
mailing list