Re: [patch] add zero support for x86_64-linux-gnux32 target

2018-08-31 Thread Severin Gehwolf
On Fri, 2018-08-31 at 13:42 +0200, John Paul Adrian Glaubitz wrote:
> On 08/31/2018 01:40 PM, Magnus Ihse Bursie wrote:
> > Yes, that looks reasonable! If you want to, you can push this + Klose's 
> > fix. 
> 
> Is there a bug in the JBS I can reference?

https://bugs.openjdk.java.net/browse/JDK-8165440

Thanks,
Severin



Re: [patch] add zero support for x86_64-linux-gnux32 target

2018-08-31 Thread John Paul Adrian Glaubitz
On 08/31/2018 01:40 PM, Magnus Ihse Bursie wrote:
> Yes, that looks reasonable! If you want to, you can push this + Klose's fix. 
Is there a bug in the JBS I can reference?

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Re: [patch] add zero support for x86_64-linux-gnux32 target

2018-08-31 Thread Magnus Ihse Bursie
Yes, that looks reasonable! If you want to, you can push this + Klose's fix. 

/Magnus

> 31 aug. 2018 kl. 13:25 skrev John Paul Adrian Glaubitz 
> :
> 
> Hi Magnus!
> 
> I just tested it and the following change in make/autoconf/flags.m4 is
> necessary as well so that gcc is not called with "-m64":
> 
> diff -r 18afb2097ada -r 1f28530b1f46 make/autoconf/flags.m4
> --- a/make/autoconf/flags.m4Fri Aug 31 11:43:06 2018 +0200
> +++ b/make/autoconf/flags.m4Fri Aug 31 12:50:02 2018 +0200
> @@ -241,7 +241,8 @@
>   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
> MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
>   elif test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; 
> then
> -if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86 ||
> +if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86 &&
> +test "x$OPENJDK_TARGET_CPU" != xx32 ||
> test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc ||
> test "x$OPENJDK_TARGET_CPU_ARCH" = xppc; then
>   MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
> 
> Adrian
> 
>> On 08/31/2018 10:43 AM, Magnus Ihse Bursie wrote:
>> The necroposter strikes back! :-)
>> 
>> I'm currently trying to fix or close all long standing bugs on 
>> infrastructure/build, and now the time has come to JDK-8165440.
>> 
>> This patch had a bit of bad timing when it was posted, since it could not be 
>> accepted into mainline due to feature freeze, and there were no other repo 
>> to accept it.
>> 
>> I adjusted the patch to the current code base (which means that most parts 
>> of it were not needed). What remains are two files. However, I can't test if 
>> this works. Matthias, can you verify that this is a working patch for 
>> jdk/jdk for the gnux32 target? If so, I'll sponsor this patch.
>> 
>> diff --git a/make/autoconf/platform.m4 b/make/autoconf/platform.m4
>> --- a/make/autoconf/platform.m4
>> +++ b/make/autoconf/platform.m4
>> @@ -35,6 +35,10 @@
>>VAR_CPU_ARCH=x86
>>VAR_CPU_BITS=64
>>VAR_CPU_ENDIAN=little
>> +  case "$host" in *x32)
>> +VAR_CPU=x32
>> +VAR_CPU_BITS=32
>> +  esac
>>;;
>>  i?86)
>>VAR_CPU=x86
>> @@ -455,6 +459,8 @@
>>  HOTSPOT_$1_CPU_DEFINE=IA32
>>elif test "x$OPENJDK_$1_CPU" = xx86_64; then
>>  HOTSPOT_$1_CPU_DEFINE=AMD64
>> +  elif test "x$OPENJDK_$1_CPU" = xx32; then
>> +HOTSPOT_$1_CPU_DEFINE=X32
>>elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
>>  HOTSPOT_$1_CPU_DEFINE=SPARC
>>elif test "x$OPENJDK_$1_CPU" = xaarch64; then
>> diff --git a/src/hotspot/os/linux/os_linux.cpp 
>> b/src/hotspot/os/linux/os_linux.cpp
>> --- a/src/hotspot/os/linux/os_linux.cpp
>> +++ b/src/hotspot/os/linux/os_linux.cpp
>> @@ -1742,7 +1742,7 @@
>> 
>>  #if  (defined IA32)
>>static  Elf32_Half running_arch_code=EM_386;
>> -#elif   (defined AMD64)
>> +#elif   (defined AMD64) || defined(X32)
>>static  Elf32_Half running_arch_code=EM_X86_64;
>>  #elif  (defined IA64)
>>static  Elf32_Half running_arch_code=EM_IA_64;
>> 
>> /Magnus
>> 
>>> On 2016-09-06 01:01, David Holmes wrote:
>>> Hi Severin, Matthias,
>>> 
 On 5/09/2016 10:16 PM, Severin Gehwolf wrote:
> On Mon, 2016-09-05 at 14:03 +0200, Matthias Klose wrote:
> The attached patch adds support for building zero for the x86_64-
> linux-gnux32
> target, having changes in the build system, hotspot and jdk.
> 
>  - the build system currently only derives the target from
>the cpu in PLATFORM_EXTRACT_VARS_FROM_CPU; that is not enough
>for the new target, which only differs by the ending of the
>triplet. However the $host macro should be available anywhere.
> 
>  - the hotspot part just handles the new "cpu"
> 
>  - GensrcX11Wrappers.gmk assumes that there is a black/white
>decision about -m32/-m64. The patch works around it. However
>the real patch should be to get these flags from the build
>system, and not hardcode itself.
> 
>  - the sysctl system call is unsupported in the x32 kernel, and
>just the include leads to a build error.  From my point of view
>the header is not needed. I had successful builds on all other
>targets without including it. If you want to keep the include,
>then it should be guarded with
>#if !(defined(_ILP32) && defined(__x86_64__))
> 
> Matthias
 
 I've filed this bug for this:
 https://bugs.openjdk.java.net/browse/JDK-8165440
>>> 
>>> Please note that as a P4 issue this can not be fixed given we have hit RDP1:
>>> 
>>> http://mail.openjdk.java.net/pipermail/jdk9-dev/2016-August/004777.html
>>> 
>>> Further this is filed as "bug" but seems to clearly be an enhancement, so 
>>> you would need approval for it to come in post-Feature-Complete.
>>> 
>>> Please consider if this is something that must be fixed for 9 or can be 
>>> deferred. Otherwise you will need to follow additional approval processes.
>>> 
>>> Sorry.
>>> 
>>> David (just the 

Re: [patch] add zero support for x86_64-linux-gnux32 target

2018-08-31 Thread John Paul Adrian Glaubitz
Hi Magnus!

I just tested it and the following change in make/autoconf/flags.m4 is
necessary as well so that gcc is not called with "-m64":

diff -r 18afb2097ada -r 1f28530b1f46 make/autoconf/flags.m4
--- a/make/autoconf/flags.m4Fri Aug 31 11:43:06 2018 +0200
+++ b/make/autoconf/flags.m4Fri Aug 31 12:50:02 2018 +0200
@@ -241,7 +241,8 @@
   elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
 MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"
   elif test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang; then
-if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86 ||
+if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86 &&
+test "x$OPENJDK_TARGET_CPU" != xx32 ||
 test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc ||
 test "x$OPENJDK_TARGET_CPU_ARCH" = xppc; then
   MACHINE_FLAG="-m${OPENJDK_TARGET_CPU_BITS}"

Adrian

On 08/31/2018 10:43 AM, Magnus Ihse Bursie wrote:
> The necroposter strikes back! :-)
> 
> I'm currently trying to fix or close all long standing bugs on 
> infrastructure/build, and now the time has come to JDK-8165440.
> 
> This patch had a bit of bad timing when it was posted, since it could not be 
> accepted into mainline due to feature freeze, and there were no other repo to 
> accept it.
> 
> I adjusted the patch to the current code base (which means that most parts of 
> it were not needed). What remains are two files. However, I can't test if 
> this works. Matthias, can you verify that this is a working patch for jdk/jdk 
> for the gnux32 target? If so, I'll sponsor this patch.
> 
> diff --git a/make/autoconf/platform.m4 b/make/autoconf/platform.m4
> --- a/make/autoconf/platform.m4
> +++ b/make/autoconf/platform.m4
> @@ -35,6 +35,10 @@
>    VAR_CPU_ARCH=x86
>    VAR_CPU_BITS=64
>    VAR_CPU_ENDIAN=little
> +  case "$host" in *x32)
> +    VAR_CPU=x32
> +    VAR_CPU_BITS=32
> +  esac
>    ;;
>  i?86)
>    VAR_CPU=x86
> @@ -455,6 +459,8 @@
>  HOTSPOT_$1_CPU_DEFINE=IA32
>    elif test "x$OPENJDK_$1_CPU" = xx86_64; then
>  HOTSPOT_$1_CPU_DEFINE=AMD64
> +  elif test "x$OPENJDK_$1_CPU" = xx32; then
> +    HOTSPOT_$1_CPU_DEFINE=X32
>    elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
>  HOTSPOT_$1_CPU_DEFINE=SPARC
>    elif test "x$OPENJDK_$1_CPU" = xaarch64; then
> diff --git a/src/hotspot/os/linux/os_linux.cpp 
> b/src/hotspot/os/linux/os_linux.cpp
> --- a/src/hotspot/os/linux/os_linux.cpp
> +++ b/src/hotspot/os/linux/os_linux.cpp
> @@ -1742,7 +1742,7 @@
> 
>  #if  (defined IA32)
>    static  Elf32_Half running_arch_code=EM_386;
> -#elif   (defined AMD64)
> +#elif   (defined AMD64) || defined(X32)
>    static  Elf32_Half running_arch_code=EM_X86_64;
>  #elif  (defined IA64)
>    static  Elf32_Half running_arch_code=EM_IA_64;
> 
> /Magnus
> 
> On 2016-09-06 01:01, David Holmes wrote:
>> Hi Severin, Matthias,
>>
>> On 5/09/2016 10:16 PM, Severin Gehwolf wrote:
>>> On Mon, 2016-09-05 at 14:03 +0200, Matthias Klose wrote:
 The attached patch adds support for building zero for the x86_64-
 linux-gnux32
 target, having changes in the build system, hotspot and jdk.

  - the build system currently only derives the target from
    the cpu in PLATFORM_EXTRACT_VARS_FROM_CPU; that is not enough
    for the new target, which only differs by the ending of the
    triplet. However the $host macro should be available anywhere.

  - the hotspot part just handles the new "cpu"

  - GensrcX11Wrappers.gmk assumes that there is a black/white
    decision about -m32/-m64. The patch works around it. However
    the real patch should be to get these flags from the build
    system, and not hardcode itself.

  - the sysctl system call is unsupported in the x32 kernel, and
    just the include leads to a build error.  From my point of view
    the header is not needed. I had successful builds on all other
    targets without including it. If you want to keep the include,
    then it should be guarded with
    #if !(defined(_ILP32) && defined(__x86_64__))

 Matthias
>>>
>>> I've filed this bug for this:
>>> https://bugs.openjdk.java.net/browse/JDK-8165440
>>
>> Please note that as a P4 issue this can not be fixed given we have hit RDP1:
>>
>> http://mail.openjdk.java.net/pipermail/jdk9-dev/2016-August/004777.html
>>
>> Further this is filed as "bug" but seems to clearly be an enhancement, so 
>> you would need approval for it to come in post-Feature-Complete.
>>
>> Please consider if this is something that must be fixed for 9 or can be 
>> deferred. Otherwise you will need to follow additional approval processes.
>>
>> Sorry.
>>
>> David (just the messenger!)
>>
>>> Unfortunately, I have no way of testing it.
>>>
>>> Cheers,
>>> Severin
>>>

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Re: [patch] add zero support for x86_64-linux-gnux32 target

2018-08-31 Thread John Paul Adrian Glaubitz
On 08/31/2018 11:19 AM, Magnus Ihse Bursie wrote:
> Hah! That's exactly the same patch as I derived. :-)

Great.

> So that means, I assume, that the patch has been tested properly? If so I'll 
> just sponsor and push it.

(sid-x32-sbuild)root@epyc:/# file /usr/lib/jvm/java-11-openjdk-x32/bin/java
/usr/lib/jvm/java-11-openjdk-x32/bin/java: ELF 32-bit LSB executable, x86-64, 
version 1 (SYSV), dynamically linked, interpreter /libx32/ld-linux-x32.so.2, 
for GNU/Linux 3.4.0, BuildID[sha1]=feec974bc65365772119c032d534e49839f8df8f, 
stripped
(sid-x32-sbuild)root@epyc:/# /usr/lib/jvm/java-11-openjdk-x32/bin/java --version
openjdk 11 2018-09-25
OpenJDK Runtime Environment (build 11+27-Debian-1)
OpenJDK Zero VM (build 11+27-Debian-1, interpreted mode)
(sid-x32-sbuild)root@epyc:/#

Yes. Go ahead, please :-).

Adrian

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Re: [patch] add zero support for x86_64-linux-gnux32 target

2018-08-31 Thread Magnus Ihse Bursie




On 2018-08-31 10:57, John Paul Adrian Glaubitz wrote:

On 08/31/2018 10:43 AM, Magnus Ihse Bursie wrote:

I adjusted the patch to the current code base (which means that most parts of 
it were not needed). What remains are two files. However, I can't test if this 
works. Matthias, can you verify that this is a working patch for jdk/jdk for 
the gnux32 target? If so, I'll sponsor this patch.

I can test it. Didn't know that Matthias posted a patch for x32
support. The current patch that the Debian openjdk-11 package
is using at the moment can be found in [1].

Hah! That's exactly the same patch as I derived. :-)

So that means, I assume, that the patch has been tested properly? If so 
I'll just sponsor and push it.


/Magnus



Adrian


[1] 
https://sources.debian.org/src/openjdk-11/11%7E27-1/debian/patches/zero-x32.diff/




Re: [patch] add zero support for x86_64-linux-gnux32 target

2018-08-31 Thread John Paul Adrian Glaubitz
On 08/31/2018 10:57 AM, John Paul Adrian Glaubitz wrote:
> On 08/31/2018 10:43 AM, Magnus Ihse Bursie wrote:
>> I adjusted the patch to the current code base (which means that most parts 
>> of it were not needed). What remains are two files. However, I can't test if 
>> this works. Matthias, can you verify that this is a working patch for 
>> jdk/jdk for the gnux32 target? If so, I'll sponsor this patch.
> I can test it. Didn't know that Matthias posted a patch for x32
> support. The current patch that the Debian openjdk-11 package
> is using at the moment can be found in [1].

Oh, and here's the build log of openjdk-11 in Debian with that
patch [1].

Adrian

> [1] 
> https://buildd.debian.org/status/fetch.php?pkg=openjdk-11=x32=11%7E27-1=1534788109=0

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Re: [patch] add zero support for x86_64-linux-gnux32 target

2018-08-31 Thread John Paul Adrian Glaubitz
On 08/31/2018 10:43 AM, Magnus Ihse Bursie wrote:
> I adjusted the patch to the current code base (which means that most parts of 
> it were not needed). What remains are two files. However, I can't test if 
> this works. Matthias, can you verify that this is a working patch for jdk/jdk 
> for the gnux32 target? If so, I'll sponsor this patch.
I can test it. Didn't know that Matthias posted a patch for x32
support. The current patch that the Debian openjdk-11 package
is using at the moment can be found in [1].

Adrian

> [1] 
> https://sources.debian.org/src/openjdk-11/11%7E27-1/debian/patches/zero-x32.diff/

-- 
 .''`.  John Paul Adrian Glaubitz
: :' :  Debian Developer - glaub...@debian.org
`. `'   Freie Universitaet Berlin - glaub...@physik.fu-berlin.de
  `-GPG: 62FF 8A75 84E0 2956 9546  0006 7426 3B37 F5B5 F913


Re: [patch] add zero support for x86_64-linux-gnux32 target

2018-08-31 Thread Magnus Ihse Bursie

The necroposter strikes back! :-)

I'm currently trying to fix or close all long standing bugs on 
infrastructure/build, and now the time has come to JDK-8165440.


This patch had a bit of bad timing when it was posted, since it could 
not be accepted into mainline due to feature freeze, and there were no 
other repo to accept it.


I adjusted the patch to the current code base (which means that most 
parts of it were not needed). What remains are two files. However, I 
can't test if this works. Matthias, can you verify that this is a 
working patch for jdk/jdk for the gnux32 target? If so, I'll sponsor 
this patch.


diff --git a/make/autoconf/platform.m4 b/make/autoconf/platform.m4
--- a/make/autoconf/platform.m4
+++ b/make/autoconf/platform.m4
@@ -35,6 +35,10 @@
   VAR_CPU_ARCH=x86
   VAR_CPU_BITS=64
   VAR_CPU_ENDIAN=little
+  case "$host" in *x32)
+    VAR_CPU=x32
+    VAR_CPU_BITS=32
+  esac
   ;;
 i?86)
   VAR_CPU=x86
@@ -455,6 +459,8 @@
 HOTSPOT_$1_CPU_DEFINE=IA32
   elif test "x$OPENJDK_$1_CPU" = xx86_64; then
 HOTSPOT_$1_CPU_DEFINE=AMD64
+  elif test "x$OPENJDK_$1_CPU" = xx32; then
+    HOTSPOT_$1_CPU_DEFINE=X32
   elif test "x$OPENJDK_$1_CPU" = xsparcv9; then
 HOTSPOT_$1_CPU_DEFINE=SPARC
   elif test "x$OPENJDK_$1_CPU" = xaarch64; then
diff --git a/src/hotspot/os/linux/os_linux.cpp 
b/src/hotspot/os/linux/os_linux.cpp

--- a/src/hotspot/os/linux/os_linux.cpp
+++ b/src/hotspot/os/linux/os_linux.cpp
@@ -1742,7 +1742,7 @@

 #if  (defined IA32)
   static  Elf32_Half running_arch_code=EM_386;
-#elif   (defined AMD64)
+#elif   (defined AMD64) || defined(X32)
   static  Elf32_Half running_arch_code=EM_X86_64;
 #elif  (defined IA64)
   static  Elf32_Half running_arch_code=EM_IA_64;

/Magnus

On 2016-09-06 01:01, David Holmes wrote:

Hi Severin, Matthias,

On 5/09/2016 10:16 PM, Severin Gehwolf wrote:

On Mon, 2016-09-05 at 14:03 +0200, Matthias Klose wrote:

The attached patch adds support for building zero for the x86_64-
linux-gnux32
target, having changes in the build system, hotspot and jdk.

 - the build system currently only derives the target from
   the cpu in PLATFORM_EXTRACT_VARS_FROM_CPU; that is not enough
   for the new target, which only differs by the ending of the
   triplet. However the $host macro should be available anywhere.

 - the hotspot part just handles the new "cpu"

 - GensrcX11Wrappers.gmk assumes that there is a black/white
   decision about -m32/-m64. The patch works around it. However
   the real patch should be to get these flags from the build
   system, and not hardcode itself.

 - the sysctl system call is unsupported in the x32 kernel, and
   just the include leads to a build error.  From my point of view
   the header is not needed. I had successful builds on all other
   targets without including it. If you want to keep the include,
   then it should be guarded with
   #if !(defined(_ILP32) && defined(__x86_64__))

Matthias


I've filed this bug for this:
https://bugs.openjdk.java.net/browse/JDK-8165440


Please note that as a P4 issue this can not be fixed given we have hit 
RDP1:


http://mail.openjdk.java.net/pipermail/jdk9-dev/2016-August/004777.html

Further this is filed as "bug" but seems to clearly be an enhancement, 
so you would need approval for it to come in post-Feature-Complete.


Please consider if this is something that must be fixed for 9 or can 
be deferred. Otherwise you will need to follow additional approval 
processes.


Sorry.

David (just the messenger!)


Unfortunately, I have no way of testing it.

Cheers,
Severin





Re: [patch] add zero support for x86_64-linux-gnux32 target

2016-09-05 Thread David Holmes

Hi Severin, Matthias,

On 5/09/2016 10:16 PM, Severin Gehwolf wrote:

On Mon, 2016-09-05 at 14:03 +0200, Matthias Klose wrote:

The attached patch adds support for building zero for the x86_64-
linux-gnux32
target, having changes in the build system, hotspot and jdk.

 - the build system currently only derives the target from
   the cpu in PLATFORM_EXTRACT_VARS_FROM_CPU; that is not enough
   for the new target, which only differs by the ending of the
   triplet. However the $host macro should be available anywhere.

 - the hotspot part just handles the new "cpu"

 - GensrcX11Wrappers.gmk assumes that there is a black/white
   decision about -m32/-m64. The patch works around it.  However
   the real patch should be to get these flags from the build
   system, and not hardcode itself.

 - the sysctl system call is unsupported in the x32 kernel, and
   just the include leads to a build error.  From my point of view
   the header is not needed. I had successful builds on all other
   targets without including it. If you want to keep the include,
   then it should be guarded with
   #if !(defined(_ILP32) && defined(__x86_64__))

Matthias


I've filed this bug for this:
https://bugs.openjdk.java.net/browse/JDK-8165440


Please note that as a P4 issue this can not be fixed given we have hit RDP1:

http://mail.openjdk.java.net/pipermail/jdk9-dev/2016-August/004777.html

Further this is filed as "bug" but seems to clearly be an enhancement, 
so you would need approval for it to come in post-Feature-Complete.


Please consider if this is something that must be fixed for 9 or can be 
deferred. Otherwise you will need to follow additional approval processes.


Sorry.

David (just the messenger!)


Unfortunately, I have no way of testing it.

Cheers,
Severin



Re: [patch] add zero support for x86_64-linux-gnux32 target

2016-09-05 Thread Severin Gehwolf
On Mon, 2016-09-05 at 14:03 +0200, Matthias Klose wrote:
> The attached patch adds support for building zero for the x86_64-
> linux-gnux32
> target, having changes in the build system, hotspot and jdk.
> 
>  - the build system currently only derives the target from
>    the cpu in PLATFORM_EXTRACT_VARS_FROM_CPU; that is not enough
>    for the new target, which only differs by the ending of the
>    triplet. However the $host macro should be available anywhere.
> 
>  - the hotspot part just handles the new "cpu"
> 
>  - GensrcX11Wrappers.gmk assumes that there is a black/white
>    decision about -m32/-m64. The patch works around it.  However
>    the real patch should be to get these flags from the build
>    system, and not hardcode itself.
> 
>  - the sysctl system call is unsupported in the x32 kernel, and
>    just the include leads to a build error.  From my point of view
>    the header is not needed. I had successful builds on all other
>    targets without including it. If you want to keep the include,
>    then it should be guarded with
>    #if !(defined(_ILP32) && defined(__x86_64__))
> 
> Matthias

I've filed this bug for this:
https://bugs.openjdk.java.net/browse/JDK-8165440

Unfortunately, I have no way of testing it.

Cheers,
Severin


Re: [patch] add zero support for x86_64-linux-gnux32 target

2016-09-05 Thread Erik Joelsson

Build changes look ok.

/Erik


On 2016-09-05 14:03, Matthias Klose wrote:

The attached patch adds support for building zero for the x86_64-linux-gnux32
target, having changes in the build system, hotspot and jdk.

  - the build system currently only derives the target from
the cpu in PLATFORM_EXTRACT_VARS_FROM_CPU; that is not enough
for the new target, which only differs by the ending of the
triplet. However the $host macro should be available anywhere.

  - the hotspot part just handles the new "cpu"

  - GensrcX11Wrappers.gmk assumes that there is a black/white
decision about -m32/-m64. The patch works around it.  However
the real patch should be to get these flags from the build
system, and not hardcode itself.

  - the sysctl system call is unsupported in the x32 kernel, and
just the include leads to a build error.  From my point of view
the header is not needed. I had successful builds on all other
targets without including it. If you want to keep the include,
then it should be guarded with
#if !(defined(_ILP32) && defined(__x86_64__))

Matthias