[meta-java,master] openjdk-8: Workaround TOPDIR not getting expanded in configure.ac

Submitted by mike.looijmans@topic.nl on March 24, 2021, 8:41 a.m. | Patch ID: 179418


Message ID 20210324084124.2828-1-mike.looijmans@topic.nl
State New
Headers show

Commit Message

mike.looijmans@topic.nl March 24, 2021, 8:41 a.m.
Somehow the TOPDIR environment doesn't get expanded in configure.ac. Suspecting
a clash with OE's internal TOPDIR variable, I tried replacing it with JDKTOPDIR
but that resulted in the same error.

| autoreconf: configure.ac: creating directory $TOPDIR/common/autoconf/build-aux
| autoreconf: error: cannot create $TOPDIR/common/autoconf/build-aux: No such file or directory

The workaround implemented here is to replace $TOPDIR in the file by its assigned
value ${S}. This makes the error go away and the native build succeed.

Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl>
 recipes-core/openjdk/openjdk-8-common.inc | 1 +
 1 file changed, 1 insertion(+)

Patch hide | download patch | download mbox

diff --git a/recipes-core/openjdk/openjdk-8-common.inc b/recipes-core/openjdk/openjdk-8-common.inc
index 70585a6..7d45585 100644
--- a/recipes-core/openjdk/openjdk-8-common.inc
+++ b/recipes-core/openjdk/openjdk-8-common.inc
@@ -28,6 +28,7 @@  SRC_URI = "\
 do_configure_prepend () {
     export TOPDIR=${S}
+    sed -i 's#\$TOPDIR#${S}#g' ${S}/common/autoconf/configure.ac
 do_unpack_extract_submodules () {