Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 1/2] bfin: remove the dependency of flat shared mode to shared library
Date: Tue, 24 Mar 2015 20:09:09 +0100	[thread overview]
Message-ID: <5511B655.9020800@mind.be> (raw)
In-Reply-To: <CAJxxZ0OGa0OcPUXSJapo51ft0juQVWPYOJxM5Xx0aTCxFriVqQ@mail.gmail.com>

On 23/03/15 03:43, Sonic Zhang wrote:
> Hi Thomas,
> 
> On Sat, Mar 21, 2015 at 5:45 AM, Thomas Petazzoni
> <thomas.petazzoni@free-electrons.com> wrote:
>> Dear Sonic Zhang,
>>
>> On Wed, 18 Mar 2015 16:59:15 +0800, Sonic Zhang wrote:
>>> From: Sonic Zhang <sonic.zhang@analog.com>
>>>
>>> Blackfin flat shared library isn't generated and linked in the same way
>>> as the ELF shared library. So, don't mark it depend on the static library
>>> only.
>>>
>>> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
>>> ---
>>>  arch/Config.in |    1 -
>>>  1 file changed, 1 deletion(-)
>>>
>>> diff --git a/arch/Config.in b/arch/Config.in
>>> index 16ad8be..6179960 100644
>>> --- a/arch/Config.in
>>> +++ b/arch/Config.in
>>> @@ -295,7 +295,6 @@ config BR2_BINFMT_FLAT_SEP_DATA
>>>
>>>  config BR2_BINFMT_FLAT_SHARED
>>>       bool "Shared binary"
>>> -     select BR2_BINFMT_SUPPORTS_SHARED
>>
>> If you don't select BR2_BINFMT_SUPPORTS_SHARED, then the only available
>> option amongst: static libs, static libs + shared libs, shared libs is
>> "static libs", which means that the "-static" flag is always passed. If
>> that's OK, then I'm fine with the patch.
>>
> Yes, -static is OK in the link flag for FLAT shared mode.

 But then it won't generate dynamically linked executables, right?


>> The second sentence of your commit log is confusing however. You say
>> "don't mark it depend on the static library only". But it is exactly
>> what your patch is doing: since it's no longer select
>> BR2_BINFMT_SUPPORTS_SHARED, it means that after your patch is applied,
>> when BR2_BINFMT_FLAT_SHARED is used, the *only* possibility is static
>> library only.
> 
> Sorry for the typo error. Should be "mark it depend on the static
> library only"".

 The problem is the following: when we say 'depends on !STATIC', that typically
means that the package is using dlopen, which is not possible with FLAT. So it
would be wrong to say that FLAT selects BR2_STATIC_LIBS.

 The right solution would be to introduce something else for dlopen, and rename
all the BR2_STATIC_LIBS dependencies to that new symbol.


 Regards,
 Arnout


-- 
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F

  reply	other threads:[~2015-03-24 19:09 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-18  8:59 [Buildroot] [PATCH 1/2] bfin: remove the dependency of flat shared mode to shared library Sonic Zhang
2015-03-18  8:59 ` [Buildroot] [PATCH 2/2] bfin: put the libc link path of the flat shared and sep data formats before the sysroot link path Sonic Zhang
2015-03-20 21:42   ` Thomas Petazzoni
2015-03-23  2:57     ` Sonic Zhang
2015-12-29 21:01   ` Thomas Petazzoni
     [not found]     ` <B168F8A49F4BCF4C84FD23DA5F6363EE75D82F29@NWD2MBX7.ad.analog.com>
2015-12-30  8:53       ` Thomas Petazzoni
2015-03-20 21:45 ` [Buildroot] [PATCH 1/2] bfin: remove the dependency of flat shared mode to shared library Thomas Petazzoni
2015-03-23  2:43   ` Sonic Zhang
2015-03-24 19:09     ` Arnout Vandecappelle [this message]
2015-03-26  8:55       ` Sonic Zhang
2015-03-27 20:31         ` Arnout Vandecappelle
  -- strict thread matches above, loose matches on Subject: below --
2015-03-18  9:00 Sonic Zhang

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=5511B655.9020800@mind.be \
    --to=arnout@mind.be \
    --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