about summary refs log tree commit diff
path: root/scripts/build-many-glibcs.py
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2020-01-02 10:18:42 +0100
committerFlorian Weimer <fweimer@redhat.com>2020-01-02 10:18:42 +0100
commitcc47d5c5f53f6d845ac54698ae8929af15662c44 (patch)
treef5dcf85212d3e570f9f55165971cf7a55492d9a7 /scripts/build-many-glibcs.py
parent0933a4678c7d6afcd21ad1868a6de3a49a065b2e (diff)
downloadglibc-cc47d5c5f53f6d845ac54698ae8929af15662c44.tar.gz
glibc-cc47d5c5f53f6d845ac54698ae8929af15662c44.tar.xz
glibc-cc47d5c5f53f6d845ac54698ae8929af15662c44.zip
build-many-glibcs.py: Fix “glibcs i686-gnu --strip”
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.
Diffstat (limited to 'scripts/build-many-glibcs.py')
-rwxr-xr-xscripts/build-many-glibcs.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/scripts/build-many-glibcs.py b/scripts/build-many-glibcs.py
index 398de4528a..1bd7f24d7d 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)