3
0
Fork 0
forked from mirrors/nixpkgs

openjdk11: fix build w/glibc-2.34

Failing Hydra build: https://hydra.nixos.org/build/154132196
This commit is contained in:
Maximilian Bosch 2021-10-03 20:00:54 +02:00
parent 917b7e5fd2
commit 8e16dcc4aa
No known key found for this signature in database
GPG key ID: 091DBF4D1FC46B8E
3 changed files with 26 additions and 0 deletions

View file

@ -40,6 +40,7 @@ let
./currency-date-range-jdk10.patch
./increase-javadoc-heap.patch
./fix-library-path-jdk11.patch
./fix-glibc-2.34.patch
] ++ lib.optionals (!headless && enableGnome2) [
./swing-use-gtk-jdk10.patch
];

View file

@ -48,6 +48,7 @@ let
url = "https://src.fedoraproject.org/rpms/java-openjdk/raw/06c001c7d87f2e9fe4fedeef2d993bcd5d7afa2a/f/rh1673833-remove_removal_of_wformat_during_test_compilation.patch";
sha256 = "082lmc30x64x583vqq00c8y0wqih3y4r0mp1c4bqq36l22qv6b6r";
})
./fix-glibc-2.34.patch
] ++ lib.optionals (!headless && enableGnome2) [
./swing-use-gtk-jdk13.patch
];

View file

@ -0,0 +1,24 @@
Taken from https://build.opensuse.org/package/view_file/Java:Factory/java-15-openjdk/openjdk-glibc234.patch
--- openjdk/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c 2021-04-09 11:36:58.000000000 +0200
+++ openjdk/test/hotspot/jtreg/runtime/StackGuardPages/exeinvoke.c 2021-08-26 15:42:52.326232581 +0200
@@ -67,8 +67,17 @@
longjmp(context, 1);
}
+static char* altstack = NULL;
+
void set_signal_handler() {
- static char altstack[SIGSTKSZ];
+ if (altstack == NULL) {
+ // Dynamically allocated in case SIGSTKSZ is not constant
+ altstack = malloc(SIGSTKSZ);
+ if (altstack == NULL) {
+ fprintf(stderr, "Test ERROR. Unable to malloc altstack space\n");
+ exit(7);
+ }
+ }
stack_t ss = {
.ss_size = SIGSTKSZ,