Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Date: Mon, 19 Jan 2015 14:20:10 +0800
From: Vadim Ushakov <ushakov.vadim.s@...il.com>
To: musl@...ts.openwall.com
Subject: "checking whether compiler is gcc... no" on a non-English locale

Hello,

musl's ./configure fails to properly detect gcc compiler when running
on a non-English locale.

Output of gcc -v is localized. For example:

$ env LC_ALL=C gcc -v |& tail -1
gcc version 4.9.2 20141224 (prerelease) (GCC)
$ env LC_ALL=ru_RU.utf8 gcc -v |& tail -1
gcc версия 4.9.2 20141224 (prerelease) (GCC)
$ env LC_ALL=fi_FI.utf8 gcc -v |& tail -1
gcc-versio 4.9.2 20141224 (prerelease) (GCC)

Since ./configure attempts to detect gcc by fnmatch-ing output of gcc
-v against the pattern '*gcc\ version*', it fails.

Possible fix:

diff --git a/configure b/configure
index 673d291..e23a269 100755
--- a/configure
+++ b/configure
@@ -204,7 +204,7 @@ fi
 # musl-gcc wrapper, and for critical bug detection in some gcc versions.
 #
 printf "checking whether compiler is gcc... "
-if fnmatch '*gcc\ version*' "$($CC -v 2>&1)" ; then
+if fnmatch '*gcc\ version*' "$(env LC_ALL=C $CC -v 2>&1)" ; then
 cc_is_gcc=yes
 else
 cc_is_gcc=no



-- 
Regards,
Vadim Ushakov

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.