diff --git a/scripts/Makefile b/scripts/Makefile index 5d89c2ee274837d4f519dabae9271a2094b46cfb..495ea6ce00e96b19146ae76b2885e7709ba4d9c6 100644 --- a/scripts/Makefile +++ b/scripts/Makefile @@ -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