From mboxrd@z Thu Jan 1 00:00:00 1970 Delivery-date: Thu, 16 Jan 2025 17:10:08 +0100 Received: from metis.whiteo.stw.pengutronix.de ([2a0a:edc0:2:b01:1d::104]) by lore.white.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tYSRb-000euM-2b for lore@lore.pengutronix.de; Thu, 16 Jan 2025 17:10:08 +0100 Received: from localhost ([127.0.0.1] helo=metis.whiteo.stw.pengutronix.de) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1tYSRb-0002Se-Tq; Thu, 16 Jan 2025 17:10:07 +0100 Received: from drehscheibe.grey.stw.pengutronix.de ([2a0a:edc0:0:c01:1d::a2]) by metis.whiteo.stw.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1tYSR3-0001iq-Qo; Thu, 16 Jan 2025 17:09:33 +0100 Received: from dude05.red.stw.pengutronix.de ([2a0a:edc0:0:1101:1d::54]) by drehscheibe.grey.stw.pengutronix.de with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1tYSR3-000HTN-26; Thu, 16 Jan 2025 17:09:33 +0100 Received: from mol by dude05.red.stw.pengutronix.de with local (Exim 4.96) (envelope-from ) id 1tYSR3-001n54-1x; Thu, 16 Jan 2025 17:09:33 +0100 From: Michael Olbrich To: ptxdist@pengutronix.de Date: Thu, 16 Jan 2025 17:09:33 +0100 Message-Id: <20250116160933.426987-1-m.olbrich@pengutronix.de> X-Mailer: git-send-email 2.39.5 In-Reply-To: <20241218-fix-ptxd_install_compression_format-v1-1-8b4973b0bb55@pengutronix.de> References: <20241218-fix-ptxd_install_compression_format-v1-1-8b4973b0bb55@pengutronix.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: Re: [ptxdist] [APPLIED] ptxd_install_compression_format: don't use host readelf to figure out debug compression format X-BeenThere: ptxdist@pengutronix.de X-Mailman-Version: 2.1.29 Precedence: list List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ptxdist@pengutronix.de Cc: Marc Kleine-Budde Sender: "ptxdist" X-SA-Exim-Connect-IP: 127.0.0.1 X-SA-Exim-Mail-From: ptxdist-bounces@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false Thanks, applied as 21f4c86df87fcf2e5e17c732804d2afbc440eb4e. Michael [sent from post-receive hook] On Thu, 16 Jan 2025 17:09:33 +0100, Marc Kleine-Budde wrote: > The host readelf might be too old and doesn't understand the > compression formats of new toolchain libraries. This leads to the > following error: > > | readelf: Warning: section '.debug_str' has unsupported compress type: 2 > > Use coss-readelf of toolchain instead. > > Fixes: baf33e7186cb ("ptxd_install_file_extract_debug: pick the debug compression format from the toolchain") > Signed-off-by: Marc Kleine-Budde > Message-Id: <20241218-fix-ptxd_install_compression_format-v1-1-8b4973b0bb55@pengutronix.de> > Signed-off-by: Michael Olbrich > > diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh > index 08a0ab593feb..6d2d2fcafa65 100644 > --- a/scripts/lib/ptxd_make_xpkg_pkg.sh > +++ b/scripts/lib/ptxd_make_xpkg_pkg.sh > @@ -390,7 +390,7 @@ 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="=$($(ptxd_get_ptxconf PTXCONF_COMPILER_PREFIX)readelf -t "${libc}" | sed -n -e '/COMPRESSED/{N;s/.*\(ZLIB\|ZSTD\).*/\1/p;q}' | tr '[:upper:]' '[:lower:]')" > fi > export ptxd_install_file_objcopy_args="--only-keep-debug --compress-debug-sections${comp}" > }