From: Florian Weimer <fweimer@redhat.com>
To: libc-alpha@sourceware.org
Subject: [PATCH] build-many-glibcs.py: Fix “glibcs i686-gnu --strip”
Date: Wed, 18 Dec 2019 11:12:00 -0000 [thread overview]
Message-ID: <875zid3n1g.fsf@oldenburg2.str.redhat.com> (raw)
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(-)
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)
--
(Footer added to prevent Zimbra from stripping trailing whitespace.)
next reply other threads:[~2019-12-18 11:12 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-18 11:12 Florian Weimer [this message]
2019-12-18 17:54 ` Joseph Myers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=875zid3n1g.fsf@oldenburg2.str.redhat.com \
--to=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).