Open damiendoligez opened 7 years ago
When did that change?! While adapting to the space will fix French, we're only succeeding because the French and English word happen to be the same...
libraries
is not a French word, so they managed to screw up the translation. German translator did a better job:
$ LANG=fr_FR x86_64-w64-mingw32-gcc -print-search-dirs | grep sys-root
libraries : =/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/../lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/x86_64-w64-mingw32/5.4.0/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/
~
$ LANG=de_DE x86_64-w64-mingw32-gcc -print-search-dirs | grep sys-root
Bibliotheken: =/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/x86_64-w64-mingw32/5.4.0/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/../lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/x86_64-w64-mingw32/5.4.0/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/:/usr/lib/gcc/x86_64-w64-mingw32/5.4.0/../../../../x86_64-w64-mingw32/lib/:/usr/x86_64-w64-mingw32/sys-root/mingw/lib/
@damiendoligez @dra27 Do you believe that setting LANG before calling gcc -print-search-dirs
would be a good approach? Or to hard-code parsing the third line of result (after '=')?
I think setting LC_ALL would be best. Hard-coding the line seems really brittle.
BTW I just tested again on an updated Windows and now I get this:
bibliothèques: =/usr/lib/gcc/x86_64-pc-cygwin/6.4.0/...
With LC_ALL=C
I get the expected message (in English).
Definitely the LC_ALL solution - unless gcc has a more reliable way of getting the exact answer we're after?
This is the output of
x86_64-w64-mingw32-gcc -print-search-dirs
on a French-configured windows 10:flexlink
fails to parse it because of the space betweenlibraries
and:
I don't know who had the bright idea of localizing this part of
gcc
but it looks like you'll need to adapt.