[OE-core] [PATCH 2/2] ldsoconf: allow extension via local.conf

akuster808 akuster808 at gmail.com
Wed Nov 11 19:22:41 UTC 2015



On 11/11/2015 10:39 AM, Khem Raj wrote:
> On Wed, Nov 11, 2015 at 9:41 AM, Armin Kuster <akuster808 at gmail.com> wrote:
>> From: Armin Kuster <akuster at mvista.com>
>>
>> this allows extending ldconfig search path from local.conf
>>
>> Signed-off-by: Armin Kuster <akuster at mvista.com>
>> ---
>>  meta/classes/image-ldconfig.bbclass | 6 ++++++
>>  meta/conf/bitbake.conf              | 3 +++
>>  2 files changed, 9 insertions(+)
>>
>> diff --git a/meta/classes/image-ldconfig.bbclass b/meta/classes/image-ldconfig.bbclass
>> index e9946da..ce10673 100644
>> --- a/meta/classes/image-ldconfig.bbclass
>> +++ b/meta/classes/image-ldconfig.bbclass
>> @@ -11,6 +11,12 @@ ld_so_conf() {
>>
>>      rm -f ${STAGING_DIR_NATIVE}${sysconfdir_native}/ld.so.conf
>>
>> +    # dump addition lib possible defined in local.conf
>> +    for file in ${LDSOCONF};
>> +    do
>> +        echo ${file} >> ${STAGING_LDSO_CONF_DIR}/ld.so.conf
>> +    done
>> +
>>      # save lib dirs as defined in recipes
>>      for file in `find ${STAGING_LDSO_CONF_DIR}/*/* -name "ld.so.conf"`;
>>      do
>> diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
>> index f0471f4..1f78c49 100644
>> --- a/meta/conf/bitbake.conf
>> +++ b/meta/conf/bitbake.conf
>> @@ -815,4 +815,7 @@ MULTILIB_VARIANTS ??= ""
>>  #
>>  # ldconfig stuff
>>  #
>> +EXTRA_LDSOCONF ??= ""
>> +LDSOCONF = "/lib /lib64 /usr/lib /usr/lib64"
> 
> is this going to exist always even when multilib is disbled ?

A sane default make more sense.

These libs are currently hardcoded in ldconfig-native.
#define LIBDIR "/usr/lib"
#define LIBDIR32 "/usr/lib32"
#define LIBDIR64 "/usr/lib64"
#define SLIBDIR "/lib"
#define SLIBDIR32 "/lib32"
#define SLIBDIR64 "/lib64"

looks like I missed lib32 versions.

> how about mips n32/o32/n64 all being in same rootfs

not checked today either. Maybe we can use this scheme to dynamically
append ldconfig search patches for the mips example?


ldconfig just gives a warning if the lib dirs don't not exist.

sounds like this needs to be extended to handle multi lib better or in a
saner method.


thanks,
- armin


> 
>> +LSSOCONF += "${EXTRA_LDSOCONF}"
>>  STAGING_LDSO_CONF_DIR = "${TMPDIR}/work-shared/ldconfig"
>> --
>> 2.3.5
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core at lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core



More information about the Openembedded-core mailing list