Am 08.02.21 um 10:35 schrieb Paolo Bonzini:
On 08/02/21 10:20, Peter Maydell wrote:
+
+if get_option('tcg_interpreter')
+ libffi = dependency('libffi', version: '>=3.0',
+ static: enable_static, method: 'pkg-config',
+ required: true)
+ specific_ss.add(libffi)
+ specific_ss.add(files('tcg/tci.c'))
+endif
Did you need a PKG_CONFIG_LIBDIR set for homebrew?
Is this the "meson doesn't actually add the cflags everywhere it
should"
bug again ?
No, it shouldn't be the same bug. In this case the dependency is not
indirect dependency, specific_ss is included directly:
target_specific = specific_ss.apply(config_target, strict: false)
arch_srcs += target_specific.sources()
arch_deps += target_specific.dependencies()
lib = static_library('qemu-' + target,
sources: arch_srcs + genh,
dependencies: arch_deps,
objects: objects,
include_directories: target_inc,
c_args: c_args,
build_by_default: false,
name_suffix: 'fa')
It's more likely to be what Stefan pointed out later:
Meanwhile I noticed an additional detail:
There exist two different pkg-config configurations for libffi on
Homebrew:
% pkg-config --cflags libffi
-I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/ffi
% export PKG_CONFIG_PATH="/opt/homebrew/opt/libffi/lib/pkgconfig"
% pkg-config --cflags libffi
-I/opt/homebrew/Cellar/libffi/3.3_2/include
By default it points to a system directory which does not exist at all
on my Mac, so that will never work.
Paolo
Yes, it looks like setting the right PKG_CONFIG_PATH is sufficient for
builds with Homebrew on macOS.
Richard, this commit is also the one which breaks qemu-system-i386 on
sparc64 for me:
sw@gcc102:~/src/gitlab/qemu-project/qemu$ git bisect good
115a01c323e6a01902894ec23ba704bf3dc8215a is the first bad commit
commit 115a01c323e6a01902894ec23ba704bf3dc8215a
Author: Richard Henderson <richard.hender...@linaro.org>
Date: Sat Jan 30 14:24:25 2021 -0800
tcg/tci: Use ffi for calls
This requires adjusting where arguments are stored.
Place them on the stack at left-aligned positions.
Adjust the stack frame to be at entirely positive offsets.
Signed-off-by: Richard Henderson <richard.hender...@linaro.org>
include/tcg/tcg.h | 1 +
tcg/tcg.c | 72 +++++++++++++++-----------
tcg/tci.c | 131
++++++++++++++++++++++++++---------------------
tcg/tci/tcg-target.c.inc | 50 +++++++++---------
tcg/tci/tcg-target.h | 2 +-
5 files changed, 143 insertions(+), 113 deletions(-)
Regards,
Stefan