Skip to contentSkip to conversation

openjdk-8: fix MAKE detection patch

PATCH Applied André Draszik 2 participants 6 messages Mar 12, 2018 – Mar 15, 2018

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 openjdk-8: fix MAKE detection patch

From: André Draszik <[email protected]>

The patch had a few typos, leading to errors during ./configure
../jdk8u-4be07cb28b21/common/autoconf/configure: line 8408: test: too many arguments

Change-Id: I867eba7aae3390aa869e69c86f29e77b505043e7

---
 recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch +1 -1
index 6454237..5192d1a 100644
@@ -6,7 +6,7 @@
      # User has supplied a make, test it.
 -    if test ! -f "$MAKE"; then
 -      AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not found.])
-+    if test -a `dirname "$MAKE"` = "." -a ! -f "$MAKE"; then
++    if test `dirname "$MAKE"` = "." && ! test -f "$MAKE"; then
 +      AC_PATH_PROGS(CHECK_MAKE, $MAKE)
 +    else
 +      CHECK_MAKE="${MAKE}"
Signature · 1 line
2.16.2
#1 lore raw

PATCH 2/2 openjdk-8: fix build with --as-needed host toolchains (Ubuntu 16.04)

From: André Draszik <[email protected]>

As per the commit message - build on hosts with --as-needed toolchains (Ubuntu 16.04) using system provided zlib fails:

If the (host) toolchain has been configured to unconditionally add --as-needed to the linker command line then linking can fail when using system libraries.

The reason is that the order of command line arguments becomes important with --as-needed and the JDK build system places needed system libraries at the beginning of the command line where it would normally place the object files from its own bundled compiled version.

Having those system libraries early in the command line is not useful, as they are discarded by the linker at that point in time as it hasn't seen any reference to the symbols provided yet.

As it seems a generic pattern in the makefiles here, just place the $EXPECTED_OBJS early in the command line, before any additional libraries, so as to fix this once and for all.

Change-Id I568067011bb8899700c63aa3ee9ca952045cce05
---
 recipes-core/openjdk/openjdk-8-release-16xbyy.inc  |  1 +
 ...fix-build-on-as-needed-toolchains-generic.patch | 91 ++++++++++++++++++++++
 2 files changed, 92 insertions(+)
 create mode 100644 recipes-core/openjdk/patches-openjdk-8/0010-build-fix-build-on-as-needed-toolchains-generic.patch
recipes-core/openjdk/openjdk-8-release-16xbyy.inc +1 -0
index ab72830..bd4a349 100644
@@ -15,6 +15,7 @@ PATCHES_URI = "\
     file://0007-jdk-use-correct-include-for-poll.patch \
     file://0008-jdk-use-correct-include-for-signal.patch \
     file://0009-jdk-disable-backtrace-musl-build-fix.patch \
+    file://0010-build-fix-build-on-as-needed-toolchains-generic.patch \
 "
 # some patches extracted from http://cr.openjdk.java.net/~rkennke/shark-build-hotspot/webrev.01/hotspot.patch
 # reported via http://mail.openjdk.java.net/pipermail/build-dev/2015-January/013972.html
recipes-core/openjdk/patches-openjdk-8/0010-build-fix-build-on-as-needed-toolchains-generic.patch new file +91 -0

91 lines not on this page · raw message

Signature · 1 line
2.16.2
#2 lore raw
In reply to André Draszik

Hi André,

Quoted 15 lines · André Draszik

From: André Draszik <[email protected]>

The patch had a few typos, leading to errors during ./configure
../jdk8u-4be07cb28b21/common/autoconf/configure: line 8408: test: too many arguments

Change-Id: I867eba7aae3390aa869e69c86f29e77b505043e7

---
 recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch +0 -0
index 6454237..5192d1a 100644

recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch

Quoted 9 lines
recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch +1 -2
@@ -6,7 +6,7 @@
      # User has supplied a make, test it.
 -    if test ! -f "$MAKE"; then
 -      AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not found.])
-+    if test -a `dirname "$MAKE"` = "." -a ! -f "$MAKE"; then
++    if test `dirname "$MAKE"` = "." && ! test -f "$MAKE"; then
 +      AC_PATH_PROGS(CHECK_MAKE, $MAKE)
 +    else
 +      CHECK_MAKE="${MAKE}"
--

Merged, Thanks.

Best Regards,
Maxin

#3 lore raw
Quoted 27 lines · Maxin B. John

Hi André,

Quoted 24 lines · André Draszik

From: André Draszik <[email protected]>

The patch had a few typos, leading to errors during ./configure
../jdk8u-4be07cb28b21/common/autoconf/configure: line 8408: test: too
many arguments

Change-Id: I867eba7aae3390aa869e69c86f29e77b505043e7
---
recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch
| 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

for-make.patch b/recipes-core/openjdk/patches-openjdk-8/dont-expect- fqpn-for-make.patch
index 6454237..5192d1a 100644
--- a/recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for- make.patch
+++ b/recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for- make.patch

recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch +0 -0
@@ -6,7 +6,7 @@
      # User has supplied a make, test it.
 -    if test ! -f "$MAKE"; then
 -      AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not found.])
Quoted 8 lines

recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch

Quoted 6 lines
recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch +1 -2
-+    if test -a `dirname "$MAKE"` = "." -a ! -f "$MAKE"; then
++    if test `dirname "$MAKE"` = "." && ! test -f "$MAKE"; then
 +      AC_PATH_PROGS(CHECK_MAKE, $MAKE)
 +    else
 +      CHECK_MAKE="${MAKE}"
--

Merged, Thanks.

Thanks Maxin.

Did you forget the 2nd patch, or is there an issue with it?

BTW, I just noticed that master and master-next have diverged quite a lot - what is the plan wrt that?

Cheers,
Andre'

#4 lore raw

Hi André,

Quoted 37 lines · André Draszik
Quoted 27 lines · Maxin B. John

Hi André,

Quoted 24 lines · André Draszik

From: André Draszik <[email protected]>

The patch had a few typos, leading to errors during ./configure
../jdk8u-4be07cb28b21/common/autoconf/configure: line 8408: test: too
many arguments

Change-Id: I867eba7aae3390aa869e69c86f29e77b505043e7
---
recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch
| 2 +-

 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

for-make.patch b/recipes-core/openjdk/patches-openjdk-8/dont-expect- fqpn-for-make.patch
index 6454237..5192d1a 100644
--- a/recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for- make.patch
+++ b/recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for- make.patch

recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch +0 -0
@@ -6,7 +6,7 @@
      # User has supplied a make, test it.
 -    if test ! -f "$MAKE"; then
 -      AC_MSG_ERROR([The specified make (by MAKE=$MAKE) is not found.])
Quoted 8 lines

recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch

Quoted 6 lines
recipes-core/openjdk/patches-openjdk-8/dont-expect-fqpn-for-make.patch +1 -2
-+    if test -a `dirname "$MAKE"` = "." -a ! -f "$MAKE"; then
++    if test `dirname "$MAKE"` = "." && ! test -f "$MAKE"; then
 +      AC_PATH_PROGS(CHECK_MAKE, $MAKE)
 +    else
 +      CHECK_MAKE="${MAKE}"
--

Merged, Thanks.

Quoted 3 lines

Thanks Maxin.

Did you forget the 2nd patch, or is there an issue with it?

Ah, I missed it (or rather due to some weird reasons, it didn't show up in my inbox)

Quoted 2 lines

BTW, I just noticed that master and master-next have diverged quite a lot - what is the plan wrt that?

master-next was meant to be a place for testing the new patches. Will update it soon.

Quoted 2 lines

Cheers,
Andre'

Cheers,
Maxin

#5 lore raw
In reply to André Draszik

Hi Andre',

Quoted 2 lines · André Draszik
Quoted 1 line · Maxin B. John

Hi André,

<snip>

Quoted 9 lines
Quoted 2 lines

Merged, Thanks.

Thanks Maxin.

Did you forget the 2nd patch, or is there an issue with it?

BTW, I just noticed that master and master-next have diverged quite a lot - what is the plan wrt that?

Merged the 2nd patch and updated the master-next branch.

Quoted 2 lines

Cheers,
Andre'

Cheers,
Maxin