Skip to content

Commit 8d9cfb6

Browse files
krajspandruvada
authored andcommitted
tools/power/x86/intel-speed-select: Prefix header search path with sysroot
This helps when using a cross-compiler for building intel-speed-select, currently, its hardcoded to pick libnl3 headers from build host which may not be same as build target when cross compiling. cc -print-sysroot will print nothing if compiler is configured without a sysroot and result in same string as it is now. Fixes errors with gcc configured with host include poisoning e.g. cc1: error: include location "/usr/include/libnl3" is unsafe for cross-compilation [-Werror=poison-system-directories] Signed-off-by: Khem Raj <raj.khem@gmail.com> [ srinivas: Changelog edits for checkpatch warning ] Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
1 parent 7ad9373 commit 8d9cfb6

File tree

1 file changed

+1
-1
lines changed
  • tools/power/x86/intel-speed-select

1 file changed

+1
-1
lines changed

tools/power/x86/intel-speed-select/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ endif
1313
# Do not use make's built-in rules
1414
# (this improves performance and avoids hard-to-debug behaviour);
1515
MAKEFLAGS += -r
16-
override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include -I/usr/include/libnl3
16+
override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include -I$(shell $(CC) -print-sysroot)/usr/include/libnl3
1717
override LDFLAGS += -lnl-genl-3 -lnl-3
1818

1919
ALL_TARGETS := intel-speed-select

0 commit comments

Comments
 (0)