summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWenlin Kang <wenlin.kang@windriver.com>2018-06-13 01:37:31 -0700
committerRichard Leitner <richard.leitner@skidata.com>2018-06-15 12:06:25 +0200
commit29f391531fae7d544cb391239676eebd7a72d39f (patch)
tree05bf7754b3f215b46f10251291a67d6ed2072797
parent228b3517835d6c278876e48c2dcb9d4f09b4bf86 (diff)
downloadmeta-java-29f391531fae7d544cb391239676eebd7a72d39f.tar.gz
openjdk-8: remove debuglink
During openjdk-8 compiling, its debug file is xxx.debuginfo, and it will add libjvm.debuginfo as libjvm.so's debuglink section's file name, this name is different with that we will create and add in splitdebuginfo() of package.bbclass, in oe-core, the debug file name is the same with the corresponding executable file or library file, this will make we can't get symbol information when debug libjvm.so in gdb, so we must remove the previous debuglink before add it if it has existed(if a file has contained the debuglink section, it will not be changed when add again). Signed-off-by: Wenlin Kang <wenlin.kang@windriver.com> Tested-by: Richard Leitner <richard.leitner@skidata.com> Signed-off-by: Richard Leitner <richard.leitner@skidata.com>
-rw-r--r--recipes-core/openjdk/openjdk-8-cross.inc16
1 files changed, 16 insertions, 0 deletions
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 = '\
105 images \ 105 images \
106' 106'
107 107
108python remove_debuglink() {
109 dvar = d.getVar('PKGD', True)
110 objcopy = d.getVar("OBJCOPY", True)
111
112 # Remove the previous debuglink if it has existed, because it has a different file name with that we will add.
113 if d.getVar('PN', True).find("jre") != -1:
114 file = dvar + d.getVar("JRE_HOME", True) + "/lib/" + d.getVar("JDK_ARCH", True) + "/server/libjvm.so"
115 else:
116 file = dvar + d.getVar("JDK_HOME", True) + "/jre/lib/" + d.getVar("JDK_ARCH", True) + "/server/libjvm.so"
117
118 cmd = "'%s' --remove-section .gnu_debuglink '%s'" % (objcopy, file)
119 oe.utils.getstatusoutput(cmd)
120}
121
122PACKAGE_PREPROCESS_FUNCS += "remove_debuglink"
123
108# There is a symlink to a .so but this one is valid. 124# There is a symlink to a .so but this one is valid.
109INSANE_SKIP_${PN} = "dev-so" 125INSANE_SKIP_${PN} = "dev-so"