[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <b30b034d-46ee-618b-5f92-b0f7dde1219a@loongson.cn>
Date: Wed, 18 Oct 2023 19:44:54 +0800
From: Tiezhu Yang <yangtiezhu@...ngson.cn>
To: kernel test robot <lkp@...el.com>,
Josh Poimboeuf <jpoimboe@...nel.org>,
Peter Zijlstra <peterz@...radead.org>,
Huacai Chen <chenhuacai@...nel.org>
Cc: oe-kbuild-all@...ts.linux.dev, loongarch@...ts.linux.dev,
linux-kernel@...r.kernel.org, loongson-kernel@...ts.loongnix.cn
Subject: Re: [PATCH v2 8/8] LoongArch: Add ORC unwinder support
On 10/10/2023 09:46 PM, kernel test robot wrote:
> Hi Tiezhu,
>
> kernel test robot noticed the following build errors:
...
> In file included from scripts/sorttable.c:201:
>>> scripts/sorttable.h:96:10: fatal error: 'asm/orc_types.h' file not found
> #include <asm/orc_types.h>
> ^~~~~~~~~~~~~~~~~
> 1 error generated.
Thanks for your report, I can reproduce the error on x86:
make ARCH=x86_64 olddefconfig
make ARCH=x86_64 prepare
The build error is related with "ARCH=x86_64", there is no error
without "ARCH=x86_64" when build locally on x86.
As described in Documentation/kbuild/makefiles.rst:
For example, you can pass in ARCH=i386, ARCH=x86_64, or ARCH=x86.
For all of them, SRCARCH=x86 because arch/x86/ supports both i386 and
x86_64.
we should use SRCARCH instead of ARCH to specify the directory,
like this:
diff --git a/scripts/Makefile b/scripts/Makefile
index 576cf64..e4cca53 100644
--- a/scripts/Makefile
+++ b/scripts/Makefile
@@ -31,9 +31,12 @@ HOSTLDLIBS_sign-file = $(shell $(HOSTPKG_CONFIG)
--libs libcrypto 2> /dev/null |
ifdef CONFIG_UNWINDER_ORC
ifeq ($(ARCH),x86_64)
-ARCH := x86
+SRCARCH := x86
endif
-HOSTCFLAGS_sorttable.o += -I$(srctree)/tools/arch/x86/include
+ifeq ($(ARCH),loongarch)
+SRCARCH := loongarch
+endif
+HOSTCFLAGS_sorttable.o += -I$(srctree)/tools/arch/$(SRCARCH)/include
HOSTCFLAGS_sorttable.o += -DUNWINDER_ORC_ENABLED
endif
I will update the related code of this patch in the next version.
Thanks,
Tiezhu
Powered by blists - more mailing lists