From: Adrian Bunk <bunk@stusta.de>
To: Khem Raj <raj.khem@gmail.com>
Cc: OE Core mailing list <openembedded-core@lists.openembedded.org>
Subject: Re: [PATCH] pseudo: Drop static linking to sqlite3
Date: Mon, 11 Nov 2019 18:36:02 +0200 [thread overview]
Message-ID: <20191111163602.GH28797@localhost> (raw)
In-Reply-To: <dc84f473235ec05f06914abf4d8793c23ed08640.camel@gmail.com>
On Mon, Nov 11, 2019 at 07:59:43AM -0800, Khem Raj wrote:
> On Mon, 2019-11-11 at 05:04 -0800, Andre McCurdy wrote:
> >
> > With this merged, we can also drop the hack to force the sqlite
> > static
> > lib to be PIC:
> >
> >
> > https://git.openembedded.org/openembedded-core/commit/?id=6a58e12d19c539deac9e90679a68438497a42fa4
>
> That would be good but a caution is that if pseudo is just one usecase
> here which brought this issue forward, since we use PIE by default this
> would come up elsewhere too
The only usecase for building a static library as PIC I am aware of is
when you want to link the static library into a shared library.
Usually linking a static library into a shared library is a bug and
the link error is preferable since you actually intended to link
with the shared library (the linker automatically uses a static
library when it can't find a shared library).
There are rare exceptions when this is done intentionally.
Linking a static libsqlite3.a into libpseudo.so was such an exception.
Whether the non-PIC code is PIE or not does not make a difference.
cu
Adrian
--
"Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
"Only a promise," Lao Er said.
Pearl S. Buck - Dragon Seed
next prev parent reply other threads:[~2019-11-11 16:36 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-11-09 15:35 [PATCH] pseudo: Drop static linking to sqlite3 Richard Purdie
2019-11-09 16:07 ` Seebs
2019-11-09 16:30 ` Richard Purdie
2019-11-09 16:46 ` Seebs
2019-11-11 13:04 ` Andre McCurdy
2019-11-11 15:59 ` Khem Raj
2019-11-11 16:36 ` Adrian Bunk [this message]
2019-11-11 17:19 ` Khem Raj
2019-11-11 14:17 ` Mark Hatle
2019-11-11 16:34 ` Seebs
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=20191111163602.GH28797@localhost \
--to=bunk@stusta.de \
--cc=openembedded-core@lists.openembedded.org \
--cc=raj.khem@gmail.com \
/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