openocd: avoid documentation rebuild to fix build issues
[buildroot-gz.git] / package / python / 018-fix-add-gcc-paths-logic.patch
blobaf6efcc38cdae1e0a4623a5a9085fcd859de480b
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>
15 Index: b/setup.py
16 ===================================================================
17 --- a/setup.py
18 +++ b/setup.py
19 @@ -414,7 +414,7 @@
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))
25 is_gcc = False
26 in_incdirs = False
27 inc_dirs = []