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 v2, configure]: Enclose regexps in changequote block (was: Use @>:@ and @<:@ instead of square brackets in configure.ac)


On 02/18/2010 10:00 PM, Uros Bizjak wrote:
Hello!

autoconf eats square brackets, so this part of configure.ac:

# Also check for ld.so support, i.e. glibc 2.11 or higher.
    [if test x$host = x$build -a x$host = x$target &&
        glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then
       glibcmajor=`expr "$glibcver" : "\([0-9]*\)"`
       glibcminor=`expr "$glibcver" : "[2-9]*\.\([0-9]*\)"`
       glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
       if test "$glibcnum" -ge 2011 ; then
         enable_gnu_unique_object=yes

generates (note the absence of square brackets):

   # Also check for ld.so support, i.e. glibc 2.11 or higher.
    if test x$host = x$build -a x$host = x$target &&
        glibcver=`ldd --version 2>/dev/null | sed 's/.* //;q'`; then
       glibcmajor=`expr "$glibcver" : "\(0-9*\)"`
       glibcminor=`expr "$glibcver" : "2-9*\.\(0-9*\)"`
       glibcnum=`expr $glibcmajor \* 1000 + $glibcminor`
       if test "$glibcnum" -ge 2011 ; then
         enable_gnu_unique_object=yes

and this results in configure error:

checking assembler for gnu_unique_object... yes
expr: syntax error
/home/uros/gcc-svn/trunk/gcc/configure: line 24227: test: : integer expression expected

Actually, it seems that current practice is to enclose problematic regexps in a changequote block. Attached v2 patch follows this practice and encloses a couple of regexps in changequote blocks.


Oh, and these constructs are called quadrigraphs.

2010-02-18 Uros Bizjak <ubizjak@gmail.com>

    * configure.ac (gnu-unique-object): Wrap regexps using [] in
    changequote block.
    (__stack_chk_fail): Ditto.  Remove quadrigraphs.
    * configure: Regenerated.

Since this patch can be now considered trivial, I have went ahead and committed it to mainline SVN after bootstrapping the compiler on x86_64-pc-linux-gnu.

Uros.

Attachment: p.diff.txt
Description: Text document


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