Patch "tools: Override makefile ARCH variable if defined, but empty" has been added to the 6.6-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: Override makefile ARCH variable if defined, but empty

to the 6.6-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-override-makefile-arch-variable-if-defined-but.patch
and it can be found in the queue-6.6 subdirectory.

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



commit 524c3b46cdb2975ea3881e5c136c716ba81ed973
Author: Björn Töpel <bjorn@xxxxxxxxxxxx>
Date:   Wed Nov 27 11:17:46 2024 +0100

    tools: Override makefile ARCH variable if defined, but empty
    
    [ Upstream commit 537a2525eaf76ea9b0dca62b994500d8670b39d5 ]
    
    There are a number of tools (bpftool, selftests), that require a
    "bootstrap" build. Here, a bootstrap build is a build host variant of
    a target. E.g., assume that you're performing a bpftool cross-build on
    x86 to riscv, a bootstrap build would then be an x86 variant of
    bpftool. The typical way to perform the host build variant, is to pass
    "ARCH=" in a sub-make. However, if a variable has been set with a
    command argument, then ordinary assignments in the makefile are
    ignored.
    
    This side-effect results in that ARCH, and variables depending on ARCH
    are not set. Workaround by overriding ARCH to the host arch, if ARCH
    is empty.
    
    Fixes: 8859b0da5aac ("tools/bpftool: Fix cross-build")
    Signed-off-by: Björn Töpel <bjorn@xxxxxxxxxxxx>
    Signed-off-by: Daniel Borkmann <daniel@xxxxxxxxxxxxx>
    Tested-by: Alexandre Ghiti <alexghiti@xxxxxxxxxxxx>
    Reviewed-by: Jean-Philippe Brucker <jean-philippe@xxxxxxxxxx>
    Reviewed-by: Namhyung Kim <namhyung@xxxxxxxxxx>
    Reviewed-by: Toke Høiland-Jørgensen <toke@xxxxxxxxxx>
    Acked-by: Quentin Monnet <qmo@xxxxxxxxxx>
    Acked-by: Jiri Olsa <jolsa@xxxxxxxxxx>
    Cc: Arnaldo Carvalho de Melo <acme@xxxxxxxxxx>
    Link: https://lore.kernel.org/bpf/20241127101748.165693-1-bjorn@xxxxxxxxxx
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/tools/scripts/Makefile.arch b/tools/scripts/Makefile.arch
index f6a50f06dfc45..eabfe9f411d91 100644
--- a/tools/scripts/Makefile.arch
+++ b/tools/scripts/Makefile.arch
@@ -7,8 +7,8 @@ HOSTARCH := $(shell uname -m | sed -e s/i.86/x86/ -e s/x86_64/x86/ \
                                   -e s/sh[234].*/sh/ -e s/aarch64.*/arm64/ \
                                   -e s/riscv.*/riscv/ -e s/loongarch.*/loongarch/)
 
-ifndef ARCH
-ARCH := $(HOSTARCH)
+ifeq ($(strip $(ARCH)),)
+override ARCH := $(HOSTARCH)
 endif
 
 SRCARCH := $(ARCH)




[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