On 2018-03-26 00:44, Magnus Ihse Bursie wrote:
On 2018-03-26 03:06, John Paul Adrian Glaubitz wrote:
On 03/26/2018 08:08 AM, David Holmes wrote:
I also wonder if the values here can be reliably obtained via
uname/sysconf
or some such utility so that we don't have to list every single
platform
individually?
I think autoconf normally has support for this, yes. It's rather unusual
having to add targets manually. But you will need the mapping to
VAR_CPU,
for example. I will have a look at it anyway.
You can consider platform.m4 (amongst other thing) to be a
"translation" between whatever autoconf calls a platform, and what
OpenJDK has traditionally used. For some platforms, this is a
no-brainer, but for other, there are unfortunately multiple,
well-accepted names (amd64, x86_64, x64), and the choice OpenJDK made
in the past was not always aligned with the uname/sysconf/autoconf name.
Despite our best efforts, we are still plagued by having different
names in different places.
We could perhaps try to make a "generic" section that maps OpenJDK
names and values directly to what's given by the system, and use it
whereever it applies. I'm not sure how to extract the endianness,
though..
I think this makes sense. Couldn't we just ask the preprocessor about
32/64-bit and endian order? I realize there will be some ordering
complications for the tests in configure so not completely trivial to
implement.
/Erik