Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH] native/cross: make ar wrapper support to read options from file
@ 2021-12-02  8:37 Hongxu Jia
  2021-12-02  8:49 ` Jacob Kroon
  0 siblings, 1 reply; 3+ messages in thread
From: Hongxu Jia @ 2021-12-02  8:37 UTC (permalink / raw)
  To: openembedded-core; +Cc: jacob.kroon, richard.purdie

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] == '-':
-- 
2.33.0



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

end of thread, other threads:[~2021-12-02  8:59 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2021-12-02  8:59   ` Jia, Hongxu

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