Improving OpenJDK portability - platform specific C conditionals

François Revol revol at
Tue Jul 19 08:08:23 PDT 2011


Le mardi 19 juillet 2011 à 07:05 +0100, Steve Poole a écrit :

> > > But that seems wrong - it doesn't aid OpenJDK portability except
> > > for one specific new platform.   It seems to me a better choice is
> > > not to  extend the ifdefs as above but  to move towards a
> > > capability based definition process.  
> > > 
> > > So have something like  #ifdef HAS_SPECIFIC_FUNCTION   and then
> > > somewhere else have a build file the turns on
> > > HAS_SPECIFIC_FUNCTION if building on AIX or Linux.
> > I always try and steer people this way, but it is hard to police the
> > entire code base.

+1, also because sometimes OS evolve and start supporting new stuff.
At least this happens with Haiku for ex (we're getting RT signals).
So having a central place to update things makes sense.

> > We are heading toward a ./configure process in jdk8, just no
> > specifics yet.
> That's good news -  this is important to me to get sorted out.   

As for autodetection, this usually doesn't work very well with
cross-compiling, but I guess we'll see.


More information about the porters-dev mailing list