* [ptxdist] [PATCH] ptxd_make_xpkg_pkg.sh: Prevent empty comp variable
@ 2024-12-09 16:07 Carsten Schlote
0 siblings, 0 replies; only message in thread
From: Carsten Schlote @ 2024-12-09 16:07 UTC (permalink / raw)
To: ptxdist
Changed code to detect broken detection and to prevent an invalid comp
variable ('=').
It will be set to com="" in this case.
The target objcopy tool will use its internal default for compression in
this case.
Signed-off-by: Carsten Schlote <schlote@vahanus.net>
---
scripts/lib/ptxd_make_xpkg_pkg.sh | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh
b/scripts/lib/ptxd_make_xpkg_pkg.sh
index 08a0ab593..36bb3a564 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -390,11 +390,15 @@ ptxd_install_compression_format() {
libc="$(ptxd_cross_cc -print-file-name=libc.so.6 2> /dev/null)"
if [ -n "${libc}" ]; then
- comp="=$(readelf -t "${libc}" | sed -n -e
'/COMPRESSED/{N;s/.*\(ZLIB\|ZSTD\).*/\1/p;q}' | tr '[:upper:]' '[:lower:]')"
+ comp="=$(readelf -t "${libc}" | sed -n -e
'/COMPRESSED/{N;s/.*\(ZLIB\|ZSTD\).*/\1/p;q}' | tr '[:upper:]' '[:lower:]')"
+ fi
+ if [ "${comp}" == "=" ]; then
+ comp=""
fi
export ptxd_install_file_objcopy_args="--only-keep-debug
--compress-debug-sections${comp}"
}
+
ptxd_install_compression_format
ptxd_install_file_extract_debug() {
--
2.47.1
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-12-11 10:50 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-12-09 16:07 [ptxdist] [PATCH] ptxd_make_xpkg_pkg.sh: Prevent empty comp variable Carsten Schlote
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox