From: Jacob Kroon <jacob.kroon@gmail.com>
To: Hongxu Jia <hongxu.jia@windriver.com>,
openembedded-core@lists.openembedded.org
Cc: richard.purdie@linuxfoundation.org
Subject: Re: [PATCH] native/cross: make ar wrapper support to read options from file
Date: Thu, 2 Dec 2021 09:49:24 +0100 [thread overview]
Message-ID: <accb2806-163e-e29d-46f7-705771a231f8@gmail.com> (raw)
In-Reply-To: <20211202083742.69650-1-hongxu.jia@windriver.com>
On 12/2/21 09:37, Hongxu Jia wrote:
> If ar input params starts with @, it means to read options from file
> $ ar -h
> ...
> @<file> - read options from <file>
> ...
>
> It failed to call ar wrapper to read options from file:
> $ path_to/oe-core/scripts/native-intercept/ar @bazel-out/k8-opt/bin/external/llvm-project/llvm/libSupport.a-2.params
> |path_to/oe-core/scripts/native-intercept/ar: invalid option -- '@'
> | Usage: path_to/oe-core/scripts/native-intercept/ar [emulation options]
> [-]{dmpqrstx}[abcDfilMNoPsSTuvV] [--plugin <name>] [member-name] [count] archive-file file...
>
> If input params start with @, append option -D to argv list
>
> Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
> ---
> scripts/native-intercept/ar | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/scripts/native-intercept/ar b/scripts/native-intercept/ar
> index dcc623e3ed..32f45171d6 100755
> --- a/scripts/native-intercept/ar
> +++ b/scripts/native-intercept/ar
> @@ -19,6 +19,8 @@ argv = sys.argv
> if argv[1].startswith('--'):
> # No modifier given
> None
> +elif argv[1].startswith('@'):
> + argv.append('-D')
> else:
> # remove the optional '-'
> if argv[1][0] == '-':
>
I am a little surprised this works, since "-D" would be placed after any
archive/member parameters. But if does, ok.
Otherwise maybe we should just give up if there is a '@' and fallback to
not modifying the args, unless we want to process the file itself in the
wrapper.
Jacob
next prev parent reply other threads:[~2021-12-02 8:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-02 8:37 [PATCH] native/cross: make ar wrapper support to read options from file Hongxu Jia
2021-12-02 8:49 ` Jacob Kroon [this message]
2021-12-02 8:59 ` Jia, Hongxu
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=accb2806-163e-e29d-46f7-705771a231f8@gmail.com \
--to=jacob.kroon@gmail.com \
--cc=hongxu.jia@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
/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.