1 |
On 7/14/19 11:31 PM, Michał Górny wrote: |
2 |
> On Sun, 2019-07-14 at 19:50 -0400, Mike Gilbert wrote: |
3 |
>> Signed-off-by: Mike Gilbert <floppym@g.o> |
4 |
>> --- |
5 |
>> eclass/toolchain-funcs.eclass | 15 ++++----------- |
6 |
>> 1 file changed, 4 insertions(+), 11 deletions(-) |
7 |
>> |
8 |
>> diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.eclass |
9 |
>> index 2e027015c684..7bd90bb4e4a0 100644 |
10 |
>> --- a/eclass/toolchain-funcs.eclass |
11 |
>> +++ b/eclass/toolchain-funcs.eclass |
12 |
>> @@ -950,18 +950,11 @@ tc-enables-ssp-all() { |
13 |
>> # @FUNCTION: gen_usr_ldscript |
14 |
>> # @USAGE: [-a] <list of libs to create linker scripts for> |
15 |
>> # @DESCRIPTION: |
16 |
>> -# This function generate linker scripts in /usr/lib for dynamic |
17 |
>> -# libs in /lib. This is to fix linking problems when you have |
18 |
>> -# the .so in /lib, and the .a in /usr/lib. What happens is that |
19 |
>> -# in some cases when linking dynamic, the .a in /usr/lib is used |
20 |
>> -# instead of the .so in /lib due to gcc/libtool tweaking ld's |
21 |
>> -# library search path. This causes many builds to fail. |
22 |
>> -# See bug #4411 for more info. |
23 |
>> -# |
24 |
>> -# Note that you should in general use the unversioned name of |
25 |
>> -# the library (libfoo.so), as ldconfig should usually update it |
26 |
>> -# correctly to point to the latest version of the library present. |
27 |
>> +# This function is deprecated. Use the version from |
28 |
>> +# usr-ldscript.eclass instead. |
29 |
>> gen_usr_ldscript() { |
30 |
>> + ewarn "${FUNCNAME}: Please migrate to usr-ldscript.eclass" |
31 |
>> + |
32 |
>> local lib libdir=$(get_libdir) output_format="" auto=false suffix=$(get_libname) |
33 |
>> [[ -z ${ED+set} ]] && local ED=${D%/}${EPREFIX}/ |
34 |
>> |
35 |
> |
36 |
> Wouldn't this trigger when both toolchain-funcs and usr-ldscript are |
37 |
> inherited, in reverse order? |
38 |
> |
39 |
|
40 |
I thought the same at first, but it looks like it will work because |
41 |
usr-ldscript inherits toolchain-funcs and both eclasses have include |
42 |
guards, so the toolchain-funcs version will always be overridden by |
43 |
usr-ldscript, if the later is inherited at all. I'm not sure how |
44 |
fragile this construct is, though. |
45 |
|
46 |
-- |
47 |
Jonathan |