This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Support TLS with Sun as on Solaris 2/x86
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: Rainer Orth <ro at CeBiTec dot Uni-Bielefeld dot DE>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Wed, 24 Feb 2010 19:15:33 +0100
- Subject: Re: PATCH: Support TLS with Sun as on Solaris 2/x86
- References: <yddy6iik808.fsf@CeBiTec.Uni-Bielefeld.DE>
Hello Rainer,
* Rainer Orth wrote on Wed, Feb 24, 2010 at 03:45:11PM CET:
> * It adapts gcc/configure.ac to accept both syntaxes, using the Solaris
> 2/SPARC section as a guide, but avoiding to duplicate identical code.
> One ugly problem here is that I've had to move the
> AC_DEFINE(TLS_SECTION_ASM_FLAG) from the case statement where it
> belonged further down, otherwise autoconf would choke on me:
>
> /usr/bin/gm4:configure2.ac:2604: non-numeric argument to builtin `m4_substr'
> /usr/bin/gm4:configure2.ac:2604: Warning: too few arguments to builtin `m4_index'
> /usr/bin/gm4:configure2.ac:2604: Warning: excess arguments to builtin `m4_if' ignored
> /usr/bin/gm4:configure2.ac:2604: Warning: excess arguments to builtin `m4_if' ignored
> configure2.ac:2604: error: m4_cond: missing an argument
> configure2.ac:2604: the top level
> autom4te: /usr/bin/gm4 failed with exit status: 1
>
> and I've been completely unable to determine why this would happen.
You need to undo the changequote change before and redo it after the
macro invocation, i.e.,
changequote([,])dnl
AC_DEFINE(...)
changequote(,)dnl
The fact that autoconf can't sensibly look past changequote is one of
the primary reasons newer Autoconf releases advise against using
changequote. I haven't had the heart to propose a removal patch for GCC
yet though.
Cheers,
Ralf