public inbox for openembedded-core@lists.openembedded.org
 help / color / mirror / Atom feed
* [PATCH] eglibc: don't list the same path twice in RTLDLIST
@ 2013-01-30 16:26 Bogdan Marinescu
  2013-01-30 19:54 ` Khem Raj
  0 siblings, 1 reply; 2+ messages in thread
From: Bogdan Marinescu @ 2013-01-30 16:26 UTC (permalink / raw)
  To: openembedded-core

Before modifying RTLDLIST in ldd, make sure that it doesn't already
contain the right path, thus avoiding duplicate entries in RTLDLIST.

[YOCTO #2655]

Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
---
 meta/recipes-core/eglibc/eglibc_2.17.bb |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/eglibc/eglibc_2.17.bb b/meta/recipes-core/eglibc/eglibc_2.17.bb
index c1cae4f..7bdb267 100644
--- a/meta/recipes-core/eglibc/eglibc_2.17.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.17.bb
@@ -1,6 +1,6 @@
 require eglibc.inc
 
-PR = "r1"
+PR = "r2"
 
 DEPENDS += "gperf-native kconfig-frontends-native"
 
@@ -143,8 +143,11 @@ do_compile () {
 	echo "Adjust ldd script"
 	if [ -n "${RTLDLIST}" ]
 	then
-		sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)"\(.*\)"$#\1\2#'
-		sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)\(.*\)$#\1"${RTLDLIST} \2"#'
+		prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST=\(.*\)$#\1#'`
+		if [ "${prevrtld}" != "${RTLDLIST}" ]
+		then
+			sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
+		fi
 	fi
 
 }
-- 
1.7.10.4




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] eglibc: don't list the same path twice in RTLDLIST
  2013-01-30 16:26 [PATCH] eglibc: don't list the same path twice in RTLDLIST Bogdan Marinescu
@ 2013-01-30 19:54 ` Khem Raj
  0 siblings, 0 replies; 2+ messages in thread
From: Khem Raj @ 2013-01-30 19:54 UTC (permalink / raw)
  To: Bogdan Marinescu; +Cc: openembedded-core

Looks ok to me.

On Wed, Jan 30, 2013 at 8:26 AM, Bogdan Marinescu
<bogdan.a.marinescu@intel.com> wrote:
> Before modifying RTLDLIST in ldd, make sure that it doesn't already
> contain the right path, thus avoiding duplicate entries in RTLDLIST.
>
> [YOCTO #2655]
>
> Signed-off-by: Bogdan Marinescu <bogdan.a.marinescu@intel.com>
> ---
>  meta/recipes-core/eglibc/eglibc_2.17.bb |    9 ++++++---
>  1 file changed, 6 insertions(+), 3 deletions(-)
>
> diff --git a/meta/recipes-core/eglibc/eglibc_2.17.bb b/meta/recipes-core/eglibc/eglibc_2.17.bb
> index c1cae4f..7bdb267 100644
> --- a/meta/recipes-core/eglibc/eglibc_2.17.bb
> +++ b/meta/recipes-core/eglibc/eglibc_2.17.bb
> @@ -1,6 +1,6 @@
>  require eglibc.inc
>
> -PR = "r1"
> +PR = "r2"
>
>  DEPENDS += "gperf-native kconfig-frontends-native"
>
> @@ -143,8 +143,11 @@ do_compile () {
>         echo "Adjust ldd script"
>         if [ -n "${RTLDLIST}" ]
>         then
> -               sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)"\(.*\)"$#\1\2#'
> -               sed -i ${B}/elf/ldd -e 's#^\(RTLDLIST=\)\(.*\)$#\1"${RTLDLIST} \2"#'
> +               prevrtld=`cat ${B}/elf/ldd | grep "^RTLDLIST=" | sed 's#^RTLDLIST=\(.*\)$#\1#'`
> +               if [ "${prevrtld}" != "${RTLDLIST}" ]
> +               then
> +                       sed -i ${B}/elf/ldd -e "s#^RTLDLIST=.*\$#RTLDLIST=\"${prevrtld} ${RTLDLIST}\"#"
> +               fi
>         fi
>
>  }
> --
> 1.7.10.4
>
>
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core



^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-01-30 20:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-01-30 16:26 [PATCH] eglibc: don't list the same path twice in RTLDLIST Bogdan Marinescu
2013-01-30 19:54 ` Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox