Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] libtommath: add -fPIC
Date: Sun, 1 May 2016 09:35:05 +0200	[thread overview]
Message-ID: <20160501093505.5e98c1b4@free-electrons.com> (raw)
In-Reply-To: <87pot6swzx.fsf@dell.be.48ers.dk>

Hello,

On Sat, 30 Apr 2016 21:43:46 +0200, Peter Korsgaard wrote:

>  > Well, as you've seen yourself, this static library is then used inside
>  > a shared library, so it has to be built -fPIC.  
> 
>  > If you want to build the static library without -fPIC, then the
>  > libtommath package should also provide a shared version of its library,
>  > so that it gets used instead of the static one when linked into a
>  > shared library.  
> 
> Hmm, should we do this for all static only libraries in case they would
> ever get used by a shared library? E.G. ezxml is a similar package.

Well, as soon as some object code ends up being used in a shared
library (directly or via linking to a static library), then it must be
compiled with -fPIC, at least on some architectures (x86_64 and mips
are the one who clearly abort the build if that's not the case).

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

  reply	other threads:[~2016-05-01  7:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-30  8:33 [Buildroot] [PATCH] libtommath: add -fPIC Francois Perrad
2016-04-30 12:55 ` Thomas Petazzoni
2016-04-30 18:43   ` Peter Korsgaard
2016-04-30 19:13     ` Thomas Petazzoni
2016-04-30 19:43       ` Peter Korsgaard
2016-05-01  7:35         ` Thomas Petazzoni [this message]
2016-05-01  6:49     ` François Perrad

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=20160501093505.5e98c1b4@free-electrons.com \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /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