Skip to content
Snippets Groups Projects
Commit f6feb021 authored by Paolo Bonzini's avatar Paolo Bonzini
Browse files

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: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 3045019f
No related branches found
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment