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]

Re: [PATCH] bash vs. dash: Avoid unportable shell feature in gcc/configure.ac


Ok.

Paolo

On Wed, Jul 13, 2011 at 19:17, Thomas Schwinge <thomas@schwinge.name> wrote:
> Hallo!
>
> On Wed, 13 Jul 2011 18:23:50 +0200, Paolo Bonzini <bonzini@gnu.org> wrote:
>> On 07/13/2011 06:13 PM, Thomas Schwinge wrote:
>> > Alternatively, gcc_GAS_CHECK_FEATURE could be changed to emit the
>> > temporary file by using a shell here-doc, which is what AC_TRY_COMPILE is
>> > doing, for example.
>>
>> Change instead echo ifelse(...) > conftest.s to
>>
>> ? ?AS_ECHO([m4_if(...)]) > conftest.s
>>
>> in gcc_GAS_CHECK_FEATURE.
>
> Ah, even better.
>
> ? ? ? ?gcc/
> ? ? ? ?* acinclude.m4 (gcc_GAS_CHECK_FEATURE): Use AS_ECHO instead of echo.
> ? ? ? ?* configure: Regenerate.
>
> diff --git a/gcc/acinclude.m4 b/gcc/acinclude.m4
> index ff38682..f092925 100644
> --- a/gcc/acinclude.m4
> +++ b/gcc/acinclude.m4
> @@ -583,7 +583,7 @@ AC_CACHE_CHECK([assembler for $1], [$2],
> ? if test $in_tree_gas = yes; then
> ? ? gcc_GAS_VERSION_GTE_IFELSE($3, [[$2]=yes])
> ? el])if test x$gcc_cv_as != x; then
> - ? ?echo ifelse(m4_substr([$5],0,1),[$], "[$5]", '[$5]') > conftest.s
> + ? ?AS_ECHO([ifelse(m4_substr([$5],0,1),[$], "[$5]", '[$5]')]) > conftest.s
> ? ? if AC_TRY_COMMAND([$gcc_cv_as $gcc_cv_as_flags $4 -o conftest.o conftest.s >&AS_MESSAGE_LOG_FD])
> ? ? then
> ? ? ? ?ifelse([$6],, [$2]=yes, [$6])
>
> The configure differences are strictly s%echo%$as_echo%.
>
>
> Grüße,
> ?Thomas
>


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