* [PATCH] contrib/plugins: remove -soname argument
@ 2023-09-07 10:18 Paolo Bonzini
2023-09-07 10:47 ` Philippe Mathieu-Daudé
2023-09-09 17:21 ` Richard Henderson
0 siblings, 2 replies; 3+ messages in thread
From: Paolo Bonzini @ 2023-09-07 10:18 UTC (permalink / raw)
To: qemu-devel; +Cc: alex.bennee
-soname is not needed for runtime-loaded modules. For example, Meson says:
if not isinstance(target, build.SharedModule) or target.force_soname:
# Add -Wl,-soname arguments on Linux, -install_name on OS X
commands += linker.get_soname_args(
self.environment, target.prefix, target.name, target.suffix,
target.soversion, target.darwin_versions)
(force_soname is set is shared modules are linked into a build target, which is not
the case here.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
---
contrib/plugins/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile
index b2b9db9f51a..db1bd04dfa6 100644
--- a/contrib/plugins/Makefile
+++ b/contrib/plugins/Makefile
@@ -37,7 +37,7 @@ all: $(SONAMES)
$(CC) $(CFLAGS) -c -o $@ $<
lib%.so: %.o
- $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS)
+ $(CC) -shared -o $@ $^ $(LDLIBS)
clean:
rm -f *.o *.so *.d
--
2.41.0
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] contrib/plugins: remove -soname argument
2023-09-07 10:18 [PATCH] contrib/plugins: remove -soname argument Paolo Bonzini
@ 2023-09-07 10:47 ` Philippe Mathieu-Daudé
2023-09-09 17:21 ` Richard Henderson
1 sibling, 0 replies; 3+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-09-07 10:47 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: alex.bennee
On 7/9/23 12:18, Paolo Bonzini wrote:
> -soname is not needed for runtime-loaded modules. For example, Meson says:
>
> if not isinstance(target, build.SharedModule) or target.force_soname:
> # Add -Wl,-soname arguments on Linux, -install_name on OS X
> commands += linker.get_soname_args(
> self.environment, target.prefix, target.name, target.suffix,
> target.soversion, target.darwin_versions)
>
> (force_soname is set is shared modules are linked into a build target, which is not
> the case here.
>
> Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
> ---
> contrib/plugins/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/contrib/plugins/Makefile b/contrib/plugins/Makefile
> index b2b9db9f51a..db1bd04dfa6 100644
> --- a/contrib/plugins/Makefile
> +++ b/contrib/plugins/Makefile
> @@ -37,7 +37,7 @@ all: $(SONAMES)
> $(CC) $(CFLAGS) -c -o $@ $<
>
> lib%.so: %.o
> - $(CC) -shared -Wl,-soname,$@ -o $@ $^ $(LDLIBS)
> + $(CC) -shared -o $@ $^ $(LDLIBS)
This fixes on Darwin:
ld: unknown option: -soname
clang: error: linker command failed with exit code 1 (use -v to see
invocation)
make: *** [plugins] Error 2
Tested-by: Philippe Mathieu-Daudé <philmd@linaro.org>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH] contrib/plugins: remove -soname argument
2023-09-07 10:18 [PATCH] contrib/plugins: remove -soname argument Paolo Bonzini
2023-09-07 10:47 ` Philippe Mathieu-Daudé
@ 2023-09-09 17:21 ` Richard Henderson
1 sibling, 0 replies; 3+ messages in thread
From: Richard Henderson @ 2023-09-09 17:21 UTC (permalink / raw)
To: Paolo Bonzini, qemu-devel; +Cc: alex.bennee
On 9/7/23 03:18, Paolo Bonzini wrote:
> -soname is not needed for runtime-loaded modules. For example, Meson says:
>
> if not isinstance(target, build.SharedModule) or target.force_soname:
> # Add -Wl,-soname arguments on Linux, -install_name on OS X
> commands += linker.get_soname_args(
> self.environment, target.prefix, target.name, target.suffix,
> target.soversion, target.darwin_versions)
>
> (force_soname is set is shared modules are linked into a build target, which is not
> the case here.
>
> Signed-off-by: Paolo Bonzini<pbonzini@redhat.com>
> ---
> contrib/plugins/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
r~
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-09-09 17:22 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-07 10:18 [PATCH] contrib/plugins: remove -soname argument Paolo Bonzini
2023-09-07 10:47 ` Philippe Mathieu-Daudé
2023-09-09 17:21 ` Richard Henderson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).