• Sergei Trofimovich's avatar
    systools: fix gcc version detecton on non-english locale · 4d4d0770
    Sergei Trofimovich authored
    
    
    Summary:
    ghc runs 'gcc -v' to check if we run under vanilla gcc
    or disaguised clang by checking for string
    
        "gcc version <something>"
    
    But this check does not always work as gcc has that string
    localized via gettext mechanism:
    
        (some gcc's locale strings)
        be.po-msgstr "версія gcc %s\n"
        da.po-msgstr "GCC version %s\n"
        de.po-msgstr "gcc-Version %s %s\n"
        el.po-msgstr "έκδοση gcc %s\n"
        ...
    
    To ping gcc to English locale we now override environment
    variable with 'LANGUAGE=en' value.
    
    Fixes Issue #8825
    Signed-off-by: default avatarSergei Trofimovich <slyfox@gentoo.org>
    
    Test Plan: validate
    
    Reviewers: austin
    
    Reviewed By: austin
    
    Subscribers: simonmar, ezyang, carter
    
    Differential Revision: https://phabricator.haskell.org/D185
    
    GHC Trac Issues: #8825
    4d4d0770
SysTools.lhs 62.3 KB