[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 19/51] contrib/plugins: add Darwin support
From: |
Paolo Bonzini |
Subject: |
[PULL 19/51] contrib/plugins: add Darwin support |
Date: |
Thu, 7 Sep 2023 14:59:28 +0200 |
Under Darwin, using -shared makes it impossible to have undefined symbols
and -bundle has to be used instead; so detect the OS and use
different options.
Based-on: <20230907101811.469236-1-pbonzini@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
contrib/plugins/Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile
index db1bd04dfa6..c26fa08441e 100644
--- a/contrib/plugins/Makefile
+++ b/contrib/plugins/Makefile
@@ -37,7 +37,11 @@ all: $(SONAMES)
$(CC) $(CFLAGS) -c -o $@ $<
lib%.so: %.o
+ifeq ($(CONFIG_DARWIN),y)
+ $(CC) -bundle -Wl,-undefined,dynamic_lookup -o $@ $^ $(LDLIBS)
+else
$(CC) -shared -o $@ $^ $(LDLIBS)
+endif
clean:
rm -f *.o *.so *.d
--
2.41.0
- [PULL 24/51] meson: compile bundled device trees, (continued)
- [PULL 24/51] meson: compile bundled device trees, Paolo Bonzini, 2023/09/07
- Re: [PULL 24/51] meson: compile bundled device trees, Philippe Mathieu-Daudé, 2023/09/08
- Re: [PULL 24/51] meson: compile bundled device trees, Michael Tokarev, 2023/09/08
- Re: [PULL 24/51] meson: compile bundled device trees, BALATON Zoltan, 2023/09/08
- Re: [PULL 24/51] meson: compile bundled device trees, Michael Tokarev, 2023/09/08
- Re: [PULL 24/51] meson: compile bundled device trees, BALATON Zoltan, 2023/09/08
- Re: [PULL 24/51] meson: compile bundled device trees, Philippe Mathieu-Daudé, 2023/09/11
- Re: [PULL 24/51] meson: compile bundled device trees, Peter Maydell, 2023/09/11
[PULL 13/51] util/async-teardown.c: move to softmmu/, only build it when system build is requested, Paolo Bonzini, 2023/09/07
[PULL 18/51] contrib/plugins/lockstep: Fix string format, Paolo Bonzini, 2023/09/07
[PULL 19/51] contrib/plugins: add Darwin support,
Paolo Bonzini <=
[PULL 22/51] configure: remove HOST_CC, Paolo Bonzini, 2023/09/07
[PULL 26/51] configure: move --enable-debug-tcg to meson, Paolo Bonzini, 2023/09/07
[PULL 23/51] configure: create native file with contents of $host_cc, Paolo Bonzini, 2023/09/07
[PULL 27/51] contrib/plugins: use an independent makefile, Paolo Bonzini, 2023/09/07
[PULL 30/51] configure, meson: remove CONFIG_SOLARIS from config-host.mak, Paolo Bonzini, 2023/09/07
[PULL 32/51] meson: list leftover CONFIG_* symbols, Paolo Bonzini, 2023/09/07
[PULL 29/51] configure, meson: move --enable-plugins to meson, Paolo Bonzini, 2023/09/07
[PULL 31/51] configure, meson: remove target OS symbols from config-host.mak, Paolo Bonzini, 2023/09/07
[PULL 35/51] mkvenv: assume presence of importlib.metadata, Paolo Bonzini, 2023/09/07
[PULL 34/51] Python: Drop support for Python 3.7, Paolo Bonzini, 2023/09/07