public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] libstdc++: Fix error shown during Solaris build
@ 2020-11-13 11:07 Jonathan Wakely
  2020-11-13 11:16 ` Jonathan Wakely
  2020-11-16 10:17 ` Rainer Orth
  0 siblings, 2 replies; 11+ messages in thread
From: Jonathan Wakely @ 2020-11-13 11:07 UTC (permalink / raw)
  To: libstdc++, gcc-patches; +Cc: Rainer Orth, Iain Sandoe

[-- Attachment #1: Type: text/plain, Size: 1433 bytes --]

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.

Tested sparc-solaris2.11. Rainer, does this look OK?

Iain, the libstdc++-symbols.explist target for Darwin is very similar,
but I don't know if it's a problem there. Does GLIBCXX_LIBS contain
anything in $target/libstdc++-v3/src/Makefile on Darwin?

Should we make the same change just in case?



[-- Attachment #2: patch.txt --]
[-- Type: text/plain, Size: 2134 bytes --]

commit 5b9b2158b08650b15049564a4e87b7b5cac49759
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Fri Nov 13 10:39:23 2020

    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 --git a/libstdc++-v3/src/Makefile.am b/libstdc++-v3/src/Makefile.am
index 1eda70edb379..21b6db7fb1c3 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

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] libstdc++: Fix error shown during Solaris build
  2020-11-13 11:07 [PATCH] libstdc++: Fix error shown during Solaris build Jonathan Wakely
@ 2020-11-13 11:16 ` Jonathan Wakely
  2020-11-13 11:22   ` Iain Sandoe
  2020-11-16 10:23   ` Rainer Orth
  2020-11-16 10:17 ` Rainer Orth
  1 sibling, 2 replies; 11+ messages in thread
From: Jonathan Wakely @ 2020-11-13 11:16 UTC (permalink / raw)
  To: libstdc++, gcc-patches; +Cc: Rainer Orth, Iain Sandoe

On 13/11/20 11:07 +0000, Jonathan Wakely wrote:
>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.
>
>Tested sparc-solaris2.11. Rainer, does this look OK?
>
>Iain, the libstdc++-symbols.explist target for Darwin is very similar,
>but I don't know if it's a problem there. Does GLIBCXX_LIBS contain
>anything in $target/libstdc++-v3/src/Makefile on Darwin?
>
>Should we make the same change just in case?

On examining acinclude.m4 it looks like GLIBCXX_LIBS could in theory
be non-empty for any target, including Darwin:

   elif test x"$enable_libstdcxx_time" != x"no"; then

     if test x"$enable_libstdcxx_time" = x"rt"; then
       AC_SEARCH_LIBS(clock_gettime, [rt posix4])
       AC_SEARCH_LIBS(nanosleep, [rt posix4])
     else
       AC_SEARCH_LIBS(clock_gettime, [posix4])
       AC_SEARCH_LIBS(nanosleep, [posix4])
     fi

     case "$ac_cv_search_clock_gettime" in
       -l*) GLIBCXX_LIBS=$ac_cv_search_clock_gettime
       ;;
     esac
     case "$ac_cv_search_nanosleep" in
       -l*) GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_nanosleep"
       ;;
     esac

     AC_SEARCH_LIBS(sched_yield, [rt posix4])

     case "$ac_cv_search_sched_yield" in
       -lposix4*)
       GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_sched_yield"
       ac_has_sched_yield=yes
       ;;
       -lrt*)
       if test x"$enable_libstdcxx_time" = x"rt"; then
	GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_sched_yield"
         ac_has_sched_yield=yes
       fi
       ;;
       *)
       ac_has_sched_yield=yes
       ;;
     esac

But in practice the snippet above is only used if you explicitly
configure with --enable-libstdcxx-time={yes,rt} and will only add
anything to GLIBCXX_LIBS if clock_gettime or nanosleep lives in one of
librt or libposix4. I think libposix4 is Solaris-specific, and I don't
think Darwin has librt. So in practice I don't think there's a
problem on Darwin today.




^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] libstdc++: Fix error shown during Solaris build
  2020-11-13 11:16 ` Jonathan Wakely
@ 2020-11-13 11:22   ` Iain Sandoe
  2020-11-16 10:23   ` Rainer Orth
  1 sibling, 0 replies; 11+ messages in thread
From: Iain Sandoe @ 2020-11-13 11:22 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc-patches, Rainer Orth

Jonathan Wakely <jwakely@redhat.com> wrote:

> On 13/11/20 11:07 +0000, Jonathan Wakely wrote:
>> 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.
>>
>> Tested sparc-solaris2.11. Rainer, does this look OK?
>>
>> Iain, the libstdc++-symbols.explist target for Darwin is very similar,
>> but I don't know if it's a problem there. Does GLIBCXX_LIBS contain
>> anything in $target/libstdc++-v3/src/Makefile on Darwin?
>>
>> Should we make the same change just in case?
>
> On examining acinclude.m4 it looks like GLIBCXX_LIBS could in theory
> be non-empty for any target, including Darwin:
>
>  elif test x"$enable_libstdcxx_time" != x"no"; then
>
>    if test x"$enable_libstdcxx_time" = x"rt"; then
>      AC_SEARCH_LIBS(clock_gettime, [rt posix4])
>      AC_SEARCH_LIBS(nanosleep, [rt posix4])
>    else
>      AC_SEARCH_LIBS(clock_gettime, [posix4])
>      AC_SEARCH_LIBS(nanosleep, [posix4])
>    fi
>
>    case "$ac_cv_search_clock_gettime" in
>      -l*) GLIBCXX_LIBS=$ac_cv_search_clock_gettime
>      ;;
>    esac
>    case "$ac_cv_search_nanosleep" in
>      -l*) GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_nanosleep"
>      ;;
>    esac
>
>    AC_SEARCH_LIBS(sched_yield, [rt posix4])
>
>    case "$ac_cv_search_sched_yield" in
>      -lposix4*)
>      GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_sched_yield"
>      ac_has_sched_yield=yes
>      ;;
>      -lrt*)
>      if test x"$enable_libstdcxx_time" = x"rt"; then
> 	GLIBCXX_LIBS="$GLIBCXX_LIBS $ac_cv_search_sched_yield"
>        ac_has_sched_yield=yes
>      fi
>      ;;
>      *)
>      ac_has_sched_yield=yes
>      ;;
>    esac
>
> But in practice the snippet above is only used if you explicitly
> configure with --enable-libstdcxx-time={yes,rt} and will only add
> anything to GLIBCXX_LIBS if clock_gettime or nanosleep lives in one of
> librt or libposix4. I think libposix4 is Solaris-specific, and I don't
> think Darwin has librt. So in practice I don't think there's a
> problem on Darwin today.

Agreed, neither of those libs is currently in use on Darwin.

There have, in some cases, been library entries that are simply a symlink to
the one providing the equivalent functionality, to minimize cross-platform  
build
hassles - but I see no entry for librt.dylib or posix4.

thanks
Iain



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] libstdc++: Fix error shown during Solaris build
  2020-11-13 11:07 [PATCH] libstdc++: Fix error shown during Solaris build Jonathan Wakely
  2020-11-13 11:16 ` Jonathan Wakely
@ 2020-11-16 10:17 ` Rainer Orth
  2020-11-16 10:32   ` Jonathan Wakely
  1 sibling, 1 reply; 11+ messages in thread
From: Rainer Orth @ 2020-11-16 10:17 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc-patches, Iain Sandoe

Hi Jonathan,

> 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.
>
> Tested sparc-solaris2.11. Rainer, does this look OK?

it does, but let me give it a try with both GNU sed and Solaris sed: we
had too many weird issues with the latter ;-(

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] libstdc++: Fix error shown during Solaris build
  2020-11-13 11:16 ` Jonathan Wakely
  2020-11-13 11:22   ` Iain Sandoe
@ 2020-11-16 10:23   ` Rainer Orth
  2020-11-16 10:28     ` Jonathan Wakely
  1 sibling, 1 reply; 11+ messages in thread
From: Rainer Orth @ 2020-11-16 10:23 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc-patches, Iain Sandoe

Hi Jonathan,

> But in practice the snippet above is only used if you explicitly
> configure with --enable-libstdcxx-time={yes,rt} and will only add
> anything to GLIBCXX_LIBS if clock_gettime or nanosleep lives in one of
> librt or libposix4. I think libposix4 is Solaris-specific, and I don't
> think Darwin has librt. So in practice I don't think there's a
> problem on Darwin today.

I've had a look and both support for libposix4 and librt can go on
Solaris: libposix4 was renamed to librt in Solaris 7 (1998) and librt
was folded into libc in the OpenSolaris timeframe, leaving librt only as
a filter on libc.  Thus, it's no longer need on either Solaris 11 or
Illumos.  Unfortunately, it seems librt support cannot go completely:
it's still needed for HP-UX 11 (sem_init) and glibc < 2.17
(clock_gettime).

I'll prepare a patch for the Solaris side.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] libstdc++: Fix error shown during Solaris build
  2020-11-16 10:23   ` Rainer Orth
@ 2020-11-16 10:28     ` Jonathan Wakely
  0 siblings, 0 replies; 11+ messages in thread
From: Jonathan Wakely @ 2020-11-16 10:28 UTC (permalink / raw)
  To: Rainer Orth; +Cc: libstdc++, gcc-patches, Iain Sandoe

On 16/11/20 11:23 +0100, Rainer Orth wrote:
>Hi Jonathan,
>
>> But in practice the snippet above is only used if you explicitly
>> configure with --enable-libstdcxx-time={yes,rt} and will only add
>> anything to GLIBCXX_LIBS if clock_gettime or nanosleep lives in one of
>> librt or libposix4. I think libposix4 is Solaris-specific, and I don't
>> think Darwin has librt. So in practice I don't think there's a
>> problem on Darwin today.
>
>I've had a look and both support for libposix4 and librt can go on
>Solaris: libposix4 was renamed to librt in Solaris 7 (1998) and librt

Yes, I was aware of that renaming.

>was folded into libc in the OpenSolaris timeframe, leaving librt only as
>a filter on libc.

Ah, I didn't know that.

>Thus, it's no longer need on either Solaris 11 or
>Illumos.  Unfortunately, it seems librt support cannot go completely:
>it's still needed for HP-UX 11 (sem_init) and glibc < 2.17
>(clock_gettime).
>
>I'll prepare a patch for the Solaris side.

Great, thanks.


^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] libstdc++: Fix error shown during Solaris build
  2020-11-16 10:17 ` Rainer Orth
@ 2020-11-16 10:32   ` Jonathan Wakely
  2020-11-16 10:37     ` Jonathan Wakely
  2020-11-16 11:46     ` Rainer Orth
  0 siblings, 2 replies; 11+ messages in thread
From: Jonathan Wakely @ 2020-11-16 10:32 UTC (permalink / raw)
  To: Rainer Orth; +Cc: libstdc++, gcc-patches, Iain Sandoe

On 16/11/20 11:17 +0100, Rainer Orth wrote:
>Hi Jonathan,
>
>> 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.
>>
>> Tested sparc-solaris2.11. Rainer, does this look OK?
>
>it does, but let me give it a try with both GNU sed and Solaris sed: we
>had too many weird issues with the latter ;-(

I think the machine I tested on (gcc211 in the compile farm) only has
Solaris sed in the PATH, and it works there.

I did try to use "-l ?[[:alnum:]]+" but Solaris sed only supports BREs
(as POSIX requires) and there doesn't seem to be an equivalent of the
GNU sed -E option to use EREs.



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] libstdc++: Fix error shown during Solaris build
  2020-11-16 10:32   ` Jonathan Wakely
@ 2020-11-16 10:37     ` Jonathan Wakely
  2020-11-16 11:47       ` Rainer Orth
  2020-11-16 11:46     ` Rainer Orth
  1 sibling, 1 reply; 11+ messages in thread
From: Jonathan Wakely @ 2020-11-16 10:37 UTC (permalink / raw)
  To: Rainer Orth; +Cc: libstdc++, gcc-patches, Iain Sandoe

On 16/11/20 10:32 +0000, Jonathan Wakely wrote:
>On 16/11/20 11:17 +0100, Rainer Orth wrote:
>>Hi Jonathan,
>>
>>>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.
>>>
>>>Tested sparc-solaris2.11. Rainer, does this look OK?
>>
>>it does, but let me give it a try with both GNU sed and Solaris sed: we
>>had too many weird issues with the latter ;-(
>
>I think the machine I tested on (gcc211 in the compile farm) only has
>Solaris sed in the PATH, and it works there.
>
>I did try to use "-l ?[[:alnum:]]+" but Solaris sed only supports BREs
>(as POSIX requires) and there doesn't seem to be an equivalent of the
>GNU sed -E option to use EREs.

POSIX agreed to add the -E option 8 years ago but that hasn't made it
into the standard yet (because we're still on POSIX 2011+TC1+TC2 and
presumably have to wait for the next revision).

https://www.austingroupbugs.net/view.php?id=528
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/sed.html



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] libstdc++: Fix error shown during Solaris build
  2020-11-16 10:32   ` Jonathan Wakely
  2020-11-16 10:37     ` Jonathan Wakely
@ 2020-11-16 11:46     ` Rainer Orth
  2020-11-16 11:54       ` Jonathan Wakely
  1 sibling, 1 reply; 11+ messages in thread
From: Rainer Orth @ 2020-11-16 11:46 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc-patches, Iain Sandoe

Hi Jonathan,

>>> libstdc++-v3/ChangeLog:
>>>
>>> 	* src/Makefile.am (libstdc++-symbols.ver-sun): Remove -lrt from
>>> 	arguments passed to make_sunver.pl script.
>>> 	* src/Makefile.in: Regenerate.
>>>
>>> Tested sparc-solaris2.11. Rainer, does this look OK?
>>
>>it does, but let me give it a try with both GNU sed and Solaris sed: we
>>had too many weird issues with the latter ;-(
>
> I think the machine I tested on (gcc211 in the compile farm) only has
> Solaris sed in the PATH, and it works there.

I've now tested the patch on Solaris 11.3 with all of /bin/sed,
/usr/xpg4/bin/sed, and /usr/gnu/bin/sed.  Worked perfectly fine, so the
patch is ok, thanks for taking care of this.

> I did try to use "-l ?[[:alnum:]]+" but Solaris sed only supports BREs
> (as POSIX requires) and there doesn't seem to be an equivalent of the
> GNU sed -E option to use EREs.

Indeed, and that hasn't changed in Solaris 11.4 either.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] libstdc++: Fix error shown during Solaris build
  2020-11-16 10:37     ` Jonathan Wakely
@ 2020-11-16 11:47       ` Rainer Orth
  0 siblings, 0 replies; 11+ messages in thread
From: Rainer Orth @ 2020-11-16 11:47 UTC (permalink / raw)
  To: Jonathan Wakely; +Cc: libstdc++, gcc-patches, Iain Sandoe

Hi Jonathan,

>>I did try to use "-l ?[[:alnum:]]+" but Solaris sed only supports BREs
>>(as POSIX requires) and there doesn't seem to be an equivalent of the
>>GNU sed -E option to use EREs.
>
> POSIX agreed to add the -E option 8 years ago but that hasn't made it
> into the standard yet (because we're still on POSIX 2011+TC1+TC2 and
> presumably have to wait for the next revision).

and even so we still do support Solaris 11.3 from 2015 which certainly
won't get such a change.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: [PATCH] libstdc++: Fix error shown during Solaris build
  2020-11-16 11:46     ` Rainer Orth
@ 2020-11-16 11:54       ` Jonathan Wakely
  0 siblings, 0 replies; 11+ messages in thread
From: Jonathan Wakely @ 2020-11-16 11:54 UTC (permalink / raw)
  To: Rainer Orth; +Cc: libstdc++, gcc-patches, Iain Sandoe

On 16/11/20 12:46 +0100, Rainer Orth wrote:
>Hi Jonathan,
>
>>>> libstdc++-v3/ChangeLog:
>>>>
>>>> 	* src/Makefile.am (libstdc++-symbols.ver-sun): Remove -lrt from
>>>> 	arguments passed to make_sunver.pl script.
>>>> 	* src/Makefile.in: Regenerate.
>>>>
>>>> Tested sparc-solaris2.11. Rainer, does this look OK?
>>>
>>>it does, but let me give it a try with both GNU sed and Solaris sed: we
>>>had too many weird issues with the latter ;-(
>>
>> I think the machine I tested on (gcc211 in the compile farm) only has
>> Solaris sed in the PATH, and it works there.
>
>I've now tested the patch on Solaris 11.3 with all of /bin/sed,
>/usr/xpg4/bin/sed, and /usr/gnu/bin/sed.  Worked perfectly fine, so the
>patch is ok, thanks for taking care of this.

Pushed now, thanks for checking.


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-11-16 11:55 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-13 11:07 [PATCH] libstdc++: Fix error shown during Solaris build Jonathan Wakely
2020-11-13 11:16 ` Jonathan Wakely
2020-11-13 11:22   ` Iain Sandoe
2020-11-16 10:23   ` Rainer Orth
2020-11-16 10:28     ` Jonathan Wakely
2020-11-16 10:17 ` Rainer Orth
2020-11-16 10:32   ` Jonathan Wakely
2020-11-16 10:37     ` Jonathan Wakely
2020-11-16 11:47       ` Rainer Orth
2020-11-16 11:46     ` Rainer Orth
2020-11-16 11:54       ` 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).