提交 bbb3a0dc 编写于 作者: H Hongchen Zhang

fix compile error introduced by LoongArch commit

LoongArch inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I6MV9N

--------------------------------

when compile kernel using the following steps:

make allmodconfig ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-
make oldconfig ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-
make -j64 ARCH=x86_64 CROSS_COMPILE=x86_64-linux-gnu-

we get error:

  DESCEND  objtool
  HOSTCC  scripts/sorttable
In file included from scripts/sorttable.c:195:
scripts/sorttable.h:89:10: fatal error: asm/orc_types.h: No such file or directory
   89 | #include <asm/orc_types.h>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.host:95: scripts/sorttable] Error 1
make: *** [Makefile:1215: scripts] Error 2
make: *** Waiting for unfinished jobs....

the reason is ARCH a command-line variable,the normal assignment is
ignored.So split loongarch architecture from others.

Fixes: 4efd0de6 ("tools/perf: Add basic support for LoongArch")
Signed-off-by: NHongchen Zhang <zhanghongchen@loongson.cn>
Signed-off-by: NZheng Zengkai <zhengzengkai@huawei.com>
Signed-off-by: NJialin Zhang <zhangjialin11@huawei.com>
上级 b8dfd735
......@@ -24,20 +24,19 @@ HOSTCFLAGS_extract-cert.o = $(CRYPTO_CFLAGS)
HOSTLDLIBS_extract-cert = $(CRYPTO_LIBS)
ifdef CONFIG_UNWINDER_ORC
# Additional ARCH settings for x86
ifneq ($(filter loongarch loongarch64, $(ARCH)),)
HOSTCFLAGS_sorttable.o += -I$(srctree)/tools/arch/loongarch/include
HOSTCFLAGS_sorttable.o += -DUNWINDER_ORC_ENABLED
HOSTLDLIBS_sorttable = -lpthread
else
ifeq ($(ARCH),x86_64)
ARCH := x86
endif
# Additional ARCH settings for loongarch
ifeq ($(ARCH),loongarch64)
ARCH := loongarch
endif
HOSTCFLAGS_sorttable.o += -I$(srctree)/tools/arch/$(ARCH)/include
HOSTCFLAGS_sorttable.o += -I$(srctree)/tools/arch/x86/include
HOSTCFLAGS_sorttable.o += -DUNWINDER_ORC_ENABLED
HOSTLDLIBS_sorttable = -lpthread
endif
endif
# The following programs are only built on demand
hostprogs += unifdef
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册