From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 111456 invoked by alias); 21 Mar 2016 06:22:45 -0000 Mailing-List: contact libc-stable-help@sourceware.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Subscribe: List-Archive: Sender: libc-stable-owner@sourceware.org Received: (qmail 111415 invoked by uid 89); 21 Mar 2016 06:22:44 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Checked: by ClamAV 0.99 on sourceware.org X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 spammy=20160321, 2016-03-21, Write, dylan X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_20,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on sourceware.org X-Spam-Level: X-HELO: smtp.gentoo.org From: Mike Frysinger To: libc-stable@sourceware.org Subject: [COMMITTED/2.22] math: don't clobber old libm.so on install [BZ #19822] Date: Fri, 01 Jan 2016 00:00:00 -0000 Message-Id: <1458541357-9122-1-git-send-email-vapier@gentoo.org> X-Mailer: git-send-email 2.7.4 X-SW-Source: 2016-03/txt/msg00007.txt.bz2 From: Dylan Alex Simon When installing glibc (w/mathvec enabled) in-place on a system with a glibc w/out mathvec enabled, the install will clobber the existing libm.so (e.g., /lib64/libm-2.21.so) with a linker script. This is because libm.so is a symlink to libm.so.6 which is a symlink to the final libm-2.21.so file. When the makefile writes the linker script directly to libm.so, it gets clobbered. The simple patch below to math/Makefile fixes this. It is based on the nptl Makefile, which does exactly the same thing in a safer way. (cherry picked from commit f9378ac3773ffe998a2b3406568778ee9f77f759) --- ChangeLog | 6 ++++++ NEWS | 2 +- math/Makefile | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ba4a3f2..d97d7a5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2016-03-21 Dylan Alex Simon + + [BZ #19822] + * math/Makefile ($(inst_libdir)/libm.so): Write output to $@.tmp and + move it to the final $@ location. + 2016-03-15 Andreas Schwab [BZ #19257] diff --git a/NEWS b/NEWS index 93c46af..dbd647c 100644 --- a/NEWS +++ b/NEWS @@ -25,7 +25,7 @@ Version 2.22.1 17905, 18420, 18421, 18480, 18589, 18743, 18778, 18781, 18787, 18796, 18870, 18887, 18921, 18928, 18969, 18985, 19003, 19018, 19058, 19174, - 19178, 19590, 19682. + 19178, 19590, 19682, 19822. * The LD_POINTER_GUARD environment variable can no longer be used to disable the pointer guard feature. It is always enabled. diff --git a/math/Makefile b/math/Makefile index 2c9d72d..84b4ded 100644 --- a/math/Makefile +++ b/math/Makefile @@ -99,7 +99,8 @@ $(inst_libdir)/libm.so: $(common-objpfx)format.lds \ cat $<; \ echo 'GROUP ( $(slibdir)/libm.so$(libm.so-version) ' \ 'AS_NEEDED ( $(libdir)/libmvec_nonshared.a $(slibdir)/libmvec.so$(libmvec.so-version) ) )' \ - ) > $@ + ) > $@.new + mv -f $@.new $@ endif # Rules for the test suite. -- 2.7.4