[bonnibel] Add SONAME to shared objects

Add -soname to the linker options when making shared libraries, so that they
have a SONAME string in their DYNAMIC section.
This commit is contained in:
Justin C. Miller
2024-02-13 22:33:51 -08:00
parent c05b4211fa
commit 4abcf238a0
2 changed files with 3 additions and 2 deletions

View File

@@ -47,7 +47,7 @@ rule driver
description = Linking driver [$target]:$name description = Linking driver [$target]:$name
rule lib rule lib
command = $ld -shared $ldflags -o $out $in $libs command = $ld -shared -soname $soname $ldflags -o $out $in $libs
description = Linking [$target]:$name description = Linking [$target]:$name
rule lib_static rule lib_static

View File

@@ -298,7 +298,8 @@ class Module:
inputs = inputs, inputs = inputs,
implicit = modopts.implicit, implicit = modopts.implicit,
order_only = modopts.order_only, order_only = modopts.order_only,
variables = {"name": self.name}, variables = {"name": self.name,
"soname": self.get_output()},
) )
dump = output + ".dump" dump = output + ".dump"