diff options
author | Erkka Kääriä <erkka.kaaria@intel.com> | 2016-03-21 13:39:12 +0200 |
---|---|---|
committer | Maxin B. John <maxin.john@intel.com> | 2016-03-23 11:53:00 +0200 |
commit | efc3daa7526a5ae5aad24a0f777d2274aab3d5c3 (patch) | |
tree | 05d4b76983ec8174c2de86c43dad3d19299bafd1 /recipes-core/openjdk | |
parent | d354a638e7e919bebbde3c21c830b19aca004809 (diff) | |
download | meta-java-efc3daa7526a5ae5aad24a0f777d2274aab3d5c3.tar.gz |
Openjdk-8: Fix build flags for adlc
Adlc is a native tool that openjdk builds and uses during its build process.
Bitbake however passes target machine specific CFLAGS and CXXFLAGS because we
are crosscompiling openjdk for the target architecture. This can cause issues,
if these flags contains values, that work for the Yocto provided crosscompiler
but not for the system compiler.
As an example, compilation will fail on Ubuntu 14.04 if
-fstack-protector-strong is specified in the distro security flags. Ubuntu
14.04 ships with GCC 4.8, whereas this flag is only supported by GCC 4.9+.
Signed-off-by: Erkka Kääriä <erkka.kaaria@intel.com>
Signed-off-by: Maxin B. John <maxin.john@intel.com>
Diffstat (limited to 'recipes-core/openjdk')
-rw-r--r-- | recipes-core/openjdk/openjdk-8_72b05.bb | 1 | ||||
-rw-r--r-- | recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-adlc-flags.patch | 34 |
2 files changed, 35 insertions, 0 deletions
diff --git a/recipes-core/openjdk/openjdk-8_72b05.bb b/recipes-core/openjdk/openjdk-8_72b05.bb index 1a01630..feaf227 100644 --- a/recipes-core/openjdk/openjdk-8_72b05.bb +++ b/recipes-core/openjdk/openjdk-8_72b05.bb | |||
@@ -10,6 +10,7 @@ PATCHES_URI_append = "\ | |||
10 | file://openjdk8-fix-shark-stdc++11.patch;apply=no \ | 10 | file://openjdk8-fix-shark-stdc++11.patch;apply=no \ |
11 | file://openjdk8-use_builtin_frame_address_0_rather_than_returning_address_of_local_variable.patch;apply=no \ | 11 | file://openjdk8-use_builtin_frame_address_0_rather_than_returning_address_of_local_variable.patch;apply=no \ |
12 | file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;apply=no \ | 12 | file://openjdk8-fix-assembler-flag-handling-in-makefile.patch;apply=no \ |
13 | file://openjdk8-fix-adlc-flags.patch;apply=no \ | ||
13 | " | 14 | " |
14 | 15 | ||
15 | do_compile_append() { | 16 | do_compile_append() { |
diff --git a/recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-adlc-flags.patch b/recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-adlc-flags.patch new file mode 100644 index 0000000..fa26d04 --- /dev/null +++ b/recipes-core/openjdk/patches-openjdk-8/openjdk8-fix-adlc-flags.patch | |||
@@ -0,0 +1,34 @@ | |||
1 | adlc is built using the native toolchain, not the crosscompiler. It however | ||
2 | was incorrectly using flags meant for the crosscompiler. | ||
3 | |||
4 | Signed-off-by: Erkka Kääriä <erkka.kaaria@intel.com> | ||
5 | |||
6 | Upstream-Status: Inappropriate [Yocto-specific fixes] | ||
7 | |||
8 | --- | ||
9 | hotspot/make/linux/makefiles/adlc.make | 10 ++++++++++ | ||
10 | 1 file changed, 10 insertions(+) | ||
11 | |||
12 | diff --git hotspot/make/linux/makefiles/adlc.make hotspot/make/linux/makefiles/adlc.make | ||
13 | index 8a86691..2789c03 100644 | ||
14 | --- hotspot/make/linux/makefiles/adlc.make | ||
15 | +++ hotspot/make/linux/makefiles/adlc.make | ||
16 | @@ -28,6 +28,16 @@ | ||
17 | |||
18 | include $(GAMMADIR)/make/$(Platform_os_family)/makefiles/rules.make | ||
19 | |||
20 | +# Yocto specific fix - remove target machine flags and replace them with | ||
21 | +# build machine flags, as this part is built using the native toolchain | ||
22 | +CXXFLAGS:=$(filter-out $(TARGET_CXXFLAGS),$(CXXFLAGS)) | ||
23 | +CFLAGS:=$(filter-out $(TARGET_CFLAGS),$(CFLAGS)) | ||
24 | + | ||
25 | +CXXFLAGS += $(BUILD_CXXFLAGS) | ||
26 | +CFLAGS += $(BUILD_CFLAGS) | ||
27 | + | ||
28 | + | ||
29 | + | ||
30 | # ######################################################################### | ||
31 | |||
32 | # OUTDIR must be the same as AD_Dir = $(GENERATED)/adfiles in top.make: | ||
33 | -- | ||
34 | 1.9.1 | ||