public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: srinivas pandruvada <srinivas.pandruvada@linux.intel.com>
To: Khem Raj <raj.khem@gmail.com>,
	platform-driver-x86@vger.kernel.org,
	 linux-kernel@vger.kernel.org
Cc: Len Brown <len.brown@intel.com>
Subject: Re: [PATCH] tools/power/x86/intel-speed-select: Prefix header search path with sysroot
Date: Mon, 03 Feb 2025 19:43:17 -0800	[thread overview]
Message-ID: <f5b4881928e3395eee9b6e6a4fb89f3d605cfd2e.camel@linux.intel.com> (raw)
In-Reply-To: <20250129033932.2576077-1-raj.khem@gmail.com>

On Tue, 2025-01-28 at 19:39 -0800, Khem Raj wrote:
> 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>
> Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>
> Cc: Len Brown <len.brown@intel.com>

Thanks. will take for the next release.

-Srinivas

> ---
>  tools/power/x86/intel-speed-select/Makefile | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/tools/power/x86/intel-speed-select/Makefile
> b/tools/power/x86/intel-speed-select/Makefile
> index 7221f2f55e8b..8d3a02a20f3d 100644
> --- a/tools/power/x86/intel-speed-select/Makefile
> +++ b/tools/power/x86/intel-speed-select/Makefile
> @@ -13,7 +13,7 @@ endif
>  # Do not use make's built-in rules
>  # (this improves performance and avoids hard-to-debug behaviour);
>  MAKEFLAGS += -r
> -override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include -
> I/usr/include/libnl3
> +override CFLAGS += -O2 -Wall -g -D_GNU_SOURCE -I$(OUTPUT)include -
> I$(shell $(CC) -print-sysroot)/usr/include/libnl3
>  override LDFLAGS += -lnl-genl-3 -lnl-3
>  
>  ALL_TARGETS := intel-speed-select


      reply	other threads:[~2025-02-04  3:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-29  3:39 [PATCH] tools/power/x86/intel-speed-select: Prefix header search path with sysroot Khem Raj
2025-02-04  3:43 ` srinivas pandruvada [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f5b4881928e3395eee9b6e6a4fb89f3d605cfd2e.camel@linux.intel.com \
    --to=srinivas.pandruvada@linux.intel.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=raj.khem@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox