Add upstream patches to build with "-fno-common".

This is default with Clang 11 and GCC 10.

https://hg.openjdk.java.net/jdk-updates/jdk11u/rev/3660248422f4
https://hg.openjdk.java.net/jdk-updates/jdk11u/rev/371bbe373ae0
This commit is contained in:
Jung-uk Kim
2020-08-19 23:32:38 +00:00
parent 57cf0ea4bb
commit b3575ba0d1
4 changed files with 43 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
--- src/java.base/unix/native/libjava/childproc.c.orig 2020-07-15 18:00:08 UTC
+++ src/java.base/unix/native/libjava/childproc.c
@@ -33,6 +33,7 @@
#include "childproc.h"
+const char * const *parentPathv;
ssize_t
restartableWrite(int fd, const void *buf, size_t count)

View File

@@ -0,0 +1,11 @@
--- src/java.base/unix/native/libjava/childproc.h.orig 2020-07-15 18:00:08 UTC
+++ src/java.base/unix/native/libjava/childproc.h
@@ -118,7 +118,7 @@ typedef struct _SpawnInfo {
* The cached and split version of the JDK's effective PATH.
* (We don't support putenv("PATH=...") in native code)
*/
-const char * const *parentPathv;
+extern const char * const *parentPathv;
ssize_t restartableWrite(int fd, const void *buf, size_t count);
int restartableDup2(int fd_from, int fd_to);

View File

@@ -0,0 +1,12 @@
--- src/java.security.jgss/share/native/libj2gss/NativeFunc.c.orig 2020-07-15 18:00:08 UTC
+++ src/java.security.jgss/share/native/libj2gss/NativeFunc.c
@@ -27,6 +27,9 @@
#include <stdlib.h>
#include "NativeFunc.h"
+/* global GSS function table */
+GSS_FUNCTION_TABLE_PTR ftab;
+
/* standard GSS method names (ordering is from mapfile) */
static const char RELEASE_NAME[] = "gss_release_name";
static const char IMPORT_NAME[] = "gss_import_name";

View File

@@ -0,0 +1,10 @@
--- src/java.security.jgss/share/native/libj2gss/NativeFunc.h.orig 2020-07-15 18:00:08 UTC
+++ src/java.security.jgss/share/native/libj2gss/NativeFunc.h
@@ -277,6 +277,6 @@ typedef struct GSS_FUNCTION_TABLE {
typedef GSS_FUNCTION_TABLE *GSS_FUNCTION_TABLE_PTR;
/* global GSS function table */
-GSS_FUNCTION_TABLE_PTR ftab;
+extern GSS_FUNCTION_TABLE_PTR ftab;
#endif