RFR: 8242244: Remove redundant ELF machine definitions

Magnus Ihse Bursie magnus.ihse.bursie at oracle.com
Tue Apr 28 11:12:09 UTC 2020


On 2020-04-28 13:04, Magnus Ihse Bursie wrote:
> On 2020-04-28 12:52, John Paul Adrian Glaubitz wrote:
>> Hi!
>>
>> On 4/28/20 12:33 PM, Dmitry Chuyko wrote:
>>> I have following error during the build of 15 tip:
>>>
>>> * For target hotspot_variant-server_libjvm_objs_os_linux.o:
>>> jdk/src/hotspot/os/linux/os_linux.cpp: In static member function 
>>> 'static void* os::dll_load(const char*, char*, int)':
>>> jdk/src/hotspot/os/linux/os_linux.cpp:1854:6: error: 'EM_486' was 
>>> not declared in this scope
>>>       {EM_486,         EM_386,     ELFCLASS32, ELFDATA2LSB, 
>>> (char*)"IA 32"},
>>>        ^~~~~~
>>> jdk/src/hotspot/os/linux/os_linux.cpp:1854:6: note: suggested 
>>> alternative: 'EM_386'
>>>       {EM_486,         EM_386,     ELFCLASS32, ELFDATA2LSB, 
>>> (char*)"IA 32"},
>>>        ^~~~~~
>>>        EM_386
>>>
>>> It happens on CenOS 8 and Ubuntu 20.04 (kernel headers installed), 
>>> aarch64 and amd64.
>> I have opened a bug for the issue [1].
>>
>> Will publish the fix suggested by Ao Qi once you can confirm it fixes 
>> the problem
>> for you.
> The patch did not seem to solve the problem for me. I'm currently 
> cleaning and rebuilding to verify, but it might be a non-starter.
I now have more information.

The patch works if I build locally on my Ubuntu system.

It does not work when I use the Oracle devkit. That linux/elf-em.h 
headers does not have the EM_AARCH64 define. Since this is a very 
actively used environment used to build OpenJDK, I'd say your assumption 
in the original bug "[...] unless the JDK is supposed to be built on 
systems older than that" was incorrect.

Recommending that you back out this change.

/Magnus



>
> /Magnus
>>
>> Adrian
>>
>>> [1] https://bugs.openjdk.java.net/browse/JDK-8243998
>



More information about the hotspot-dev mailing list