[PATCH v2 0/2] target/hexagon: Fix macOS build

Anton Johansson via posted 2 patches 7 months, 2 weeks ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/patchew-project/qemu tags/patchew/20250402114259.21953-1-anjo@rev.ng
Maintainers: Brian Cain <brian.cain@oss.qualcomm.com>
target/hexagon/idef-parser/prepare | 24 ------------------------
target/hexagon/meson.build         |  5 +++--
2 files changed, 3 insertions(+), 26 deletions(-)
delete mode 100755 target/hexagon/idef-parser/prepare
[PATCH v2 0/2] target/hexagon: Fix macOS build
Posted by Anton Johansson via 7 months, 2 weeks ago
A default macOS build with xcode cli tools installed lacks the `indent`
program needed by the idef-parser postprocess step. If `indent` is
installed through homebrew it doesn't support the `-linux` flag.
Conditionally run `indent` only on linux hosts.

Additionally `cpp` used by the idef-parser preprocess step expands into
`clang ... -traditional-cpp` and doesn't support macro concatenation
among other things, replace it with a meson custom_target running
`${compiler} -E`.

fixes: https://lore.kernel.org/qemu-devel/d95ebf5d-c1f6-42c5-8aeb-65764fa87125@linaro.org/

Note: default bison on macOS is still too old (v2.3 vs v3.0) and a newer
version needs to be installed via homebrew. I'll take a look at
supporting v2.3.

Changes in v2:
  * Don't remove the indent step but only run on linux hosts.

Anton Johansson (2):
  target/hexagon: Replace `prepare` script with meson target
  target/hexagon: Only indent on linux

 target/hexagon/idef-parser/prepare | 24 ------------------------
 target/hexagon/meson.build         |  5 +++--
 2 files changed, 3 insertions(+), 26 deletions(-)
 delete mode 100755 target/hexagon/idef-parser/prepare

-- 
2.47.1
Re: [PATCH v2 0/2] target/hexagon: Fix macOS build
Posted by Brian Cain 7 months, 2 weeks ago
On 4/2/2025 6:42 AM, Anton Johansson wrote:
> A default macOS build with xcode cli tools installed lacks the `indent`
> program needed by the idef-parser postprocess step. If `indent` is
> installed through homebrew it doesn't support the `-linux` flag.
> Conditionally run `indent` only on linux hosts.
>
> Additionally `cpp` used by the idef-parser preprocess step expands into
> `clang ... -traditional-cpp` and doesn't support macro concatenation
> among other things, replace it with a meson custom_target running
> `${compiler} -E`.
>
> fixes: https://lore.kernel.org/qemu-devel/d95ebf5d-c1f6-42c5-8aeb-65764fa87125@linaro.org/
>
> Note: default bison on macOS is still too old (v2.3 vs v3.0) and a newer
> version needs to be installed via homebrew. I'll take a look at
> supporting v2.3.
>
> Changes in v2:
>    * Don't remove the indent step but only run on linux hosts.


Thanks: this series is queued on the "hex-next-express" branch at 
https://github.com/quic/qemu/

> Anton Johansson (2):
>    target/hexagon: Replace `prepare` script with meson target
>    target/hexagon: Only indent on linux
>
>   target/hexagon/idef-parser/prepare | 24 ------------------------
>   target/hexagon/meson.build         |  5 +++--
>   2 files changed, 3 insertions(+), 26 deletions(-)
>   delete mode 100755 target/hexagon/idef-parser/prepare
>