Patch "tools/resolve_btfids: Pass HOSTCFLAGS as EXTRA_CFLAGS to prepare targets" has been added to the 6.1-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    tools/resolve_btfids: Pass HOSTCFLAGS as EXTRA_CFLAGS to prepare targets

to the 6.1-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     tools-resolve_btfids-pass-hostcflags-as-extra_cflags-to-prepare-targets.patch
and it can be found in the queue-6.1 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.


>From 2531ba0e4ae67d6d0219400af27805fe52cd28e8 Mon Sep 17 00:00:00 2001
From: Jiri Olsa <jolsa@xxxxxxxxxx>
Date: Thu, 9 Feb 2023 15:37:35 +0100
Subject: tools/resolve_btfids: Pass HOSTCFLAGS as EXTRA_CFLAGS to prepare targets

From: Jiri Olsa <jolsa@xxxxxxxxxx>

commit 2531ba0e4ae67d6d0219400af27805fe52cd28e8 upstream.

Thorsten reported build issue with command line that defined extra
HOSTCFLAGS that were not passed into 'prepare' targets, but were
used to build resolve_btfids objects.

This results in build fail when these objects are linked together:

  /usr/bin/ld: /build.../tools/bpf/resolve_btfids//libbpf/libbpf.a(libbpf-in.o):
  relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a PIE \
  object; recompile with -fPIE

Fixing this by passing HOSTCFLAGS in EXTRA_CFLAGS as part of
HOST_OVERRIDES variable for prepare targets.

[1] https://lore.kernel.org/bpf/f7922132-6645-6316-5675-0ece4197bfff@xxxxxxxxxxxxx/

Fixes: 56a2df7615fa ("tools/resolve_btfids: Compile resolve_btfids as host program")
Reported-by: Thorsten Leemhuis <linux@xxxxxxxxxxxxx>
Signed-off-by: Jiri Olsa <jolsa@xxxxxxxxxx>
Signed-off-by: Andrii Nakryiko <andrii@xxxxxxxxxx>
Tested-by: Thorsten Leemhuis <linux@xxxxxxxxxxxxx>
Acked-by: Ian Rogers <irogers@xxxxxxxxxx>
Link: https://lore.kernel.org/bpf/20230209143735.4112845-1-jolsa@xxxxxxxxxx
Cc: Nathan Chancellor <nathan@xxxxxxxxxx>
Signed-off-by: Greg Kroah-Hartman <gregkh@xxxxxxxxxxxxxxxxxxx>
---
 tools/bpf/resolve_btfids/Makefile |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/tools/bpf/resolve_btfids/Makefile
+++ b/tools/bpf/resolve_btfids/Makefile
@@ -19,7 +19,7 @@ endif
 
 # Overrides for the prepare step libraries.
 HOST_OVERRIDES := AR="$(HOSTAR)" CC="$(HOSTCC)" LD="$(HOSTLD)" ARCH="$(HOSTARCH)" \
-		  CROSS_COMPILE=""
+		  CROSS_COMPILE="" EXTRA_CFLAGS="$(HOSTCFLAGS)"
 
 RM      ?= rm
 HOSTCC  ?= gcc


Patches currently in stable-queue which might be from jolsa@xxxxxxxxxx are

queue-6.1/tools-resolve_btfids-fix-setting-hostcflags.patch
queue-6.1/tools-lib-subcmd-make-install_headers-clearer.patch
queue-6.1/tools-resolve_btfids-compile-resolve_btfids-as-host-program.patch
queue-6.1/tools-resolve_btfids-use-pkg-config-to-locate-libelf.patch
queue-6.1/tools-lib-subcmd-add-install-target.patch
queue-6.1/tools-resolve_btfids-install-subcmd-headers.patch
queue-6.1/tools-resolve_btfids-tidy-host_overrides.patch
queue-6.1/tools-resolve_btfids-pass-hostcflags-as-extra_cflags-to-prepare-targets.patch
queue-6.1/tools-lib-subcmd-add-dependency-test-to-install_headers.patch
queue-6.1/tools-resolve_btfids-alter-how-hostcc-is-forced.patch



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux