The cirros image was rebuilt against the 3.13.0-83 kernel, drivers e1000e, igbvf...
[packages/trusty/cirros-testvm.git] / cirros-testvm / src-cirros / buildroot-2015.05 / package / python3 / 001-remove-host-header-path.patch
1 setup.py: do not add invalid header locations
2
3 This piece of code incorrectly adds /usr/include to
4 self.compiler.include_dirs, and results in the following invalid
5 compilation line:
6
7 /home/thomas/projets/buildroot/output/host/usr/bin/arm-none-linux-gnueabi-gcc
8   -fPIC -Wno-unused-result -Werror=declaration-after-statement -DNDEBUG -g
9   -O3 -Wall -Wstrict-prototypes -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
10   -D_FILE_OFFSET_BITS=64 -pipe -Os
11   -I./Include -I/usr/include -I. -IInclude
12   -I/home/thomas/projets/buildroot/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include
13   -I/home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Include
14   -I/home/thomas/projets/buildroot/output/build/python3-3.4.0b1
15   -c /home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Modules/_struct.c
16   -o build/temp.linux-arm-3.4/home/thomas/projets/buildroot/output/build/python3-3.4.0b1/Modules/_struct.o
17 cc1: warning: include location "/usr/include" is unsafe for cross-compilation [-Wpoison-system-directories]
18
19 The -I/usr/include is wrong when cross compiling, so we disable adding
20 INCLUDEDIR and LIBDIR from the host when cross compiling.
21
22 Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
23 Index: b/setup.py
24 ===================================================================
25 --- a/setup.py
26 +++ b/setup.py
27 @@ -493,7 +493,8 @@
28                          add_dir_to_list(dir_list, directory)
29  
30          if os.path.normpath(sys.base_prefix) != '/usr' \
31 -                and not sysconfig.get_config_var('PYTHONFRAMEWORK'):
32 +                and not sysconfig.get_config_var('PYTHONFRAMEWORK') \
33 +                and not cross_compiling:
34              # OSX note: Don't add LIBDIR and INCLUDEDIR to building a framework
35              # (PYTHONFRAMEWORK is set) to avoid # linking problems when
36              # building a framework with different architectures than