]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
build-many-glibcs.py: Fix “glibcs i686-gnu --strip”
authorFlorian Weimer <fweimer@redhat.com>
Thu, 2 Jan 2020 09:18:42 +0000 (10:18 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Thu, 2 Jan 2020 09:18:42 +0000 (10:18 +0100)
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

index 398de4528a1d4f5dcbcae1b521d86dac10ac7cff..1bd7f24d7d04379aaf5272f080a30753e59a7d0d 100755 (executable)
@@ -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)