summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/package.bbclass11
1 files changed, 3 insertions, 8 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index 4ce9de2f57..323ba051ae 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -380,6 +380,7 @@ def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir,
380 # sourcefile is also generated containing a list of debugsources 380 # sourcefile is also generated containing a list of debugsources
381 381
382 import stat 382 import stat
383 import subprocess
383 384
384 src = file[len(dvar):] 385 src = file[len(dvar):]
385 dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend 386 dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend
@@ -409,16 +410,10 @@ def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir,
409 410
410 bb.utils.mkdirhier(os.path.dirname(debugfile)) 411 bb.utils.mkdirhier(os.path.dirname(debugfile))
411 412
412 cmd = "'%s' --only-keep-debug '%s' '%s'" % (objcopy, file, debugfile) 413 subprocess.check_output([objcopy, '--only-keep-debug', file, debugfile], stderr=subprocess.STDOUT)
413 (retval, output) = oe.utils.getstatusoutput(cmd)
414 if retval:
415 bb.fatal("objcopy failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
416 414
417 # Set the debuglink to have the view of the file path on the target 415 # Set the debuglink to have the view of the file path on the target
418 cmd = "'%s' --add-gnu-debuglink='%s' '%s'" % (objcopy, debugfile, file) 416 subprocess.check_output([objcopy, '--add-gnu-debuglink', debugfile, file], stderr=subprocess.STDOUT)
419 (retval, output) = oe.utils.getstatusoutput(cmd)
420 if retval:
421 bb.fatal("objcopy failed with exit code %s (cmd was %s)%s" % (retval, cmd, ":\n%s" % output if output else ""))
422 417
423 if newmode: 418 if newmode:
424 os.chmod(file, origmode) 419 os.chmod(file, origmode)