Patchwork [meta-java,1/5] openjdk-6-common: Pass LD_LIBRARY_PATH to app running under qemu

login
register
mail settings
Submitter Khem Raj
Date July 20, 2012, 5:18 a.m.
Message ID <1342761538-19890-1-git-send-email-raj.khem@gmail.com>
Download mbox | patch
Permalink /patch/32673/
State Accepted
Headers show

Comments

Khem Raj - July 20, 2012, 5:18 a.m.
When target and build host are same eg. x86_64 and qemux86-64
then application uses the dynamic linker from OEs sysroot but
libc from the build host and they may have different versions
and end up in unpleasant results.

We therefore make sure that libc is also used from OEs sysroot

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 recipes-core/openjdk/openjdk-6-common.inc |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Henning Heinold - July 21, 2012, 9:41 a.m.
On Thu, Jul 19, 2012 at 10:18:54PM -0700, Khem Raj wrote:
> When target and build host are same eg. x86_64 and qemux86-64
> then application uses the dynamic linker from OEs sysroot but
> libc from the build host and they may have different versions
> and end up in unpleasant results.
> 
> We therefore make sure that libc is also used from OEs sysroot
> 
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> ---
>  recipes-core/openjdk/openjdk-6-common.inc |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/recipes-core/openjdk/openjdk-6-common.inc b/recipes-core/openjdk/openjdk-6-common.inc
> index d81543c..c1861b6 100644
> --- a/recipes-core/openjdk/openjdk-6-common.inc
> +++ b/recipes-core/openjdk/openjdk-6-common.inc
> @@ -10,7 +10,7 @@ ICEDTEA = "NEEDS TO BE SET"
>  S = "${WORKDIR}/${ICEDTEA}"
>  B = "${S}/build"
>  
> -INC_PR = "r17"
> +INC_PR = "r18"
>  
>  SRC_URI = "\
>    ${ICEDTEA_URI} \
> @@ -242,7 +242,7 @@ EXTRA_OEMAKE += 'OE_LAUNCHER_LDFLAGS="${OE_LAUNCHER_LDFLAGS}"'
>  
>  
>  # Large stack is required at least on x86_64 host, otherwise random segfaults appear:
> -QEMU = "${@qemu_target_binary(d)} ${QEMU_OPTIONS} -s 1048576 -L ${STAGING_DIR_TARGET}"
> +QEMU = "${@qemu_target_binary(d)} ${QEMU_OPTIONS} -s 1048576 -L ${STAGING_DIR_TARGET} -E LD_LIBRARY_PATH=${STAGING_BASELIBDIR}"
>  
>  EXTRA_OEMAKE += 'QEMU="${QEMU}"'
>  
> -- 
> 1.7.9.5
> 

Thanks,

patch is applied to master.

Bye Henning

Patch

diff --git a/recipes-core/openjdk/openjdk-6-common.inc b/recipes-core/openjdk/openjdk-6-common.inc
index d81543c..c1861b6 100644
--- a/recipes-core/openjdk/openjdk-6-common.inc
+++ b/recipes-core/openjdk/openjdk-6-common.inc
@@ -10,7 +10,7 @@  ICEDTEA = "NEEDS TO BE SET"
 S = "${WORKDIR}/${ICEDTEA}"
 B = "${S}/build"
 
-INC_PR = "r17"
+INC_PR = "r18"
 
 SRC_URI = "\
   ${ICEDTEA_URI} \
@@ -242,7 +242,7 @@  EXTRA_OEMAKE += 'OE_LAUNCHER_LDFLAGS="${OE_LAUNCHER_LDFLAGS}"'
 
 
 # Large stack is required at least on x86_64 host, otherwise random segfaults appear:
-QEMU = "${@qemu_target_binary(d)} ${QEMU_OPTIONS} -s 1048576 -L ${STAGING_DIR_TARGET}"
+QEMU = "${@qemu_target_binary(d)} ${QEMU_OPTIONS} -s 1048576 -L ${STAGING_DIR_TARGET} -E LD_LIBRARY_PATH=${STAGING_BASELIBDIR}"
 
 EXTRA_OEMAKE += 'QEMU="${QEMU}"'