Skip to content

Commit 9d022c5

Browse files
committed
kbuild: replace $(hdr-arch) with $(SRCARCH)
Since commit 5e53879 ("sparc,sparc64: unify Makefile"), hdr-arch and SRCARCH always match. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Douglas Anderson <dianders@chromium.org>
1 parent 37131ec commit 9d022c5

2 files changed

Lines changed: 10 additions & 13 deletions

File tree

‎Makefile‎

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -283,9 +283,6 @@ ifeq ($(ARCH),tilegx)
283283
SRCARCH := tile
284284
endif
285285

286-
# Where to locate arch specific headers
287-
hdr-arch := $(SRCARCH)
288-
289286
KCONFIG_CONFIG ?= .config
290287
export KCONFIG_CONFIG
291288

@@ -378,17 +375,17 @@ CFLAGS_KCOV := $(call cc-option,-fsanitize-coverage=trace-pc,)
378375

379376
# Use USERINCLUDE when you must reference the UAPI directories only.
380377
USERINCLUDE := \
381-
-I$(srctree)/arch/$(hdr-arch)/include/uapi \
382-
-I$(objtree)/arch/$(hdr-arch)/include/generated/uapi \
378+
-I$(srctree)/arch/$(SRCARCH)/include/uapi \
379+
-I$(objtree)/arch/$(SRCARCH)/include/generated/uapi \
383380
-I$(srctree)/include/uapi \
384381
-I$(objtree)/include/generated/uapi \
385382
-include $(srctree)/include/linux/kconfig.h
386383

387384
# Use LINUXINCLUDE when you must reference the include/ directory.
388385
# Needed to be compatible with the O= option
389386
LINUXINCLUDE := \
390-
-I$(srctree)/arch/$(hdr-arch)/include \
391-
-I$(objtree)/arch/$(hdr-arch)/include/generated \
387+
-I$(srctree)/arch/$(SRCARCH)/include \
388+
-I$(objtree)/arch/$(SRCARCH)/include/generated \
392389
$(if $(KBUILD_SRC), -I$(srctree)/include) \
393390
-I$(objtree)/include \
394391
$(USERINCLUDE)
@@ -1134,8 +1131,8 @@ headerdep:
11341131
#Default location for installed headers
11351132
export INSTALL_HDR_PATH = $(objtree)/usr
11361133

1137-
# If we do an all arch process set dst to include/arch-$(hdr-arch)
1138-
hdr-dst = $(if $(KBUILD_HEADERS), dst=include/arch-$(hdr-arch), dst=include)
1134+
# If we do an all arch process set dst to include/arch-$(SRCARCH)
1135+
hdr-dst = $(if $(KBUILD_HEADERS), dst=include/arch-$(SRCARCH), dst=include)
11391136

11401137
PHONY += archheaders
11411138
archheaders:
@@ -1153,10 +1150,10 @@ headers_install_all:
11531150

11541151
PHONY += headers_install
11551152
headers_install: __headers
1156-
$(if $(wildcard $(srctree)/arch/$(hdr-arch)/include/uapi/asm/Kbuild),, \
1153+
$(if $(wildcard $(srctree)/arch/$(SRCARCH)/include/uapi/asm/Kbuild),, \
11571154
$(error Headers not exportable for the $(SRCARCH) architecture))
11581155
$(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include
1159-
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst)
1156+
$(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi $(hdr-dst)
11601157

11611158
PHONY += headers_check_all
11621159
headers_check_all: headers_install_all
@@ -1165,7 +1162,7 @@ headers_check_all: headers_install_all
11651162
PHONY += headers_check
11661163
headers_check: headers_install
11671164
$(Q)$(MAKE) $(hdr-inst)=include/uapi dst=include HDRCHECK=1
1168-
$(Q)$(MAKE) $(hdr-inst)=arch/$(hdr-arch)/include/uapi $(hdr-dst) HDRCHECK=1
1165+
$(Q)$(MAKE) $(hdr-inst)=arch/$(SRCARCH)/include/uapi $(hdr-dst) HDRCHECK=1
11691166

11701167
# ---------------------------------------------------------------------------
11711168
# Kernel selftest

‎scripts/Makefile.headersinst‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ __headers: $(subdirs)
3030
$(subdirs):
3131
$(Q)$(MAKE) $(hdr-inst)=$(obj)/$@ dst=$(dst)/$@
3232

33-
# Skip header install/check for include/uapi and arch/$(hdr-arch)/include/uapi.
33+
# Skip header install/check for include/uapi and arch/$(SRCARCH)/include/uapi.
3434
# We have only sub-directories there.
3535
skip-inst := $(if $(filter %/uapi,$(obj)),1)
3636

0 commit comments

Comments
 (0)