public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r11-5053] libstdc++: Fix error shown during Solaris build
@ 2020-11-16 11:54 Jonathan Wakely
0 siblings, 0 replies; only message in thread
From: Jonathan Wakely @ 2020-11-16 11:54 UTC (permalink / raw)
To: gcc-cvs, libstdc++-cvs
https://gcc.gnu.org/g:b2099e9fd94bb73e9fc7cb8f6dc5b2b53b5c5ff3
commit r11-5053-gb2099e9fd94bb73e9fc7cb8f6dc5b2b53b5c5ff3
Author: Jonathan Wakely <jwakely@redhat.com>
Date: Fri Nov 13 19:11:02 2020 +0000
libstdc++: Fix error shown during Solaris build
Currently this is shown when building libstdc++ on Solaris:
-lrt: open: No such file or directory
The error comes from the make_sunver.pl script which tries to open each
of its arguments. The arguments are passed by this make rule:
perl ${glibcxx_srcdir}/scripts/make_exports.pl \
libstdc++-symbols.ver \
$(libstdc___la_OBJECTS:%.lo=.libs/%.o) \
`echo $(libstdc___la_LIBADD) | \
sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
> $@ || (rm -f $@ ; exit 1)
The $(libstdc___la_LIBADD) variable includes $(GLIBCXX_LIBS) which
contains -lrt on Solaris.
This patch adds another sed script to filter -l arguments from the echo
command. In order to reliably match ' -l[^ ]* ' the echo arguments are
quoted and a space added before and after them. This might be overkill
just to remove -lrt from the start of the string, but should be robust
in case other -l arguments are added to $(GLIBCXX_LIBS), or in case the
$(libstdc___la_LIBADD) libraries are reordered.
libstdc++-v3/ChangeLog:
* src/Makefile.am (libstdc++-symbols.ver-sun): Remove -lrt from
arguments passed to make_sunver.pl script.
* src/Makefile.in: Regenerate.
Diff:
---
libstdc++-v3/src/Makefile.am | 4 ++--
libstdc++-v3/src/Makefile.in | 4 ++--
2 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 1eda70edb37..21b6db7fb1c 100644
--- a/libstdc++-v3/src/Makefile.am
+++ b/libstdc++-v3/src/Makefile.am
@@ -269,8 +269,8 @@ libstdc++-symbols.ver-sun : libstdc++-symbols.ver \
perl $(toplevel_srcdir)/contrib/make_sunver.pl \
libstdc++-symbols.ver \
$(libstdc___la_OBJECTS:%.lo=.libs/%.o) \
- `echo $(libstdc___la_LIBADD) | \
- sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
+ `echo ' $(libstdc___la_LIBADD) ' | \
+ sed -e 's,/\([^/.]*\)\.la,/.libs/\1.a,g' -e 's/ -l[^ ]* / /'` \
> $@ || (rm -f $@ ; exit 1)
endif
if ENABLE_SYMVERS_DARWIN
diff --git a/libstdc++-v3/src/Makefile.in b/libstdc++-v3/src/Makefile.in
index 7f559171355..e7ccdaeceab 100644
--- a/libstdc++-v3/src/Makefile.in
+++ b/libstdc++-v3/src/Makefile.in
@@ -1022,8 +1022,8 @@ compatibility-condvar.o: compatibility-condvar.cc
@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ perl $(toplevel_srcdir)/contrib/make_sunver.pl \
@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ libstdc++-symbols.ver \
@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ $(libstdc___la_OBJECTS:%.lo=.libs/%.o) \
-@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ `echo $(libstdc___la_LIBADD) | \
-@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ sed 's,/\([^/.]*\)\.la,/.libs/\1.a,g'` \
+@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ `echo ' $(libstdc___la_LIBADD) ' | \
+@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ sed -e 's,/\([^/.]*\)\.la,/.libs/\1.a,g' -e 's/ -l[^ ]* / /'` \
@ENABLE_SYMVERS_SUN_TRUE@@ENABLE_SYMVERS_TRUE@ > $@ || (rm -f $@ ; exit 1)
@ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@libstdc++-symbols.explist : libstdc++-symbols.ver \
@ENABLE_SYMVERS_DARWIN_TRUE@@ENABLE_SYMVERS_TRUE@ ${glibcxx_srcdir}/scripts/make_exports.pl \
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-11-16 11:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-16 11:54 [gcc r11-5053] libstdc++: Fix error shown during Solaris build Jonathan Wakely
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).