[PATCH] configure.ac: fix bashism in configure.ac
Sam James
sam@gentoo.org
Tue Mar 22 17:15:32 GMT 2022
> On 22 Mar 2022, at 12:46, Adhemerval Zanella <adhemerval.zanella@linaro.org> wrote:
>
>
>
> On 21/03/2022 20:03, Sam James via Libc-alpha wrote:
>> configure scripts need to be runnable with a POSIX-compliant /bin/sh.
>>
>> On many (but not all!) systems, /bin/sh is provided by Bash, so errors
>> like this aren't spotted. Notably Debian defaults to /bin/sh provided
>> by dash which doesn't tolerate such bashisms as '=='.
>>
>> This retains compatibility with bash.
>>
>> Fixes configure warnings/errors like:
>> ```
>> checking if compiler warns about alias for function with incompatible types... yes
>> /var/tmp/portage/sys-libs/glibc-2.34-r10/work/glibc-2.34/configure: 4209: test: xyes: unexpected operator
>> ```
>>
>> Signed-off-by: Sam James <sam@gentoo.org>
>
> There are other occurrences of this bashism as on other configure.ac:
>
> sysdeps/powerpc/powerpc64/le/configure.ac:66:AS_IF([test "$libc_cv_compiler_powerpc64le_ldbl128_mabi" == "no"],
> sysdeps/powerpc/powerpc64/le/fpu/multiarch/configure.ac:12:AS_IF([[test "$libc_cv_mcpu_power10" == "yes"]],[
>
> Should we fix it them as well?
>
Thanks, I goofed up the grep. Fixed!
> Beside LGTM, thanks.
>
> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
I forgot to add your tag on sending v2, but I didn't want to send a v3 for it (unless I should?)
Best,
sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 618 bytes
Desc: Message signed with OpenPGP
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20220322/8b0df723/attachment.sig>
More information about the Libc-alpha
mailing list