From: Yann E. MORIN <yann.morin.1998@free.fr>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH next v4 2/6] support/scripts/check-host-rpath: split condition on two statements
Date: Thu, 15 Nov 2018 21:58:30 +0100 [thread overview]
Message-ID: <20181115205830.GQ10271@scaer> (raw)
In-Reply-To: <20181114105557.12599-3-thomas.petazzoni@bootlin.com>
Thomas, All,
On 2018-11-14 11:55 +0100, Thomas Petazzoni spake thusly:
> Inside the check_elf_has_rpath(), we check if the host binary has a
> correct RPATH, which should be either an absolute path to
> $(HOST_DIR)/lib, or a relative path using $ORIGIN. Those two
> conditions are checked in a single statements, but as we are going to
> add a third condition, let's split this up a bit:
>
> - If we have a RPATH to $(HOST_DIR)/lib -> we're good, return 0
> - If we have a RPATH to $ORIGIN/../lib -> we're good, return 0
> - Otherwise, we will exit the loop, and return 1
>
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Regards,
Yann E. MORIN.
> ---
> support/scripts/check-host-rpath | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/support/scripts/check-host-rpath b/support/scripts/check-host-rpath
> index 169628decb..6c5767da05 100755
> --- a/support/scripts/check-host-rpath
> +++ b/support/scripts/check-host-rpath
> @@ -63,7 +63,8 @@ check_elf_has_rpath() {
> for dir in ${rpath//:/ }; do
> # Remove duplicate and trailing '/' for proper match
> dir="$( sed -r -e 's:/+:/:g; s:/$::;' <<<"${dir}" )"
> - [ "${dir}" = "${hostdir}/lib" -o "${dir}" = "\$ORIGIN/../lib" ] && return 0
> + [ "${dir}" = "${hostdir}/lib" ] && return 0
> + [ "${dir}" = "\$ORIGIN/../lib" ] && return 0
> done
> done < <( readelf -d "${file}" \
> |sed -r -e '/.* \(R(UN)?PATH\) +Library r(un)?path: \[(.+)\]$/!d' \
> --
> 2.19.1
>
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
next prev parent reply other threads:[~2018-11-15 20:58 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-14 10:55 [Buildroot] [PATCH next v4 0/6] Per-package host/target directory support Thomas Petazzoni
2018-11-14 10:55 ` [Buildroot] [PATCH next v4 1/6] Makefile: evaluate CCACHE and HOST{CC, CXX} at time of use Thomas Petazzoni
2018-11-15 20:49 ` Yann E. MORIN
2018-11-14 10:55 ` [Buildroot] [PATCH next v4 2/6] support/scripts/check-host-rpath: split condition on two statements Thomas Petazzoni
2018-11-15 20:58 ` Yann E. MORIN [this message]
2018-11-14 10:55 ` [Buildroot] [PATCH next v4 3/6] Makefile: rework main directory creation logic Thomas Petazzoni
2018-11-15 21:09 ` Yann E. MORIN
2018-11-16 14:08 ` Thomas Petazzoni
2018-11-16 1:21 ` Matthew Weber
2018-11-16 14:15 ` Thomas Petazzoni
2018-11-16 15:14 ` Thomas Petazzoni
2018-11-20 22:08 ` Matthew Weber
2018-11-27 6:24 ` Christian Stewart
2018-11-14 10:55 ` [Buildroot] [PATCH next v4 4/6] Makefile: move .NOTPARALLEL statement after including .config file Thomas Petazzoni
2018-11-15 21:37 ` Yann E. MORIN
2018-11-16 8:53 ` Thomas Petazzoni
2018-11-14 10:55 ` [Buildroot] [PATCH next v4 5/6] Makefile: define TARGET_DIR_WARNING_FILE relative to TARGET_DIR Thomas Petazzoni
2018-11-14 10:55 ` [Buildroot] [PATCH next v4 6/6] core: implement per-package SDK and target Thomas Petazzoni
2018-11-15 16:41 ` Andreas Naumann
2018-11-16 13:47 ` Thomas Petazzoni
2018-11-16 15:22 ` Thomas De Schampheleire
2018-11-16 19:57 ` Yann E. MORIN
2018-11-18 21:55 ` Arnout Vandecappelle
2018-11-19 10:48 ` Thomas Petazzoni
2018-11-19 14:27 ` Andreas Naumann
2018-11-19 19:49 ` Yann E. MORIN
2018-11-20 10:22 ` Arnout Vandecappelle
2018-11-20 10:29 ` Thomas Petazzoni
2018-11-20 16:18 ` Thomas Petazzoni
2018-11-20 16:19 ` Thomas Petazzoni
2018-11-15 14:37 ` [Buildroot] [PATCH next v4 0/6] Per-package host/target directory support Thomas Petazzoni
2018-11-15 16:41 ` Andreas Naumann
2018-11-16 14:43 ` Thomas Petazzoni
2018-11-19 14:17 ` Andreas Naumann
2018-11-19 13:30 ` Arnout Vandecappelle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181115205830.GQ10271@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.