[oe] [meta-java][PATCH 1/2] openjdk-8: remove debuglink

Wenlin Kang wenlin.kang at windriver.com
Tue Jun 12 11:35:25 UTC 2018


On 2018年06月12日 19:09, Richard Leitner wrote:
> Hi Wenlin,
>
> On 06/07/2018 11:24 AM, Wenlin Kang wrote:
>> We need remove previous debuglink before add it if it has existed,
>> because it may have a different file name with this that we will add.
> I'm sorry but I don't get the reason why we need this...
> It would be great if you may please explain it in a little more detail for me ;-)

Hi Richard

In openjdk-8, its debug file is xxx.debuginfo, and when execute 
openjdk's makefile, it will add
libjvm.debuginfo as libjvm.so's debuglink section's file name, this name 
is different  with that
we will add in splitdebuginfo() of package.bbclass, this makes we can't 
get symbol information
when debug libjvm.so in gdb.

>
> Thank you very much!
>
>> Signed-off-by: Wenlin Kang <wenlin.kang at windriver.com>
>> ---
>>   recipes-core/openjdk/openjdk-8-cross.inc | 16 ++++++++++++++++
>>   1 file changed, 16 insertions(+)
>>
>> diff --git a/recipes-core/openjdk/openjdk-8-cross.inc b/recipes-core/openjdk/openjdk-8-cross.inc
>> index 46f13fd..03cab11 100644
>> --- a/recipes-core/openjdk/openjdk-8-cross.inc
>> +++ b/recipes-core/openjdk/openjdk-8-cross.inc
>> @@ -105,5 +105,21 @@ EXTRA_OEMAKE_append = '\
>>       images \
>>   '
>>   
>> +python remove_debuglink() {
>> +    dvar = d.getVar('PKGD', True)
>> +    objcopy = d.getVar("OBJCOPY", True)
>> +
>> +    # Remove the previous debuglink if it has existed, because it has a different file name with that we will add.
>> +    if d.getVar('PN', True).find("jre") != -1:
>> +        file = dvar + d.getVar("JRE_HOME", True) + "/lib/" + d.getVar("JDK_ARCH", True) + "/server/libjvm.so"
>> +    else:
>> +        file = dvar + d.getVar("JDK_HOME", True) + "/jre/lib/" + d.getVar("JDK_ARCH", True) + "/server/libjvm.so"
>> +
>> +    cmd = "'%s' --remove-section .gnu_debuglink '%s'" % (objcopy, file)
>> +    oe.utils.getstatusoutput(cmd)
>> +}
>> +
>> +PACKAGE_PREPROCESS_FUNCS += "remove_debuglink"
>> +
>>   # There is a symlink to a .so but this one is valid.
>>   INSANE_SKIP_${PN} = "dev-so"
>>
> regards;Richard.L
>

-- 
Thanks,
Wenlin Kang




More information about the Openembedded-devel mailing list