Commit 10df0638 authored by Masahiro Yamada's avatar Masahiro Yamada
Browse files

kbuild: rebuild modules when module linker scripts are updated



Currently, the timestamp of module linker scripts are not checked.
Add them to the dependency of modules so they are correctly rebuilt.

Signed-off-by: default avatarMasahiro Yamada <yamada.masahiro@socionext.com>
parent 888f0c34
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -993,6 +993,11 @@ When kbuild executes, the following steps are followed (roughly):

	The linker script with full path. Assigned by the top-level Makefile.

    KBUILD_LDS_MODULE

	The module linker script with full path. Assigned by the top-level
	Makefile and additionally by the arch Makefile.

    KBUILD_VMLINUX_OBJS

	All object files for vmlinux. They are linked to vmlinux in the same
+2 −1
Original line number Diff line number Diff line
@@ -482,7 +482,8 @@ KBUILD_AFLAGS_KERNEL :=
KBUILD_CFLAGS_KERNEL :=
KBUILD_AFLAGS_MODULE  := -DMODULE
KBUILD_CFLAGS_MODULE  := -DMODULE
KBUILD_LDFLAGS_MODULE := -T $(srctree)/scripts/module-common.lds
KBUILD_LDFLAGS_MODULE :=
export KBUILD_LDS_MODULE := $(srctree)/scripts/module-common.lds
KBUILD_LDFLAGS :=
GCC_PLUGINS_CFLAGS :=
CLANG_FLAGS :=
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ KBUILD_LDFLAGS_MODULE += --be8
endif

ifeq ($(CONFIG_ARM_MODULE_PLTS),y)
KBUILD_LDFLAGS_MODULE	+= -T $(srctree)/arch/arm/kernel/module.lds
KBUILD_LDS_MODULE	+= $(srctree)/arch/arm/kernel/module.lds
endif

GZFLAGS		:=-9
+1 −1
Original line number Diff line number Diff line
@@ -101,7 +101,7 @@ endif
CHECKFLAGS	+= -D__aarch64__

ifeq ($(CONFIG_ARM64_MODULE_PLTS),y)
KBUILD_LDFLAGS_MODULE	+= -T $(srctree)/arch/arm64/kernel/module.lds
KBUILD_LDS_MODULE	+= $(srctree)/arch/arm64/kernel/module.lds
endif

# Default value
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ CHECKFLAGS += -D__ia64=1 -D__ia64__=1 -D_LP64 -D__LP64__

OBJCOPYFLAGS	:= --strip-all
LDFLAGS_vmlinux	:= -static
KBUILD_LDFLAGS_MODULE += -T $(srctree)/arch/ia64/module.lds
KBUILD_LDS_MODULE += $(srctree)/arch/ia64/module.lds
KBUILD_AFLAGS_KERNEL := -mconstant-gp
EXTRA		:=

Loading