RFR: 8242244: Remove redundant ELF machine definitions
Magnus Ihse Bursie
magnus.ihse.bursie at oracle.com
Tue Apr 28 11:23:42 UTC 2020
On 2020-04-28 13:14, John Paul Adrian Glaubitz wrote:
> Hi Magnus!
>
> On 4/28/20 1:12 PM, Magnus Ihse Bursie wrote:
>> 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.
> Ok, thank you. Does the Oracle devkit define EM_486 or does that need to be there as well?
I thought a simple backing out would be the best, since we have a build
breakage.
But sure, I understand why you want to keep part of the cleaning up.
I have checked, EM_486 is defined. So this combined partial backout +
the fix suggested by Qi works:
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
@@ -110,6 +110,7 @@
# include <stdint.h>
# include <inttypes.h>
# include <sys/ioctl.h>
+# include <linux/elf-em.h>
#ifndef _GNU_SOURCE
#define _GNU_SOURCE
@@ -1845,6 +1846,9 @@
char* name; // String representation
} arch_t;
+#ifndef EM_AARCH64
+ #define EM_AARCH64 183 /* ARM AARCH64 */
+#endif
#ifndef EM_RISCV
#define EM_RISCV 243 /* RISC-V */
#endif
I'd say that this is a trivial fix, and you can consider it reviewed by
me (although the authorship of this patch is somewhat convoluted).
/Magnus
>
>> Recommending that you back out this change.
> Apologies for the breakage. I should have done more testing.
>
> Adrian
>
More information about the hotspot-dev
mailing list