All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] target/hexagon: use cmd_array() instead of get_id()
@ 2026-06-22  5:21 Brian Cain
  2026-06-22  7:40 ` Philippe Mathieu-Daudé
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Brian Cain @ 2026-06-22  5:21 UTC (permalink / raw)
  To: qemu-devel; +Cc: Brian Cain, stefanha, Pierrick Bouvier, anjo, ale

get_id() returns the compiler's short name not a program.
Passing it directly as the command for the idef-parser preprocessing
custom_target happened to work for native gcc/clang builds but
breaks under cross compilers such as emcc or any ccache-wrapped compiler.

Link: https://lore.kernel.org/qemu-devel/CAJSP0QWzQEgoYMCgZX+9jCvrV6O3RqnA+df1DpT2R6MZvVXiNg@mail.gmail.com/
Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
---
 target/hexagon/meson.build | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/hexagon/meson.build b/target/hexagon/meson.build
index d169cf71b2f..ff22b4e4706 100644
--- a/target/hexagon/meson.build
+++ b/target/hexagon/meson.build
@@ -270,13 +270,13 @@ if idef_parser_enabled and 'hexagon-linux-user' in target_dirs
         command: [python, files('gen_idef_parser_funcs.py'), semantics_generated, '@OUTPUT@'],
     )
 
-    compiler = meson.get_compiler('c').get_id()
+    compiler = meson.get_compiler('c').cmd_array()
     preprocessed_idef_parser_input_generated = custom_target(
         'idef_parser_input.preprocessed.h.inc',
         output: 'idef_parser_input.preprocessed.h.inc',
         input: idef_parser_input_generated,
         depend_files: [idef_parser_dir / 'macros.h.inc'],
-        command: [compiler, '-x', 'c', '-E', '-I', idef_parser_dir, '-o', '@OUTPUT@', '@INPUT@'],
+        command: compiler + ['-x', 'c', '-E', '-I', idef_parser_dir, '-o', '@OUTPUT@', '@INPUT@'],
     )
 
     flex = generator(
-- 
2.34.1


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

* Re: [PATCH] target/hexagon: use cmd_array() instead of get_id()
  2026-06-22  5:21 [PATCH] target/hexagon: use cmd_array() instead of get_id() Brian Cain
@ 2026-06-22  7:40 ` Philippe Mathieu-Daudé
  2026-06-22 14:26 ` Stefan Hajnoczi
  2026-06-22 17:11 ` Pierrick Bouvier
  2 siblings, 0 replies; 4+ messages in thread
From: Philippe Mathieu-Daudé @ 2026-06-22  7:40 UTC (permalink / raw)
  To: Brian Cain, qemu-devel; +Cc: stefanha, Pierrick Bouvier, anjo, ale

On 22/6/26 07:21, Brian Cain wrote:
> get_id() returns the compiler's short name not a program.
> Passing it directly as the command for the idef-parser preprocessing
> custom_target happened to work for native gcc/clang builds but
> breaks under cross compilers such as emcc or any ccache-wrapped compiler.
> 
> Link: https://lore.kernel.org/qemu-devel/CAJSP0QWzQEgoYMCgZX+9jCvrV6O3RqnA+df1DpT2R6MZvVXiNg@mail.gmail.com/
> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
> ---
>   target/hexagon/meson.build | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <philmd@oss.qualcomm.com>


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

* Re: [PATCH] target/hexagon: use cmd_array() instead of get_id()
  2026-06-22  5:21 [PATCH] target/hexagon: use cmd_array() instead of get_id() Brian Cain
  2026-06-22  7:40 ` Philippe Mathieu-Daudé
@ 2026-06-22 14:26 ` Stefan Hajnoczi
  2026-06-22 17:11 ` Pierrick Bouvier
  2 siblings, 0 replies; 4+ messages in thread
From: Stefan Hajnoczi @ 2026-06-22 14:26 UTC (permalink / raw)
  To: Brian Cain; +Cc: qemu-devel, Pierrick Bouvier, anjo, ale

[-- Attachment #1: Type: text/plain, Size: 665 bytes --]

On Sun, Jun 21, 2026 at 10:21:20PM -0700, Brian Cain wrote:
> get_id() returns the compiler's short name not a program.
> Passing it directly as the command for the idef-parser preprocessing
> custom_target happened to work for native gcc/clang builds but
> breaks under cross compilers such as emcc or any ccache-wrapped compiler.
> 
> Link: https://lore.kernel.org/qemu-devel/CAJSP0QWzQEgoYMCgZX+9jCvrV6O3RqnA+df1DpT2R6MZvVXiNg@mail.gmail.com/
> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
> ---
>  target/hexagon/meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: [PATCH] target/hexagon: use cmd_array() instead of get_id()
  2026-06-22  5:21 [PATCH] target/hexagon: use cmd_array() instead of get_id() Brian Cain
  2026-06-22  7:40 ` Philippe Mathieu-Daudé
  2026-06-22 14:26 ` Stefan Hajnoczi
@ 2026-06-22 17:11 ` Pierrick Bouvier
  2 siblings, 0 replies; 4+ messages in thread
From: Pierrick Bouvier @ 2026-06-22 17:11 UTC (permalink / raw)
  To: Brian Cain, qemu-devel; +Cc: stefanha, anjo, ale

On 6/21/2026 10:21 PM, Brian Cain wrote:
> get_id() returns the compiler's short name not a program.
> Passing it directly as the command for the idef-parser preprocessing
> custom_target happened to work for native gcc/clang builds but
> breaks under cross compilers such as emcc or any ccache-wrapped compiler.
> 
> Link: https://lore.kernel.org/qemu-devel/CAJSP0QWzQEgoYMCgZX+9jCvrV6O3RqnA+df1DpT2R6MZvVXiNg@mail.gmail.com/
> Signed-off-by: Brian Cain <brian.cain@oss.qualcomm.com>
> ---
>  target/hexagon/meson.build | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/target/hexagon/meson.build b/target/hexagon/meson.build
> index d169cf71b2f..ff22b4e4706 100644
> --- a/target/hexagon/meson.build
> +++ b/target/hexagon/meson.build
> @@ -270,13 +270,13 @@ if idef_parser_enabled and 'hexagon-linux-user' in target_dirs
>          command: [python, files('gen_idef_parser_funcs.py'), semantics_generated, '@OUTPUT@'],
>      )
>  
> -    compiler = meson.get_compiler('c').get_id()
> +    compiler = meson.get_compiler('c').cmd_array()
>      preprocessed_idef_parser_input_generated = custom_target(
>          'idef_parser_input.preprocessed.h.inc',
>          output: 'idef_parser_input.preprocessed.h.inc',
>          input: idef_parser_input_generated,
>          depend_files: [idef_parser_dir / 'macros.h.inc'],
> -        command: [compiler, '-x', 'c', '-E', '-I', idef_parser_dir, '-o', '@OUTPUT@', '@INPUT@'],
> +        command: compiler + ['-x', 'c', '-E', '-I', idef_parser_dir, '-o', '@OUTPUT@', '@INPUT@'],
>      )
>  
>      flex = generator(

Reviewed-by: Pierrick Bouvier <pierrick.bouvier@oss.qualcomm.com>



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

end of thread, other threads:[~2026-06-22 17:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-22  5:21 [PATCH] target/hexagon: use cmd_array() instead of get_id() Brian Cain
2026-06-22  7:40 ` Philippe Mathieu-Daudé
2026-06-22 14:26 ` Stefan Hajnoczi
2026-06-22 17:11 ` Pierrick Bouvier

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.