Patchwork eglibc: Make ld.so.conf more flexible

login
register
mail settings
Submitter Ben Shelton
Date July 23, 2014, 10:41 p.m.
Message ID <1406155290-25903-1-git-send-email-ben.shelton@ni.com>
Download mbox | patch
Permalink /patch/76517/
State New
Headers show

Comments

Ben Shelton - July 23, 2014, 10:41 p.m.
From: Brad Mouring <brad.mouring@ni.com>

Most modern distros will include conf files in /etc/ld.so.conf.d/
when generating the ld.so cache. This change will bring that flexibility.

Signed-off-by: Brad Mouring <brad.mouring@ni.com>
Signed-off-by: Ben Shelton <ben.shelton@ni.com>
Acked-by: Ken Sharp <ken.sharp@ni.com>
Acked-by: Rich Tollerton <rich.tollerton@ni.com>
---
 meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf | 1 +
 1 file changed, 1 insertion(+)
Peter Seebach - July 23, 2014, 11:50 p.m.
On Wed, 23 Jul 2014 17:41:30 -0500
Ben Shelton <ben.shelton@ni.com> wrote:

> Most modern distros will include conf files in /etc/ld.so.conf.d/
> when generating the ld.so cache. This change will bring that flexibility.

I was just looking at a patch to do roughly this. Mine added a
USE_LDCONFIG_CONF_D flag, and then had eglibc's install create the directory
and append that line to ld.so.conf if the flag was set. I'm not sure whether
the extra functionality justifies the effort. I would suggest that, if
this is going to be unconditionally present, the directory should be too.

-s
Khem Raj - July 24, 2014, 1:48 a.m.
On Wed, Jul 23, 2014 at 4:50 PM, Peter Seebach
<peter.seebach@windriver.com> wrote:
> On Wed, 23 Jul 2014 17:41:30 -0500
> Ben Shelton <ben.shelton@ni.com> wrote:
>
>> Most modern distros will include conf files in /etc/ld.so.conf.d/
>> when generating the ld.so cache. This change will bring that flexibility.
>
> I was just looking at a patch to do roughly this. Mine added a
> USE_LDCONFIG_CONF_D flag, and then had eglibc's install create the directory
> and append that line to ld.so.conf if the flag was set. I'm not sure whether
> the extra functionality justifies the effort. I would suggest that, if
> this is going to be unconditionally present, the directory should be too.

Many embedded systems dont use ldconfig and we have USE_LDCONFIG knob
to control it.
This should fall under that knob as well.

>
> -s
> --
> Listen, get this.  Nobody with a good compiler needs to be justified.
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Mark Hatle - July 24, 2014, 1:59 a.m.
On 7/23/14, 8:48 PM, Khem Raj wrote:
> On Wed, Jul 23, 2014 at 4:50 PM, Peter Seebach
> <peter.seebach@windriver.com> wrote:
>> On Wed, 23 Jul 2014 17:41:30 -0500
>> Ben Shelton <ben.shelton@ni.com> wrote:
>>
>>> Most modern distros will include conf files in /etc/ld.so.conf.d/
>>> when generating the ld.so cache. This change will bring that flexibility.
>>
>> I was just looking at a patch to do roughly this. Mine added a
>> USE_LDCONFIG_CONF_D flag, and then had eglibc's install create the directory
>> and append that line to ld.so.conf if the flag was set. I'm not sure whether
>> the extra functionality justifies the effort. I would suggest that, if
>> this is going to be unconditionally present, the directory should be too.
>
> Many embedded systems dont use ldconfig and we have USE_LDCONFIG knob
> to control it.
> This should fall under that knob as well.

Original idea was two knobs.. one for USE_LDCONFIG, and one for using the 
ld.so.conf.d directory and setup.

The later has been requested of me many times, but we've not implemented it 
generically.  I think it's time to do so -- but it should be tied to 
USE_LDCONFIG at a minimum, I just don't know if it should always be enabled or 
just sometimes.  (Always means the ld.so.conf file gets the include line, so 
it's NOT a lot of bytes.)

--Mark

>>
>> -s
>> --
>> Listen, get this.  Nobody with a good compiler needs to be justified.
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
Peter Seebach - July 24, 2014, 9:30 p.m.
On Wed, 23 Jul 2014 20:59:27 -0500
Mark Hatle <mark.hatle@windriver.com> wrote:

> The later has been requested of me many times, but we've not implemented it 
> generically.  I think it's time to do so -- but it should be tied to 
> USE_LDCONFIG at a minimum, I just don't know if it should always be enabled or 
> just sometimes.  (Always means the ld.so.conf file gets the include line, so 
> it's NOT a lot of bytes.)

It's not a lot of bytes, but it's a non-zero increase in effort for ldconfig
compared to an empty file. Although I assume ldconfig checks /usr/lib*
automatically, so this would be <1% anyway.

-s

Patch

diff --git a/meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf b/meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf
index e69de29..83327c0 100644
--- a/meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf
+++ b/meta/recipes-core/eglibc/eglibc-2.19/etc/ld.so.conf
@@ -0,0 +1 @@ 
+include /etc/ld.so.conf.d/*.conf