Building JDK8 b106 with sysroot and isystem
    Erik Joelsson 
    erik.joelsson at oracle.com
       
    Tue Sep 17 07:31:43 UTC 2013
    
    
  
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.
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
    
    
More information about the build-dev
mailing list