Improving OpenJDK portability - platform specific C conditionals

Steve Poole spoole at linux.vnet.ibm.com
Thu Jul 21 12:19:08 PDT 2011


On 19/07/11 16:08, François Revol wrote:
> Hi,
>
> 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.
>
Ah - forgotten about xcompiling - that's obviously stage 2 :-)

To all, I'd like offer up some changes as described previously.
I'd have to find a place to turn the definitions on per platform, the 
obvious place
is in the  jdk/make/common/Defs-*.gmk  platform files.

Is that reasonable ?   I don't believe there are going to be that many 
instances
but I'll do a trawl and provide a list.

Probably in week or so though
> François.
>
>
>



More information about the porters-dev mailing list