dwarves.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Deepak Kumar Mishra <deepakkumar.mishra@arm.com>
To: Arnaldo Carvalho de Melo <acme@kernel.org>
Cc: dwarves@vger.kernel.org, qais.yousef@arm.com
Subject: Re: [PATCH 2/2] README: add documentation for -DBUILD_SHARED_LIBS
Date: Tue, 8 Jun 2021 00:46:47 +0530	[thread overview]
Message-ID: <68a3ed18-ff7a-3ca1-4a22-cf69c8b7f4d5@arm.com> (raw)
In-Reply-To: <YLjyVQXwd9TajVfr@kernel.org>

Hi Arnaldo,

On 6/3/21 8:46 PM, Arnaldo Carvalho de Melo wrote:
> Em Thu, Jun 03, 2021 at 01:08:23PM +0530, Deepak Kumar Mishra escreveu:
>> Hi Arnaldo,
>>
>> On 6/2/21 6:48 PM, Arnaldo Carvalho de Melo wrote:
>>> Em Wed, Jun 02, 2021 at 11:26:24AM +0530, Deepak Kumar Mishra escreveu:
>>>> added a section in README to give details about use of -DBUILD_SHARED_LIBS
>>>> cmake option and existing documentation reformatted to accomodate this.
>>>
>>> So are you changing the default to build as static? Please keep the
>>> existing default and make building statically the opt-in mode, ok?
>>>
>> As per Cmake documentation if -DBUILD_SHARED_LIBS is present and true, 
>> cmake will cause all libraries to be built shared.
>> https://cmake.org/cmake/help/latest/variable/BUILD_SHARED_LIBS.html 
>>
>> If you still suggest, I can override the default behavior to SHARED and 
>> only when -DBUILD_SHARED_LIBS=OFF is provided, it will make STATIC.
> 
> Please keep the pre-existing default, i.e. people building pahole all
> these years expect the shared library to be produced, if after this
> change that isn't the case, some confusion will ensue.

I got your point. I am sending a v2 of the patch set which will retain the 
previous behavior. (Shared library by default if no cmake options provided) 
-Deepak  
> 
> Now if you could provide numbers for, say, 'pahole -J' liked statically,
> that would be great and would help understand what decision to make.
> 
> - Arnaldo
>  
>> Kindly confirm. 
>> -Deepak 
>>
>>> - Arnaldo
>>>  
>>>> Signed-off-by: Deepak Kumar Mishra <deepakkumar.mishra@arm.com>
>>>> ---
>>>>  README | 13 +++++++++++--
>>>>  1 file changed, 11 insertions(+), 2 deletions(-)
>>>>
>>>> diff --git a/README b/README
>>>> index 576cd42..40ca984 100644
>>>> --- a/README
>>>> +++ b/README
>>>> @@ -6,8 +6,17 @@ Build instructions:
>>>>  4. cmake -D__LIB=lib ..
>>>>  5. make install
>>>>  
>>>> -Default is to install to /usr/local, use -DCMAKE_INSTALL_PREFIX=
>>>> -when invoking cmake to specify another install location.
>>>> +cmake Options:
>>>> +  -DBUILD_SHARED_LIBS
>>>> +    By default STATIC libraries are created and applications are linked to it.
>>>> +    use -DBUILD_SHARED_LIBS=ON while invoking cmake to create SHARED libraries
>>>> +    and link applications to it.
>>>> +
>>>> +    Ex. cmake -D__LIB=lib -DBUILD_SHARED_LIBS=ON ..
>>>> +
>>>> +  -DCMAKE_INSTALL_PREFIX
>>>> +    Default is to install to /usr/local, use -DCMAKE_INSTALL_PREFIX=
>>>> +    when invoking cmake to specify another install location.
>>>>  
>>>>  Known to work scenarios:
>>>>  
>>>> -- 
>>>> 2.17.1
>>>>
>>>
> 

      reply	other threads:[~2021-06-07 19:16 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-02  5:56 [PATCH 0/2] dwarves: enable-SHARED-and-STATIC-lib-creation Deepak Kumar Mishra
2021-06-02  5:56 ` [PATCH 1/2] CMakeLists.txt: enable SHARED and STATIC lib creation Deepak Kumar Mishra
2021-06-02  5:56 ` [PATCH 2/2] README: add documentation for -DBUILD_SHARED_LIBS Deepak Kumar Mishra
2021-06-02 13:18   ` Arnaldo Carvalho de Melo
2021-06-03  7:38     ` Deepak Kumar Mishra
2021-06-03 15:16       ` Arnaldo Carvalho de Melo
2021-06-07 19:16         ` Deepak Kumar Mishra [this message]

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=68a3ed18-ff7a-3ca1-4a22-cf69c8b7f4d5@arm.com \
    --to=deepakkumar.mishra@arm.com \
    --cc=acme@kernel.org \
    --cc=dwarves@vger.kernel.org \
    --cc=qais.yousef@arm.com \
    --subject='Re: [PATCH 2/2] README: add documentation for -DBUILD_SHARED_LIBS' \
    /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

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).