]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Work around a make 3.81 segfault with clang
authorStan Shebs <stanshebs@google.com>
Fri, 1 Jun 2018 21:57:50 +0000 (14:57 -0700)
committerFangrui Song <i@maskray.me>
Fri, 27 Aug 2021 23:22:14 +0000 (16:22 -0700)
elf/Makefile

index 7ce09250721c58edd6981da0b098e4af9b6176eb..b9ea53932a20921d7b7e181e837e61c2c3848fdd 100644 (file)
@@ -455,10 +455,12 @@ $(objpfx)librtld.map: $(objpfx)dl-allobjs.os $(common-objpfx)libc_pic.a
        mv -f $@T $@
 
 # For lld, add to regexp below for optional address and size to be at front of line.
+# Also, Google b/79865038 reports that make 3.81 can segfault while iterating over
+# the repeated lib+file entries in the map; work around with sort -u .
 $(objpfx)librtld.mk: $(objpfx)librtld.map Makefile
        LC_ALL=C \
        sed -n 's@^[0-9a-f ]*$(common-objpfx)\([^(]*\)(\([^)]*\.os\)) *.*$$@\1 \2@p' \
-           $< | \
+           $< | LC_ALL=C sort -u | \
        while read lib file; do \
          case $$lib in \
          libc_pic.a) \