From patchwork Wed Dec 18 11:12:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1212249 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-108190-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="hAwmN29V"; dkim=pass (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.b="gU8lQqad"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 47dC6J5pP6z9sRh for ; Wed, 18 Dec 2019 22:12:56 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=dI/ nzQxnEL37jnFDKlKprHO/hNagQzFbvLEtC52Iq+abZTgfxT5ZQc9/RqYIs2LKRWU ug+dV6xgFpXz5B8W9h3uHmGtzGpRL/BOWGSoAvZfIzzSFmgDUvF3nygB1/bMzM3i 5O+KGHDBYNcVAW2qlABNleS5eiz0RE8PULu7MJys= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type:content-transfer-encoding; s=default; bh=fJNaw2sV0 XyQxIBCYQnfVnMyoaY=; b=hAwmN29V1Dp14ZPOaFNToGpqFFSauROY5tyYyjo5n xhMFb+xXW6cJv60FAZLQ+F5WbG7evYQCtQkevxAPRRnlT7ez0+fPuShSnPgp90YK 5U86APKY1dSaI1vd2IW1YgRPagU5/u+xZDtIkgx8N8zTXTu/7Vq0cTOqFJCZVI2Y Yk= Received: (qmail 122488 invoked by alias); 18 Dec 2019 11:12:36 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 122394 invoked by uid 89); 18 Dec 2019 11:12:35 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.6 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3 autolearn=ham version=3.3.1 spammy=footer, Footer X-HELO: us-smtp-1.mimecast.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1576667552; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=ZNZ4CNzYGT/65hZhC7Z748tDw4fyxhvK4M40EyfUufQ=; b=gU8lQqadVL3GOJ5FigsP2iBNTIfmDDjH5cihzj2TmByyOtFO/18RkpK72PRj35GDNfQeMZ M5KTou7bucLTv5EkN/SFT6lE9jUsWZoCsUceMq7f/JfwkC35Bdgw4Q20J+0WZl2IeJwrpa HEd9SBB5PSMWLcKPgDSC5zFen7dq7i0= From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] build-many-glibcs.py: Fix =?utf-8?b?4oCcZ2xpYmNz?= i686-gnu =?utf-8?q?--strip=E2=80=9D?= Date: Wed, 18 Dec 2019 12:12:27 +0100 Message-ID: <875zid3n1g.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 As posted, this change depends on the build-many-glibc.py for built-in system call tables, but this addresses a pre-existing issue. Verified that stripping works on x86_64-linux-gnu, i686-linux-gnu, x86_64-linux-gnu powerpc64le-linux-gnu (the installed files are actually unchanged there), and that i686-gnu now has stripped shared objects. Thanks, Florian 8<------------------------------------------------------------------8< Hurd sues an empty prefix, so the linker scripts end up in /lib, the find command picked them up, and stripping them failed because they are not ELF files. ----- scripts/build-many-glibcs.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) --- (Footer added to prevent Zimbra from stripping trailing whitespace.) diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py index eedaa55033..4afcd5aaea 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -1480,10 +1480,15 @@ class GlibcPolicyForBuild(GlibcPolicyDefault): def extra_commands(self, cmdlist): if self.strip: - cmdlist.add_command('strip', - ['sh', '-c', - ('%s $(find %s/lib* -name "*.so")' % - (self.strip, self.installdir))]) + # Avoid picking up libc.so and libpthread.so, which are + # linker scripts stored in /lib on Hurd. libc and + # libpthread are still stripped via their libc-X.YY.so + # implementation files. + find_command = (('find %s/lib* -name "*.so"' + + r' \! -name libc.so \! -name libpthread.so') + % self.installdir) + cmdlist.add_command('strip', ['sh', '-c', ('%s $(%s)' % + (self.strip, find_command))]) cmdlist.add_command('check', ['make', 'check']) cmdlist.add_command('save-logs', [self.save_logs], always_run=True)