Skip to contentSkip to conversation

openjdk-8-cross.inc: Fix QA error caused by missing hash

PATCH Superseded Erkka Kääriä 3 participants 3 messages Aug 19, 2016

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 openjdk-8-cross.inc: Fix QA error caused by missing hash

Some openjdk makefiles (e.g. vm.make) only use CFLAGS as their linker flags. This means that the oe-specific linker flags are lost. This in particular causes issues with the recent oe-core commit a98a81808, which intentionally poisons the linker hash style, so that any recipes that do not use the oe LDFLAGS fail to build.

---
 recipes-core/openjdk/openjdk-8-cross.inc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
recipes-core/openjdk/openjdk-8-cross.inc +6 -4
index 11e94ce..6097afc 100644
@@ -39,21 +39,23 @@ SRC_URI_append = "\
     file://jvm.cfg \
 "
 
+# Some makefiles pick the linker flags from the CFLAGS variable, so add
+# the LDFLAGS to CFLAGS
+CFLAGS_append = " \
+  ${LDFLAGS} \
+"
+
 EXTRA_OECONF_append = "\
     --with-jobs=${@get_jdk8_native_jobs(d)} \
-    \
     --with-sys-root=${STAGING_DIR} \
     --with-tools-dir=${STAGING_DIR_NATIVE} \
     --with-boot-jdk=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native \
     --with-cacerts-file=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native/jre/lib/security/cacerts \
-    \
     --disable-precompiled-headers \
     --disable-zip-debug-info \
-    \
     --with-extra-cflags='${CFLAGS}' \
     --with-extra-cxxflags='${CXXFLAGS}' \
     --with-extra-ldflags='${LDFLAGS}' \
-    \
     ${@jdk_configure_options(d)} \
 "
 
Signature · 12 lines
2.7.4

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki 
Business Identity Code: 0357606 - 4 
Domiciled in Helsinki 

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
#1 lore raw
Quoted 16 lines · Erkka Kääriä

Some openjdk makefiles (e.g. vm.make) only use CFLAGS as their linker flags. This means that the oe-specific linker flags are lost. This in particular causes issues with the recent oe-core commit a98a81808, which intentionally poisons the linker hash style, so that any recipes that do not use the oe LDFLAGS fail to build.

---
 recipes-core/openjdk/openjdk-8-cross.inc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
recipes-core/openjdk/openjdk-8-cross.inc +0 -0
index 11e94ce..6097afc 100644

recipes-core/openjdk/openjdk-8-cross.inc SRC_URI_append = "\ · line 47

Quoted 9 lines
recipes-core/openjdk/openjdk-8-cross.inc +6 -0
@@ -39,21 +39,23 @@ SRC_URI_append = "\
     file://jvm.cfg \
 "
 
+# Some makefiles pick the linker flags from the CFLAGS variable, so add
+# the LDFLAGS to CFLAGS
+CFLAGS_append = " \
+  ${LDFLAGS} \
+"
+

Fine.

Quoted 7 lines
recipes-core/openjdk/openjdk-8-cross.inc +0 -1
 EXTRA_OECONF_append = "\
     --with-jobs=${@get_jdk8_native_jobs(d)} \
-    \
     --with-sys-root=${STAGING_DIR} \
     --with-tools-dir=${STAGING_DIR_NATIVE} \
     --with-boot-jdk=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native \
     --with-cacerts-file=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native/jre/lib/security/cacerts \

recipes-core/openjdk/openjdk-8-cross.inc SRC_URI_append = "\ · line 60

Quoted 10 lines
recipes-core/openjdk/openjdk-8-cross.inc +0 -3
-    \
     --disable-precompiled-headers \
     --disable-zip-debug-info \
-    \
     --with-extra-cflags='${CFLAGS}' \
     --with-extra-cxxflags='${CXXFLAGS}' \
     --with-extra-ldflags='${LDFLAGS}' \
-    \
     ${@jdk_configure_options(d)} \
 "

Not related, please drop this change.

Quoted 18 lines
recipes-core/openjdk/openjdk-8-cross.inc +0 -1
--

2.7.4

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. --
_______________________________________________
Openembedded-devel mailing list [email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#2 lore raw
In reply to Erkka Kääriä
Quoted 22 lines · Erkka Kääriä

Some openjdk makefiles (e.g. vm.make) only use CFLAGS as their linker flags. This means that the oe-specific linker flags are lost. This in particular causes issues with the recent oe-core commit a98a81808, which intentionally poisons the linker hash style, so that any recipes that do not use the oe LDFLAGS fail to build.

---
recipes-core/openjdk/openjdk-8-cross.inc | 10 ++++++----

1 file changed, 6 insertions(+), 4 deletions(-)
recipes-core/openjdk/openjdk-8-cross.inc +0 -0
index 11e94ce..6097afc 100644
@@ -39,21 +39,23 @@ SRC_URI_append = "\
    file://jvm.cfg \

"

recipes-core/openjdk/openjdk-8-cross.inc SRC_URI_append = "\

Quoted 5 lines
recipes-core/openjdk/openjdk-8-cross.inc +5 -0
+# Some makefiles pick the linker flags from the CFLAGS variable, so add
+# the LDFLAGS to CFLAGS
+CFLAGS_append = " \
+  ${LDFLAGS} \
+”

This could break non, gcc compilers, where they will warn about linker options being unused during compile step etc. and if we use -Werror this may fail to build too. The change belongs to openjdk build system, if its not that invasive and complex, I would suggest to patch openjdk and upstream the change, since that will be upstream worthy

Quoted 37 lines

+

EXTRA_OECONF_append = "\
    --with-jobs=${@get_jdk8_native_jobs(d)} \
recipes-core/openjdk/openjdk-8-cross.inc +0 -4
-    \
    --with-sys-root=${STAGING_DIR} \
    --with-tools-dir=${STAGING_DIR_NATIVE} \
    --with-boot-jdk=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native \
    --with-cacerts-file=${STAGING_LIBDIR_NATIVE}/jvm/openjdk-8-native/jre/lib/security/cacerts \
-    \
    --disable-precompiled-headers \
    --disable-zip-debug-info \
-    \
    --with-extra-cflags='${CFLAGS}' \
    --with-extra-cxxflags='${CXXFLAGS}' \
    --with-extra-ldflags='${LDFLAGS}' \
-    \
    ${@jdk_configure_options(d)} \

"

--
2.7.4

---------------------------------------------------------------------
Intel Finland Oy
Registered Address: PL 281, 00181 Helsinki
Business Identity Code: 0357606 - 4
Domiciled in Helsinki

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies. --
_______________________________________________
Openembedded-devel mailing list [email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel