On 17/09/2013 4:14 AM, Jungwoo Ha wrote:
Hi,
I am trying to build jdk8 b106 with customized compiler and libc.
I'm trying to add sysroot and isystem wherever necessary.
The new configure seems to have --with-extra-*flags and --with-sys-root,
but here are problems I found so far.
1) It doesn't seem that --with-sys-root/--with-extra-*flags parameter is
actually used during the compilation
--with-extra-* flags are used as follows:
CFLAGS_JDK="${CFLAGS_JDK} $with_extra_cflags"
CXXFLAGS_JDK="${CXXFLAGS_JDK} $with_extra_cxxflags"
LDFLAGS_JDK="${LDFLAGS_JDK} $with_extra_ldflags"
# Hotspot needs these set in their legacy form
LEGACY_EXTRA_CFLAGS=$with_extra_cflags
LEGACY_EXTRA_CXXFLAGS=$with_extra_cxxflags
LEGACY_EXTRA_LDFLAGS=$with_extra_ldflags
2) When specifying --with-tool-dir, configure script doesn't use
--with-sys-root to check if the compilation and linking is done correctly.
3) LDFLAGS doesn't work all the time. Many makefile still contains old
LFLAGS.
In the new build system? The old makefiles are under the jdk/make
directory. The new build system is under the jdk/makefiles directory -
no use of LFLAGS in there.
4) I can add these flags on CFLAGS and CXXFLAGS, but jdk/ doesn't propagate
these properly.
5) For example, BUILD_GENSRC_SOR_EXE in jdk, when calling
SetupNativeCompilation, it doesn't pass CXXFLAGS.
The flags are intended for building JDK components, not compiling helper
utilities. But I can understand you would want the helper compiled using
your compiler and libc etc.
So are these new configure & make still work-in-progress, or
are these supposed to work?
For my mind there are too many similar but different aspects here ie
tool-kits and sysroots that complicate things - there seem to be
multiple possible ways to use them. For true cross-compilation things
work fine and very simply.
David
Thanks,
Jungwoo