This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH (repost): gcc/configure.in, improve sed portability


I received feedback on a first version (which I believe I satisfied
even though, in retrospect, some of it turned out to be red-herring)
but the updated version (reposted below) elicited no technical
comments.  http://gcc.gnu.org/ml/gcc-patches/2003-05/msg01452.html
contains the exhaustive list of sed implementations and binutils
version string formats (including all known non-FSF) that I tested
this version against.  Permission to apply to mainline?

	* configure.in (ld_vers): Portability [sed].
	* configure: Regenerate with autoconf213.

Index: gcc/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/gcc/configure.in,v
retrieving revision 1.692
diff -c -r1.692 configure.in
*** gcc/configure.in	23 Jun 2003 01:13:34 -0000	1.692
--- gcc/configure.in	24 Jun 2003 06:50:26 -0000
***************
*** 1839,1845 ****
  	ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
  	if echo "$ld_ver" | grep GNU > /dev/null; then
  changequote(,)dnl
!                ld_vers=`echo $ld_ver | sed -n 's,^.*[  ]\([0-9][0-9]*\.[0-9][0-9]*\(\|\.[0-9][0-9]*\(\|\.[0-9][0-9]*\)\)\)\([  ].*\|\)$,\1,p'`
                 ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
  		if test 0"$ld_date" -lt 20020404; then
  			if test -n "$ld_date"; then
--- 1839,1851 ----
  	ld_ver=`$gcc_cv_ld --version 2>/dev/null | head -1`
  	if echo "$ld_ver" | grep GNU > /dev/null; then
  changequote(,)dnl
!                ld_vers=`echo $ld_ver | sed -n \
! 	       -e 's,^.*[	 ]\([0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
! 	       -e 's,^.*[	 ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
! 	       -e 's,^.*[	 ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)$,\1,p' \
! 	       -e 's,^.*[	 ]\([0-9][0-9]*\.[0-9][0-9]*\)[	 ].*$,\1,p' \
! 	       -e 's,^.*[	 ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[	 ].*$,\1,p' \
! 	       -e 's,^.*[	 ]\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\)[	 ].*$,\1,p'`
                 ld_date=`echo $ld_ver | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`
  		if test 0"$ld_date" -lt 20020404; then
  			if test -n "$ld_date"; then


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]