diff options
| -rw-r--r-- | meta/classes/package.bbclass | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass index 9e895b4ecc..f4a661ba25 100644 --- a/meta/classes/package.bbclass +++ b/meta/classes/package.bbclass | |||
| @@ -367,7 +367,7 @@ def source_info(file, d, fatal=True): | |||
| 367 | 367 | ||
| 368 | return list(debugsources) | 368 | return list(debugsources) |
| 369 | 369 | ||
| 370 | def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir, d): | 370 | def splitdebuginfo(file, dvar, dv, d): |
| 371 | # Function to split a single file into two components, one is the stripped | 371 | # Function to split a single file into two components, one is the stripped |
| 372 | # target system binary, the other contains any debugging information. The | 372 | # target system binary, the other contains any debugging information. The |
| 373 | # two files are linked to reference each other. | 373 | # two files are linked to reference each other. |
| @@ -378,7 +378,7 @@ def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir, | |||
| 378 | import subprocess | 378 | import subprocess |
| 379 | 379 | ||
| 380 | src = file[len(dvar):] | 380 | src = file[len(dvar):] |
| 381 | dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend | 381 | dest = dv["libdir"] + os.path.dirname(src) + dv["dir"] + "/" + os.path.basename(src) + dv["append"] |
| 382 | debugfile = dvar + dest | 382 | debugfile = dvar + dest |
| 383 | sources = [] | 383 | sources = [] |
| 384 | 384 | ||
| @@ -397,7 +397,7 @@ def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir, | |||
| 397 | os.chmod(file, newmode) | 397 | os.chmod(file, newmode) |
| 398 | 398 | ||
| 399 | # We need to extract the debug src information here... | 399 | # We need to extract the debug src information here... |
| 400 | if debugsrcdir: | 400 | if dv["srcdir"]: |
| 401 | sources = source_info(file, d) | 401 | sources = source_info(file, d) |
| 402 | 402 | ||
| 403 | bb.utils.mkdirhier(os.path.dirname(debugfile)) | 403 | bb.utils.mkdirhier(os.path.dirname(debugfile)) |
| @@ -412,7 +412,7 @@ def splitdebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir, | |||
| 412 | 412 | ||
| 413 | return (file, sources) | 413 | return (file, sources) |
| 414 | 414 | ||
| 415 | def splitstaticdebuginfo(file, dvar, debugstaticdir, debugstaticlibdir, debugstaticappend, debugsrcdir, d): | 415 | def splitstaticdebuginfo(file, dvar, dv, d): |
| 416 | # Unlike the function above, there is no way to split a static library | 416 | # Unlike the function above, there is no way to split a static library |
| 417 | # two components. So to get similar results we will copy the unmodified | 417 | # two components. So to get similar results we will copy the unmodified |
| 418 | # static library (containing the debug symbols) into a new directory. | 418 | # static library (containing the debug symbols) into a new directory. |
| @@ -425,7 +425,7 @@ def splitstaticdebuginfo(file, dvar, debugstaticdir, debugstaticlibdir, debugsta | |||
| 425 | import shutil | 425 | import shutil |
| 426 | 426 | ||
| 427 | src = file[len(dvar):] | 427 | src = file[len(dvar):] |
| 428 | dest = debugstaticlibdir + os.path.dirname(src) + debugstaticdir + "/" + os.path.basename(src) + debugstaticappend | 428 | dest = dv["staticlibdir"] + os.path.dirname(src) + dv["staticdir"] + "/" + os.path.basename(src) + dv["staticappend"] |
| 429 | debugfile = dvar + dest | 429 | debugfile = dvar + dest |
| 430 | sources = [] | 430 | sources = [] |
| 431 | 431 | ||
| @@ -442,7 +442,7 @@ def splitstaticdebuginfo(file, dvar, debugstaticdir, debugstaticlibdir, debugsta | |||
| 442 | os.chmod(file, newmode) | 442 | os.chmod(file, newmode) |
| 443 | 443 | ||
| 444 | # We need to extract the debug src information here... | 444 | # We need to extract the debug src information here... |
| 445 | if debugsrcdir: | 445 | if dv["srcdir"]: |
| 446 | sources = source_info(file, d) | 446 | sources = source_info(file, d) |
| 447 | 447 | ||
| 448 | bb.utils.mkdirhier(os.path.dirname(debugfile)) | 448 | bb.utils.mkdirhier(os.path.dirname(debugfile)) |
| @@ -455,7 +455,7 @@ def splitstaticdebuginfo(file, dvar, debugstaticdir, debugstaticlibdir, debugsta | |||
| 455 | 455 | ||
| 456 | return (file, sources) | 456 | return (file, sources) |
| 457 | 457 | ||
| 458 | def inject_minidebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsrcdir, d): | 458 | def inject_minidebuginfo(file, dvar, dv, d): |
| 459 | # Extract just the symbols from debuginfo into minidebuginfo, | 459 | # Extract just the symbols from debuginfo into minidebuginfo, |
| 460 | # compress it with xz and inject it back into the binary in a .gnu_debugdata section. | 460 | # compress it with xz and inject it back into the binary in a .gnu_debugdata section. |
| 461 | # https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html | 461 | # https://sourceware.org/gdb/onlinedocs/gdb/MiniDebugInfo.html |
| @@ -469,7 +469,7 @@ def inject_minidebuginfo(file, dvar, debugdir, debuglibdir, debugappend, debugsr | |||
| 469 | minidebuginfodir = d.expand('${WORKDIR}/minidebuginfo') | 469 | minidebuginfodir = d.expand('${WORKDIR}/minidebuginfo') |
| 470 | 470 | ||
| 471 | src = file[len(dvar):] | 471 | src = file[len(dvar):] |
| 472 | dest = debuglibdir + os.path.dirname(src) + debugdir + "/" + os.path.basename(src) + debugappend | 472 | dest = dv["libdir"] + os.path.dirname(src) + dv["dir"] + "/" + os.path.basename(src) + dv["append"] |
| 473 | debugfile = dvar + dest | 473 | debugfile = dvar + dest |
| 474 | minidebugfile = minidebuginfodir + src + '.minidebug' | 474 | minidebugfile = minidebuginfodir + src + '.minidebug' |
| 475 | bb.utils.mkdirhier(os.path.dirname(minidebugfile)) | 475 | bb.utils.mkdirhier(os.path.dirname(minidebugfile)) |
| @@ -1244,11 +1244,11 @@ python split_and_strip_files () { | |||
| 1244 | # First lets process debug splitting | 1244 | # First lets process debug splitting |
| 1245 | # | 1245 | # |
| 1246 | if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'): | 1246 | if (d.getVar('INHIBIT_PACKAGE_DEBUG_SPLIT') != '1'): |
| 1247 | results = oe.utils.multiprocess_launch(splitdebuginfo, list(elffiles), d, extraargs=(dvar, dv["dir"], dv["libdir"], dv["append"], dv["srcdir"], d)) | 1247 | results = oe.utils.multiprocess_launch(splitdebuginfo, list(elffiles), d, extraargs=(dvar, dv, d)) |
| 1248 | 1248 | ||
| 1249 | if dv["srcdir"] and not hostos.startswith("mingw"): | 1249 | if dv["srcdir"] and not hostos.startswith("mingw"): |
| 1250 | if (d.getVar('PACKAGE_DEBUG_STATIC_SPLIT') == '1'): | 1250 | if (d.getVar('PACKAGE_DEBUG_STATIC_SPLIT') == '1'): |
| 1251 | results = oe.utils.multiprocess_launch(splitstaticdebuginfo, staticlibs, d, extraargs=(dvar, dv["staticdir"], dv["staticlibdir"], dv["staticappend"], dv["srcdir"], d)) | 1251 | results = oe.utils.multiprocess_launch(splitstaticdebuginfo, staticlibs, d, extraargs=(dvar, dv, d)) |
| 1252 | else: | 1252 | else: |
| 1253 | for file in staticlibs: | 1253 | for file in staticlibs: |
| 1254 | results.append( (file,source_info(file, d)) ) | 1254 | results.append( (file,source_info(file, d)) ) |
| @@ -1329,7 +1329,7 @@ python split_and_strip_files () { | |||
| 1329 | # Build "minidebuginfo" and reinject it back into the stripped binaries | 1329 | # Build "minidebuginfo" and reinject it back into the stripped binaries |
| 1330 | if d.getVar('PACKAGE_MINIDEBUGINFO') == '1': | 1330 | if d.getVar('PACKAGE_MINIDEBUGINFO') == '1': |
| 1331 | oe.utils.multiprocess_launch(inject_minidebuginfo, list(elffiles), d, | 1331 | oe.utils.multiprocess_launch(inject_minidebuginfo, list(elffiles), d, |
| 1332 | extraargs=(dvar, dv["dir"], dv["libdir"], dv["append"], dv["srcdir"], d)) | 1332 | extraargs=(dvar, dv, d)) |
| 1333 | 1333 | ||
| 1334 | # | 1334 | # |
| 1335 | # End of strip | 1335 | # End of strip |
