1 Override system locale and set to default when adding gcc paths
3 Forces the use of the default locale in the function
4 add_gcc_paths, which is called when cross compiling to add the
5 include and library paths. This is necessary because otherwise
6 the gcc output is localized and the output parsing fails, which
7 results in no paths added and detect_modules not able to find
8 any system library (eg. libz, libssl, etc.)
10 [Thomas: patch taken from https://bugs.python.org/issue23767.]
12 Signed-off-by: Samuel Cabrero <samuelcabrero@gmail.com>
13 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
16 ===================================================================
20 tmpfile = os.path.join(self.build_temp, 'gccpaths')
21 if not os.path.exists(self.build_temp):
22 os.makedirs(self.build_temp)
23 - ret = os.system('%s -E -v - </dev/null 2>%s 1>/dev/null' % (gcc, tmpfile))
24 + ret = os.system('LC_ALL=C %s -E -v - </dev/null 2>%s 1>/dev/null' % (gcc, tmpfile))