public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/32287]  New: Grep for "as" broken -- configure: line 14092: test: too many arguments sleb128 uleb128
@ 2007-06-11 16:25 rob1weld at aol dot com
  2007-06-11 18:01 ` [Bug bootstrap/32287] " rob1weld at aol dot com
                   ` (15 more replies)
  0 siblings, 16 replies; 18+ messages in thread
From: rob1weld at aol dot com @ 2007-06-11 16:25 UTC (permalink / raw)
  To: gcc-bugs

This bug report may be distantly related to but (hopefully) is not a dupe of:
[4.3 Regression] Warnings while compiling libobjc with the uleb128 changes
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=30731

When I make gcc 4.3.0 I create a "make log" like so:
make 2>&1 | tee make_1_log.txt


File: gcc-4_3-trunk/gcc/configure has this line in it:
"# Check if we have .[us]leb128, and support symbol arithmetic with it."


When I check my log I see this:

# grep leb128 make_16_log.txt
checking assembler for .sleb128 and .uleb128...
/root/downloads/gcc-4_3-trunk/gcc/configure: line 14092: test: too many
arguments
checking assembler for .sleb128 and .uleb128...
/root/downloads/gcc-4_3-trunk/gcc/configure: line 14092: test: too many
arguments
checking assembler for .sleb128 and .uleb128...
/root/downloads/gcc-4_3-trunk/gcc/configure: line 14092: test: too many
arguments
/root/downloads/gcc-4_3-trunk/libobjc/exception.c:94: warning: passing argument
2 of 'read_uleb128' from incompatible pointer type
/root/downloads/gcc-4_3-trunk/libobjc/exception.c:103: warning: passing
argument 2 of 'read_uleb128' from incompatible pointer type
/root/downloads/gcc-4_3-trunk/libobjc/exception.c:234: warning: passing
argument 2 of 'read_uleb128' from incompatible pointer type


Looking at "gcc-4_3-trunk/gcc/configure" I see this:

        # GAS versions before 2.11 do not support uleb128,
  # despite appearing to.
  # ??? There exists an elf-specific test that will crash
  # the assembler.  Perhaps it's better to figure out whether
  # arbitrary sections are supported and try the test.
  as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
  if echo "$as_ver" | grep GNU > /dev/null; then
    as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
    as_major=`echo $as_ver | sed 's/\..*//'`
    as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
    if test $as_major -eq 2 && test $as_minor -lt 11
    then :
    else gcc_cv_as_leb128=yes
    fi
  fi



Running a few commands by hand gives this:

# echo `as --version 2>/dev/null | sed 1q`
GNU assembler (GNU Binutils) 2.17.50.20070426


# echo "GNU assembler (GNU Binutils) 2.17.50.20070426" | sed -e 's/GNU
assembler \([0-9.][0-9.]*\).*/\1/'
GNU assembler (GNU Binutils) 2.17.50.20070426

# echo "GNU assembler (GNU Binutils) 2.17.50.20070426" | sed -e 's/GNU
assembler (GNU Binutils) \([0-9.][0-9.]*\).*/\1/' 
2.17.50.20070426



Testing a few different assemblers that I have I see things like this:

# /usr/bin/as-Origonal --version
GNU assembler 2.17 Debian GNU/Linux

# /usr/bin/as-2.17cvs20070426 --version
GNU assembler (GNU Binutils) 2.17.50.20070426

# /usr/bin/as-2.17.50.20070426 --version
GNU assembler (GNU Binutils for Debian) 2.17.50.20070426


Try a new command string:
# echo "GNU assembler (GNU Binutils) 2.17.50.20070426" | grep -o [0-9.+] | tr
-d [:cntrl:]
2.17.50.20070426


FIX:

# diff -Naur gcc/configure-Origonal gcc/configure
--- gcc/configure-Origonal      2007-06-11 09:02:56.000000000 -0700
+++ gcc/configure       2007-06-11 09:03:56.000000000 -0700
@@ -14086,7 +14086,7 @@
   # arbitrary sections are supported and try the test.
   as_ver=`$gcc_cv_as --version 2>/dev/null | sed 1q`
   if echo "$as_ver" | grep GNU > /dev/null; then
-    as_ver=`echo $as_ver | sed -e 's/GNU assembler \([0-9.][0-9.]*\).*/\1/'`
+    as_ver=`echo $as_ver | grep -o [0-9.+] | tr -d [:cntrl:]
     as_major=`echo $as_ver | sed 's/\..*//'`
     as_minor=`echo $as_ver | sed 's/[^.]*\.\([0-9]*\).*/\1/'`
     if test $as_major -eq 2 && test $as_minor -lt 11

The patch grabs _only_ the version number (without so much as a trailing "\n").


-- 
           Summary: Grep for "as" broken -- configure: line 14092: test: too
                    many arguments sleb128 uleb128
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: bootstrap
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rob1weld at aol dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32287


^ permalink raw reply	[flat|nested] 18+ messages in thread
[parent not found: <bug-32287-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2012-02-03 22:48 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-06-11 16:25 [Bug bootstrap/32287] New: Grep for "as" broken -- configure: line 14092: test: too many arguments sleb128 uleb128 rob1weld at aol dot com
2007-06-11 18:01 ` [Bug bootstrap/32287] " rob1weld at aol dot com
2007-06-11 22:25 ` [Bug bootstrap/32287] gas version style changed causs warnings with configure pinskia at gcc dot gnu dot org
2007-06-12 11:37 ` rob1weld at aol dot com
2007-07-28  0:53 ` [Bug bootstrap/32287] gas version style changed causes " pinskia at gcc dot gnu dot org
2007-07-28  0:53 ` pinskia at gcc dot gnu dot org
2007-10-10 20:47 ` haubi at gentoo dot org
2007-11-20 19:46 ` rask at gcc dot gnu dot org
2008-01-15 10:39 ` aldot at gcc dot gnu dot org
2008-01-21 20:54 ` drow at gcc dot gnu dot org
2008-01-21 21:59 ` drow at gcc dot gnu dot org
2008-01-21 21:59 ` hjl dot tools at gmail dot com
2008-01-21 22:02 ` hjl dot tools at gmail dot com
2008-01-21 23:56 ` hjl dot tools at gmail dot com
2008-01-22 13:38 ` drow at gcc dot gnu dot org
2008-01-22 13:58 ` hjl at gcc dot gnu dot org
2008-01-22 14:22 ` hjl dot tools at gmail dot com
     [not found] <bug-32287-4@http.gcc.gnu.org/bugzilla/>
2012-02-03 22:48 ` pinskia at gcc dot gnu.org

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).