Fix linking shared library with its dependencies (#7320)

Signed-off-by: Artur Bieniek <abieniek@antmicro.com>
This commit is contained in:
Artur Bieniek 2026-03-25 12:15:24 +01:00 committed by GitHub
parent d33a81d32a
commit 860ac67c04
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 2 deletions

View File

@ -770,10 +770,11 @@ public:
// So add dynamic_lookup
of.puts("ifeq ($(shell uname -s),Darwin)\n");
of.puts("\t$(OBJCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPT_FAST) -undefined "
"dynamic_lookup -shared $(LDFLAGS) -flat_namespace -o $@ $^ $(LIBS)\n");
"dynamic_lookup -shared $(LDFLAGS) -flat_namespace -o $@ $^ $(LDLIBS) "
"$(LIBS)\n");
of.puts("else\n");
of.puts("\t$(OBJCACHE) $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(OPT_FAST) -shared "
"$(LDFLAGS) -o $@ $^ $(LIBS)\n");
"$(LDFLAGS) -o $@ $^ $(LDLIBS) $(LIBS)\n");
of.puts("endif\n");
of.puts("\n");
of.puts("lib" + v3Global.opt.libCreate() + ": " + v3Global.opt.libCreateName(false)