mirror of
https://gitlab.com/qemu-project/qemu
synced 2024-11-05 20:35:44 +00:00
contrib/plugins: add Darwin support
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>
This commit is contained in:
parent
3045019fc9
commit
f6feb021e2
1 changed files with 4 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue