From fd391ccb22fbb8db584025c944566a846ac17f9c Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Wed, 18 Dec 2019 12:02:20 +0100 Subject: =?UTF-8?q?build-many-glibcs.py:=20Fix=20=E2=80=9Cglibcs=20i686-gn?= =?UTF-8?q?u=20--strip=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hurd uses 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 e898f979c5..9cd90d5101 100755 --- a/scripts/build-many-glibcs.py +++ b/scripts/build-many-glibcs.py @@ -1483,10 +1483,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) -- cgit v1.2.1