From: "Philippe Mathieu-Daudé" <philmd@linaro.org>
To: Paolo Bonzini <pbonzini@redhat.com>, qemu-devel@nongnu.org
Cc: alex.bennee@linaro.org
Subject: Re: [PATCH] contrib/plugins: remove -soname argument
Date: Thu, 7 Sep 2023 12:47:58 +0200 [thread overview]
Message-ID: <7459b394-b136-e892-a19a-38b08dc1a3a0@linaro.org> (raw)
In-Reply-To: <20230907101811.469236-1-pbonzini@redhat.com>
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>
next prev parent reply other threads:[~2023-09-07 10:49 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-09-07 10:18 [PATCH] contrib/plugins: remove -soname argument Paolo Bonzini
2023-09-07 10:47 ` Philippe Mathieu-Daudé [this message]
2023-09-09 17:21 ` Richard Henderson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=7459b394-b136-e892-a19a-38b08dc1a3a0@linaro.org \
--to=philmd@linaro.org \
--cc=alex.bennee@linaro.org \
--cc=pbonzini@redhat.com \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).