On 17/09/2013 5:31 PM, Erik Joelsson wrote:
I agree that it's not clear how this should be done. We have support for
compiling with a custom compiler and sysroot, though it's not yet the
official way of building the OracleJDK. The following configure options
are used for this:
--with-tools-dir, use as a path variable to point to directories
containing executables, like compilers.
--with-sys-root, point to a directory root for headers and libs to
compile and link against.
--with-devkit, a shortcut for setting both of the above if the layout of
the devkit follows a certain standard.
Yet our true cross-compilation builds don't use these as listed but simply:
--with-devkit
--with-x
--openjdk-target
and set compiler flags via the --with-extra-* options.
There are too many options and their meaning is very unclear.
David
-----
When inspecting how this is treated by configure, I notice that we don't
actually add the --sysroot option to the compile and link lines when
setting --with-sys-root, we just use that path for looking for X11 and
other libs we depend on. Our internal devkit was constructed to be a
self contained toolchain, so the --sysroot parameter is already compiled
into gcc and isn't needed, which is why it works for us.
So basically, this could use some fixing.
/Erik
On 2013-09-16 20:14, 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
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.
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.
So are these new configure & make still work-in-progress, or
are these supposed to work?
Thanks,
Jungwoo