From 4d4222dd27ca5be9d0d16ab180b98cc65cf7e5e3 Mon Sep 17 00:00:00 2001 From: Stan Shebs Date: Fri, 1 Jun 2018 14:57:50 -0700 Subject: [PATCH] Work around a make 3.81 segfault with clang --- elf/Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/elf/Makefile b/elf/Makefile index 7ce09250721..b9ea53932a2 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -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) \ -- 2.47.2