diff options
author | Max Krummenacher <max.oss.09@gmail.com> | 2014-11-14 17:09:55 +0100 |
---|---|---|
committer | Otavio Salvador <otavio@ossystems.com.br> | 2014-12-30 12:41:53 -0200 |
commit | e710e0f48854c5f993c536bed76a79313fc6f83d (patch) | |
tree | 5ab7f852327558ea83d901e253ab731169f80e50 /recipes-core | |
parent | 52e197ac06d296e17189f4a01ccf1d626df90cfa (diff) | |
download | meta-java-e710e0f48854c5f993c536bed76a79313fc6f83d.tar.gz |
icedtea6-native: fix native-vsyscall failing
On a Fedora 20 build machine icedtea6-native fails with:
x86_64-linux/icedtea6-native/1.8.11-r5.3/icedtea6-1.8.11/openjdk-ecj/hotspot/src/os/linux/vm/os_linux.cpp:2431:60: error: expression cannot be used as a function
vgetcpu_t vgetcpu = (vgetcpu_t)VSYSCALL_ADDR(__NR_vgetcpu);
^
make[7]: *** [os_linux.o] Error 1
The patch makes the build succeed. (On an openSUSE 13.1 machine the build succeeds with and without the patch)
Diffstat (limited to 'recipes-core')
-rw-r--r-- | recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-native-vsyscall.patch | 43 | ||||
-rw-r--r-- | recipes-core/icedtea/icedtea6-native_1.8.11.bb | 2 |
2 files changed, 45 insertions, 0 deletions
diff --git a/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-native-vsyscall.patch b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-native-vsyscall.patch new file mode 100644 index 0000000..936b211 --- /dev/null +++ b/recipes-core/icedtea/icedtea6-native-1.8.11/icedtea-native-vsyscall.patch | |||
@@ -0,0 +1,43 @@ | |||
1 | Fixes the following compile time error when compiling icedtea6-native-1.8.11-r5.3 on a Fedora 20, x86_64: | ||
2 | os_linux.cpp: In function 'int sched_getcpu_syscall()': | ||
3 | os_linux.cpp:2431:60: error: expression cannot be used as a function | ||
4 | vgetcpu_t vgetcpu = (vgetcpu_t)VSYSCALL_ADDR(__NR_vgetcpu); | ||
5 | |||
6 | Fix taken from: | ||
7 | http://hg.openjdk.java.net/jdk6/jdk6/hotspot/rev/9447b2fb6fcf | ||
8 | |||
9 | Signed-off-by: Max Krummenacher <max.oss.09@gmail.com> | ||
10 | |||
11 | --- openjdk/hotspot/src/os/linux/vm/os_linux.cpp.orig 2014-10-15 14:57:39.681794315 +0200 | ||
12 | +++ openjdk/hotspot/src/os/linux/vm/os_linux.cpp 2014-10-15 15:41:32.398109645 +0200 | ||
13 | @@ -54,10 +54,6 @@ | ||
14 | # include <sys/shm.h> | ||
15 | # include <link.h> | ||
16 | |||
17 | -#if __x86_64__ | ||
18 | -#include <asm/vsyscall.h> | ||
19 | -#endif | ||
20 | - | ||
21 | #define MAX_PATH (2 * K) | ||
22 | |||
23 | // for timer info max values which include all bits | ||
24 | @@ -2427,10 +2423,19 @@ | ||
25 | int retval = -1; | ||
26 | |||
27 | #if __x86_64__ | ||
28 | +// Unfortunately we have to bring all these macros here from vsyscall.h | ||
29 | +// to be able to compile on old linuxes. | ||
30 | +# define __NR_vgetcpu 2 | ||
31 | +# define VSYSCALL_START (-10UL << 20) | ||
32 | +# define VSYSCALL_SIZE 1024 | ||
33 | +# define VSYSCALL_ADDR(vsyscall_nr) (VSYSCALL_START+VSYSCALL_SIZE*(vsyscall_nr)) | ||
34 | typedef long (*vgetcpu_t)(unsigned int *cpu, unsigned int *node, unsigned long *tcache); | ||
35 | vgetcpu_t vgetcpu = (vgetcpu_t)VSYSCALL_ADDR(__NR_vgetcpu); | ||
36 | retval = vgetcpu(&cpu, NULL, NULL); | ||
37 | #elif __i386__ | ||
38 | +# ifndef SYS_getcpu | ||
39 | +# define SYS_getcpu 318 | ||
40 | +# endif | ||
41 | retval = syscall(SYS_getcpu, &cpu, NULL, NULL); | ||
42 | #endif | ||
43 | |||
diff --git a/recipes-core/icedtea/icedtea6-native_1.8.11.bb b/recipes-core/icedtea/icedtea6-native_1.8.11.bb index 8ed3559..f0709f4 100644 --- a/recipes-core/icedtea/icedtea6-native_1.8.11.bb +++ b/recipes-core/icedtea/icedtea6-native_1.8.11.bb | |||
@@ -47,6 +47,7 @@ ICEDTEA_PATCHES = "\ | |||
47 | file://icedtea-unbreak-float.patch;apply=no \ | 47 | file://icedtea-unbreak-float.patch;apply=no \ |
48 | file://icedtea-jdk-avoid-cdef-collision.patch;apply=no \ | 48 | file://icedtea-jdk-avoid-cdef-collision.patch;apply=no \ |
49 | file://icedtea-hotspot-dont-return-booleans.patch;apply=no \ | 49 | file://icedtea-hotspot-dont-return-booleans.patch;apply=no \ |
50 | file://icedtea-native-vsyscall.patch;apply=no \ | ||
50 | " | 51 | " |
51 | 52 | ||
52 | export DISTRIBUTION_PATCHES = "\ | 53 | export DISTRIBUTION_PATCHES = "\ |
@@ -58,6 +59,7 @@ export DISTRIBUTION_PATCHES = "\ | |||
58 | patches/icedtea-unbreak-float.patch \ | 59 | patches/icedtea-unbreak-float.patch \ |
59 | patches/icedtea-jdk-avoid-cdef-collision.patch \ | 60 | patches/icedtea-jdk-avoid-cdef-collision.patch \ |
60 | patches/icedtea-hotspot-dont-return-booleans.patch \ | 61 | patches/icedtea-hotspot-dont-return-booleans.patch \ |
62 | patches/icedtea-native-vsyscall.patch \ | ||
61 | " | 63 | " |
62 | 64 | ||
63 | EXTRA_OECONF += " --with-jaxws-drop-zip=${DL_DIR}/jdk6-jaxws-2009_10_27.zip \ | 65 | EXTRA_OECONF += " --with-jaxws-drop-zip=${DL_DIR}/jdk6-jaxws-2009_10_27.zip \ |