Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
math: don't clobber old libm.so on install [BZ #19822]
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.
  • Loading branch information
Dylan Alex Simon authored and Mike Frysinger committed Mar 21, 2016
1 parent 6bc81cf commit f9378ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions ChangeLog
@@ -1,3 +1,9 @@
2016-03-21 Dylan Alex Simon <dylan-sourceware@dylex.net>

[BZ #19822]
* math/Makefile ($(inst_libdir)/libm.so): Write output to $@.tmp and
move it to the final $@ location.

2016-03-20 Adhemerval Zanella <adhemerval.zanella@linaro.org>

* sysdeps/unix/sysv/linux/spawni.c (__spawnix): Fix invalid memory
Expand Down
3 changes: 2 additions & 1 deletion math/Makefile
Expand Up @@ -100,7 +100,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.
Expand Down

0 comments on commit f9378ac

Please sign in to comment.