Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame^] | 1 | From 3c5fb3a8691ac711ea93edf8e0b42bffc62b197e Mon Sep 17 00:00:00 2001 |
| 2 | From: Martin Jansa <Martin.Jansa@gmail.com> |
| 3 | Date: Tue, 24 Apr 2012 11:52:35 +0200 |
| 4 | Subject: [PATCH 1/4] SConstruct: respect sysroot also in SPLINTOPTS |
| 5 | |
| 6 | Upstream-Status: Inappropriate [embedded specific] |
| 7 | |
| 8 | Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com> |
| 9 | Signed-off-by: Denis 'GNUtoo' Carikli <GNUtoo@no-log.org> |
| 10 | Signed-off-by: Peter A. Bigot <pab@pabigot.com> |
| 11 | --- |
| 12 | SConstruct | 5 ++++- |
| 13 | 1 file changed, 4 insertions(+), 1 deletion(-) |
| 14 | |
| 15 | diff --git a/SConstruct b/SConstruct |
| 16 | index 14e2f59..f0cafa8 100644 |
| 17 | --- a/SConstruct |
| 18 | +++ b/SConstruct |
| 19 | @@ -1414,7 +1414,10 @@ def Utility(target, source, action): |
| 20 | # Report splint warnings |
| 21 | # Note: test_bits.c is unsplintable because of the PRI64 macros. |
| 22 | # If you get preprocessor or fatal errors, add +showscan. |
| 23 | -splintopts = "-I/usr/include/libusb-1.0 +quiet" |
| 24 | +if not env['sysroot']: |
| 25 | + splintopts = "-I/usr/include/libusb-1.0 +quiet" |
| 26 | +else: |
| 27 | + splintopts = "-I%s/usr/include/libusb-1.0 +quiet" % env['sysroot'] |
| 28 | # splint does not know about multi-arch, work around that |
| 29 | ma_status, ma = _getstatusoutput('dpkg-architecture -qDEB_HOST_MULTIARCH') |
| 30 | if ma_status == 0: |
| 31 | -- |
| 32 | 1.8.5.5 |
| 33 | |