public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] c/69540 - update documentation on -l
@ 2016-01-30 17:33 Arkadiusz Drabczyk
  2016-02-02 20:19 ` Sandra Loosemore
  0 siblings, 1 reply; 4+ messages in thread
From: Arkadiusz Drabczyk @ 2016-01-30 17:33 UTC (permalink / raw)
  To: gcc-patches

* doc/invoke.texi: update documentation WRT .so libraries in -l
---
 gcc/ChangeLog       | 4 ++++
 gcc/doc/invoke.texi | 8 +++++---
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1d60690..0a6acdb 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2016-01-30  Arkadiusz Drabczyk  <arkadiusz@drabczyk.org>
+
+	* doc/invoke.texi: update documentation WRT .so libraries in -l
+
 2016-01-29  Martin Jambor  <mjambor@suse.cz>
 
 	* hsa-gen.c (get_memory_order_name): Mask with MEMMODEL_BASE_MASK.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index ba0b4b2..8b1b329 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -10440,9 +10440,11 @@ whose members are object files.  The linker handles an archive file by
 scanning through it for members which define symbols that have so far
 been referenced but not defined.  But if the file that is found is an
 ordinary object file, it is linked in the usual fashion.  The only
-difference between using an @option{-l} option and specifying a file name
-is that @option{-l} surrounds @var{library} with @samp{lib} and @samp{.a}
-and searches several directories.
+difference between using an @option{-l} option and specifying a file
+name is that @option{-l} surrounds @var{library} with @samp{lib} and
+@samp{.so} on systems with shared libraries support or with @samp{.a} if
+@var{library} with @samp{.so} is not found and on all other systems and
+searches several directories.
 
 @item -lobjc
 @opindex lobjc
-- 
1.8.4


-- 
Arkadiusz Drabczyk <arkadiusz@drabczyk.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] c/69540 - update documentation on -l
  2016-01-30 17:33 [PATCH] c/69540 - update documentation on -l Arkadiusz Drabczyk
@ 2016-02-02 20:19 ` Sandra Loosemore
  2016-02-02 20:40   ` Arkadiusz Drabczyk
  0 siblings, 1 reply; 4+ messages in thread
From: Sandra Loosemore @ 2016-02-02 20:19 UTC (permalink / raw)
  To: Arkadiusz Drabczyk, gcc-patches

On 01/30/2016 10:33 AM, Arkadiusz Drabczyk wrote:
> * doc/invoke.texi: update documentation WRT .so libraries in -l
> ---
>   gcc/ChangeLog       | 4 ++++
>   gcc/doc/invoke.texi | 8 +++++---
>   2 files changed, 9 insertions(+), 3 deletions(-)
>
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index 1d60690..0a6acdb 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,7 @@
> +2016-01-30  Arkadiusz Drabczyk  <arkadiusz@drabczyk.org>
> +
> +	* doc/invoke.texi: update documentation WRT .so libraries in -l
> +
>   2016-01-29  Martin Jambor  <mjambor@suse.cz>
>
>   	* hsa-gen.c (get_memory_order_name): Mask with MEMMODEL_BASE_MASK.
> diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
> index ba0b4b2..8b1b329 100644
> --- a/gcc/doc/invoke.texi
> +++ b/gcc/doc/invoke.texi
> @@ -10440,9 +10440,11 @@ whose members are object files.  The linker handles an archive file by
>   scanning through it for members which define symbols that have so far
>   been referenced but not defined.  But if the file that is found is an
>   ordinary object file, it is linked in the usual fashion.  The only
> -difference between using an @option{-l} option and specifying a file name
> -is that @option{-l} surrounds @var{library} with @samp{lib} and @samp{.a}
> -and searches several directories.
> +difference between using an @option{-l} option and specifying a file
> +name is that @option{-l} surrounds @var{library} with @samp{lib} and
> +@samp{.so} on systems with shared libraries support or with @samp{.a} if
> +@var{library} with @samp{.so} is not found and on all other systems and
> +searches several directories.
>
>   @item -lobjc
>   @opindex lobjc
>

I see that the documentation of -l does need to be updated to mention 
.so files, but I think your patch doesn't go far enough.  It's already 
confusing because that sentence says "The only difference is...", and 
then mentions *two* things it does differently, and you're adding even 
more things.

Instead, I suggest dropping this confusing sentence entirely and putting 
the new information a couple paragraphs higher up:

> The linker searches a standard list of directories for the library,
> which is actually a file named @file{lib@var{library}.a}. The linker
> then uses this file as if it had been specified precisely by name.

How about just changing that to read

...a file named @file{lib@var{library}.so}; or, if shared libraries are 
not supported, are disabled via @option{-static}, or no @samp{.so} file 
is found, @file{lib@var{library}.a}.

??

-Sandra

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] c/69540 - update documentation on -l
  2016-02-02 20:19 ` Sandra Loosemore
@ 2016-02-02 20:40   ` Arkadiusz Drabczyk
  2016-02-21 15:24     ` Arkadiusz Drabczyk
  0 siblings, 1 reply; 4+ messages in thread
From: Arkadiusz Drabczyk @ 2016-02-02 20:40 UTC (permalink / raw)
  To: gcc-patches

On 2016-02-02, Sandra Loosemore <sandra@codesourcery.com> wrote:
> I see that the documentation of -l does need to be updated to mention 
> .so files, but I think your patch doesn't go far enough.  It's already 
> confusing because that sentence says "The only difference is...", and 
> then mentions *two* things it does differently, and you're adding even 
> more things.
>
> Instead, I suggest dropping this confusing sentence entirely and putting 
> the new information a couple paragraphs higher up:
>
>> The linker searches a standard list of directories for the library,
>> which is actually a file named @file{lib@var{library}.a}. The linker
>> then uses this file as if it had been specified precisely by name.
>
> How about just changing that to read
>
> ...a file named @file{lib@var{library}.so}; or, if shared libraries are 
> not supported, are disabled via @option{-static}, or no @samp{.so} file 
> is found, @file{lib@var{library}.a}.

Nice, indeed, more readable than what I came up with plus info on
-static added.  Looks good to me.

-- 
Arkadiusz Drabczyk <arkadiusz@drabczyk.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] c/69540 - update documentation on -l
  2016-02-02 20:40   ` Arkadiusz Drabczyk
@ 2016-02-21 15:24     ` Arkadiusz Drabczyk
  0 siblings, 0 replies; 4+ messages in thread
From: Arkadiusz Drabczyk @ 2016-02-21 15:24 UTC (permalink / raw)
  To: gcc-patches

On 2016-02-02, Arkadiusz Drabczyk <arkadiusz@drabczyk.org> wrote:
> On 2016-02-02, Sandra Loosemore <sandra@codesourcery.com> wrote:
>> I see that the documentation of -l does need to be updated to mention 
>> .so files, but I think your patch doesn't go far enough.  It's already 
>> confusing because that sentence says "The only difference is...", and 
>> then mentions *two* things it does differently, and you're adding even 
>> more things.
>>
>> Instead, I suggest dropping this confusing sentence entirely and putting 
>> the new information a couple paragraphs higher up:
>>
>>> The linker searches a standard list of directories for the library,
>>> which is actually a file named @file{lib@var{library}.a}. The linker
>>> then uses this file as if it had been specified precisely by name.
>>
>> How about just changing that to read
>>
>> ...a file named @file{lib@var{library}.so}; or, if shared libraries are 
>> not supported, are disabled via @option{-static}, or no @samp{.so} file 
>> is found, @file{lib@var{library}.a}.
>
> Nice, indeed, more readable than what I came up with plus info on
> -static added.  Looks good to me.
>

Hello,

What's the status of this patch?  Will it be merged into trunk?
-- 
Arkadiusz Drabczyk <arkadiusz@drabczyk.org>

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2016-02-21 15:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-30 17:33 [PATCH] c/69540 - update documentation on -l Arkadiusz Drabczyk
2016-02-02 20:19 ` Sandra Loosemore
2016-02-02 20:40   ` Arkadiusz Drabczyk
2016-02-21 15:24     ` Arkadiusz Drabczyk

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 read-only IMAP folder(s) and NNTP newsgroup(s).