* [PATCH 1/3] treewide: remove explicit rules for *offsets.s
@ 2018-12-22 9:50 ` Masahiro Yamada
0 siblings, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2018-12-22 9:50 UTC (permalink / raw)
To: linux-kbuild
Cc: Masahiro Yamada, Tony Luck, linux-ia64, Alexei Starovoitov,
netdev, linux-kernel, Daniel Borkmann, Ludovic Desroches,
Alexandre Belloni, Tony Lindgren, Nicolas Ferre, Fenghua Yu,
linux-omap, Russell King, linux-arm-kernel
These explicit rules are unneeded because scripts/Makefile.build
provides a pattern rule to create %.s from %.c
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Kbuild | 9 +--------
arch/arm/mach-at91/Makefile | 3 ---
arch/arm/mach-omap2/Makefile | 3 ---
arch/ia64/kernel/Makefile | 5 -----
drivers/memory/Makefile.asm-offsets | 3 ---
samples/bpf/Makefile | 3 ---
6 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/Kbuild b/Kbuild
index 0053042..b24210c 100644
--- a/Kbuild
+++ b/Kbuild
@@ -16,10 +16,6 @@ bounds-file := include/generated/bounds.h
always := $(bounds-file)
targets := kernel/bounds.s
-# We use internal kbuild rules to avoid the "is up to date" message from make
-kernel/bounds.s: kernel/bounds.c FORCE
- $(call if_changed_dep,cc_s_c)
-
$(obj)/$(bounds-file): kernel/bounds.s FORCE
$(call filechk,offsets,__LINUX_BOUNDS_H__)
@@ -50,10 +46,7 @@ offsets-file := include/generated/asm-offsets.h
always += $(offsets-file)
targets += arch/$(SRCARCH)/kernel/asm-offsets.s
-# We use internal kbuild rules to avoid the "is up to date" message from make
-arch/$(SRCARCH)/kernel/asm-offsets.s: arch/$(SRCARCH)/kernel/asm-offsets.c \
- $(obj)/$(timeconst-file) $(obj)/$(bounds-file) FORCE
- $(call if_changed_dep,cc_s_c)
+arch/$(SRCARCH)/kernel/asm-offsets.s: $(obj)/$(timeconst-file) $(obj)/$(bounds-file)
$(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
$(call filechk,offsets,__ASM_OFFSETS_H__)
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index 7415f18..f87066b 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -19,9 +19,6 @@ ifeq ($(CONFIG_PM_DEBUG),y)
CFLAGS_pm.o += -DDEBUG
endif
-arch/arm/mach-at91/pm_data-offsets.s: arch/arm/mach-at91/pm_data-offsets.c
- $(call if_changed_dep,cc_s_c)
-
include/generated/at91_pm_data-offsets.h: arch/arm/mach-at91/pm_data-offsets.s FORCE
$(call filechk,offsets,__PM_DATA_OFFSETS_H__)
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 01377c2..55c482c 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -236,9 +236,6 @@ obj-y += omap_phy_internal.o
obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o
-arch/arm/mach-omap2/pm-asm-offsets.s: arch/arm/mach-omap2/pm-asm-offsets.c
- $(call if_changed_dep,cc_s_c)
-
include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index d0c0ccd..7372d99 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -50,10 +50,5 @@ CFLAGS_traps.o += -mfixed-rangeò-f5,f16-f31
# The gate DSO image is built using a special linker script.
include $(src)/Makefile.gate
-# We use internal kbuild rules to avoid the "is up to date" message from make
-arch/$(SRCARCH)/kernel/nr-irqs.s: arch/$(SRCARCH)/kernel/nr-irqs.c
- $(Q)mkdir -p $(dir $@)
- $(call if_changed_dep,cc_s_c)
-
include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE
$(call filechk,offsets,__ASM_NR_IRQS_H__)
diff --git a/drivers/memory/Makefile.asm-offsets b/drivers/memory/Makefile.asm-offsets
index 843ff60..f968dfa 100644
--- a/drivers/memory/Makefile.asm-offsets
+++ b/drivers/memory/Makefile.asm-offsets
@@ -1,5 +1,2 @@
-drivers/memory/emif-asm-offsets.s: drivers/memory/emif-asm-offsets.c
- $(call if_changed_dep,cc_s_c)
-
include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE
$(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index be0a961..100a49d 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -227,9 +227,6 @@ $(LIBBPF): FORCE
# Fix up variables inherited from Kbuild that tools/ build system won't like
$(MAKE) -C $(dir $@) RM='rm -rf' LDFLAGS= srctree=$(BPF_SAMPLES_PATH)/../../ O
-$(obj)/syscall_nrs.s: $(src)/syscall_nrs.c
- $(call if_changed_dep,cc_s_c)
-
$(obj)/syscall_nrs.h: $(obj)/syscall_nrs.s FORCE
$(call filechk,offsets,__SYSCALL_NRS_H__)
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 1/3] treewide: remove explicit rules for *offsets.s
@ 2018-12-22 9:50 ` Masahiro Yamada
0 siblings, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2018-12-22 9:50 UTC (permalink / raw)
To: linux-kbuild
Cc: Fenghua Yu, Alexandre Belloni, Tony Luck, linux-ia64,
Daniel Borkmann, Tony Lindgren, netdev, Alexei Starovoitov,
linux-kernel, Masahiro Yamada, Ludovic Desroches, Russell King,
linux-omap, linux-arm-kernel
These explicit rules are unneeded because scripts/Makefile.build
provides a pattern rule to create %.s from %.c
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Kbuild | 9 +--------
arch/arm/mach-at91/Makefile | 3 ---
arch/arm/mach-omap2/Makefile | 3 ---
arch/ia64/kernel/Makefile | 5 -----
drivers/memory/Makefile.asm-offsets | 3 ---
samples/bpf/Makefile | 3 ---
6 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/Kbuild b/Kbuild
index 0053042..b24210c 100644
--- a/Kbuild
+++ b/Kbuild
@@ -16,10 +16,6 @@ bounds-file := include/generated/bounds.h
always := $(bounds-file)
targets := kernel/bounds.s
-# We use internal kbuild rules to avoid the "is up to date" message from make
-kernel/bounds.s: kernel/bounds.c FORCE
- $(call if_changed_dep,cc_s_c)
-
$(obj)/$(bounds-file): kernel/bounds.s FORCE
$(call filechk,offsets,__LINUX_BOUNDS_H__)
@@ -50,10 +46,7 @@ offsets-file := include/generated/asm-offsets.h
always += $(offsets-file)
targets += arch/$(SRCARCH)/kernel/asm-offsets.s
-# We use internal kbuild rules to avoid the "is up to date" message from make
-arch/$(SRCARCH)/kernel/asm-offsets.s: arch/$(SRCARCH)/kernel/asm-offsets.c \
- $(obj)/$(timeconst-file) $(obj)/$(bounds-file) FORCE
- $(call if_changed_dep,cc_s_c)
+arch/$(SRCARCH)/kernel/asm-offsets.s: $(obj)/$(timeconst-file) $(obj)/$(bounds-file)
$(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
$(call filechk,offsets,__ASM_OFFSETS_H__)
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index 7415f18..f87066b 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -19,9 +19,6 @@ ifeq ($(CONFIG_PM_DEBUG),y)
CFLAGS_pm.o += -DDEBUG
endif
-arch/arm/mach-at91/pm_data-offsets.s: arch/arm/mach-at91/pm_data-offsets.c
- $(call if_changed_dep,cc_s_c)
-
include/generated/at91_pm_data-offsets.h: arch/arm/mach-at91/pm_data-offsets.s FORCE
$(call filechk,offsets,__PM_DATA_OFFSETS_H__)
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 01377c2..55c482c 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -236,9 +236,6 @@ obj-y += omap_phy_internal.o
obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o
-arch/arm/mach-omap2/pm-asm-offsets.s: arch/arm/mach-omap2/pm-asm-offsets.c
- $(call if_changed_dep,cc_s_c)
-
include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index d0c0ccd..7372d99 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -50,10 +50,5 @@ CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31
# The gate DSO image is built using a special linker script.
include $(src)/Makefile.gate
-# We use internal kbuild rules to avoid the "is up to date" message from make
-arch/$(SRCARCH)/kernel/nr-irqs.s: arch/$(SRCARCH)/kernel/nr-irqs.c
- $(Q)mkdir -p $(dir $@)
- $(call if_changed_dep,cc_s_c)
-
include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE
$(call filechk,offsets,__ASM_NR_IRQS_H__)
diff --git a/drivers/memory/Makefile.asm-offsets b/drivers/memory/Makefile.asm-offsets
index 843ff60..f968dfa 100644
--- a/drivers/memory/Makefile.asm-offsets
+++ b/drivers/memory/Makefile.asm-offsets
@@ -1,5 +1,2 @@
-drivers/memory/emif-asm-offsets.s: drivers/memory/emif-asm-offsets.c
- $(call if_changed_dep,cc_s_c)
-
include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE
$(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index be0a961..100a49d 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -227,9 +227,6 @@ $(LIBBPF): FORCE
# Fix up variables inherited from Kbuild that tools/ build system won't like
$(MAKE) -C $(dir $@) RM='rm -rf' LDFLAGS= srctree=$(BPF_SAMPLES_PATH)/../../ O=
-$(obj)/syscall_nrs.s: $(src)/syscall_nrs.c
- $(call if_changed_dep,cc_s_c)
-
$(obj)/syscall_nrs.h: $(obj)/syscall_nrs.s FORCE
$(call filechk,offsets,__SYSCALL_NRS_H__)
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 1/3] treewide: remove explicit rules for *offsets.s
@ 2018-12-22 9:50 ` Masahiro Yamada
0 siblings, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2018-12-22 9:50 UTC (permalink / raw)
To: linux-kbuild
Cc: Fenghua Yu, Alexandre Belloni, Tony Luck, linux-ia64,
Daniel Borkmann, Tony Lindgren, netdev, Alexei Starovoitov,
linux-kernel, Masahiro Yamada, Ludovic Desroches, Russell King,
linux-omap, linux-arm-kernel
These explicit rules are unneeded because scripts/Makefile.build
provides a pattern rule to create %.s from %.c
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Kbuild | 9 +--------
arch/arm/mach-at91/Makefile | 3 ---
arch/arm/mach-omap2/Makefile | 3 ---
arch/ia64/kernel/Makefile | 5 -----
drivers/memory/Makefile.asm-offsets | 3 ---
samples/bpf/Makefile | 3 ---
6 files changed, 1 insertion(+), 25 deletions(-)
diff --git a/Kbuild b/Kbuild
index 0053042..b24210c 100644
--- a/Kbuild
+++ b/Kbuild
@@ -16,10 +16,6 @@ bounds-file := include/generated/bounds.h
always := $(bounds-file)
targets := kernel/bounds.s
-# We use internal kbuild rules to avoid the "is up to date" message from make
-kernel/bounds.s: kernel/bounds.c FORCE
- $(call if_changed_dep,cc_s_c)
-
$(obj)/$(bounds-file): kernel/bounds.s FORCE
$(call filechk,offsets,__LINUX_BOUNDS_H__)
@@ -50,10 +46,7 @@ offsets-file := include/generated/asm-offsets.h
always += $(offsets-file)
targets += arch/$(SRCARCH)/kernel/asm-offsets.s
-# We use internal kbuild rules to avoid the "is up to date" message from make
-arch/$(SRCARCH)/kernel/asm-offsets.s: arch/$(SRCARCH)/kernel/asm-offsets.c \
- $(obj)/$(timeconst-file) $(obj)/$(bounds-file) FORCE
- $(call if_changed_dep,cc_s_c)
+arch/$(SRCARCH)/kernel/asm-offsets.s: $(obj)/$(timeconst-file) $(obj)/$(bounds-file)
$(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
$(call filechk,offsets,__ASM_OFFSETS_H__)
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index 7415f18..f87066b 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -19,9 +19,6 @@ ifeq ($(CONFIG_PM_DEBUG),y)
CFLAGS_pm.o += -DDEBUG
endif
-arch/arm/mach-at91/pm_data-offsets.s: arch/arm/mach-at91/pm_data-offsets.c
- $(call if_changed_dep,cc_s_c)
-
include/generated/at91_pm_data-offsets.h: arch/arm/mach-at91/pm_data-offsets.s FORCE
$(call filechk,offsets,__PM_DATA_OFFSETS_H__)
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 01377c2..55c482c 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -236,9 +236,6 @@ obj-y += omap_phy_internal.o
obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o
-arch/arm/mach-omap2/pm-asm-offsets.s: arch/arm/mach-omap2/pm-asm-offsets.c
- $(call if_changed_dep,cc_s_c)
-
include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index d0c0ccd..7372d99 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -50,10 +50,5 @@ CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31
# The gate DSO image is built using a special linker script.
include $(src)/Makefile.gate
-# We use internal kbuild rules to avoid the "is up to date" message from make
-arch/$(SRCARCH)/kernel/nr-irqs.s: arch/$(SRCARCH)/kernel/nr-irqs.c
- $(Q)mkdir -p $(dir $@)
- $(call if_changed_dep,cc_s_c)
-
include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE
$(call filechk,offsets,__ASM_NR_IRQS_H__)
diff --git a/drivers/memory/Makefile.asm-offsets b/drivers/memory/Makefile.asm-offsets
index 843ff60..f968dfa 100644
--- a/drivers/memory/Makefile.asm-offsets
+++ b/drivers/memory/Makefile.asm-offsets
@@ -1,5 +1,2 @@
-drivers/memory/emif-asm-offsets.s: drivers/memory/emif-asm-offsets.c
- $(call if_changed_dep,cc_s_c)
-
include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE
$(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__)
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index be0a961..100a49d 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -227,9 +227,6 @@ $(LIBBPF): FORCE
# Fix up variables inherited from Kbuild that tools/ build system won't like
$(MAKE) -C $(dir $@) RM='rm -rf' LDFLAGS= srctree=$(BPF_SAMPLES_PATH)/../../ O=
-$(obj)/syscall_nrs.s: $(src)/syscall_nrs.c
- $(call if_changed_dep,cc_s_c)
-
$(obj)/syscall_nrs.h: $(obj)/syscall_nrs.s FORCE
$(call filechk,offsets,__SYSCALL_NRS_H__)
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/3] treewide: add intermediate .s files to targets
2018-12-22 9:50 ` Masahiro Yamada
(?)
(?)
@ 2018-12-22 9:50 ` Masahiro Yamada
-1 siblings, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2018-12-22 9:50 UTC (permalink / raw)
To: linux-kbuild
Cc: Masahiro Yamada, Tony Luck, linux-ia64, Borislav Petkov,
Alexandre Belloni, Nicolas Ferre, Daniel Borkmann, x86,
Thomas Gleixner, Fenghua Yu, Jeff Dike, H. Peter Anvin, linux-um,
Ludovic Desroches, Ingo Molnar, linux-omap, Russell King,
linux-arm-kernel, Alexei Starovoitov, netdev, linux-kernel,
Richard Weinberger, Tony Lindgren
Avoid unneeded recreation of these in the incremental build.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/mach-at91/Makefile | 2 ++
arch/arm/mach-omap2/Makefile | 2 ++
arch/ia64/kernel/Makefile | 2 ++
arch/x86/um/Makefile | 1 +
drivers/memory/Makefile.asm-offsets | 2 ++
samples/bpf/Makefile | 1 +
6 files changed, 10 insertions(+)
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index f87066b..31b61f0 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -23,3 +23,5 @@ include/generated/at91_pm_data-offsets.h: arch/arm/mach-at91/pm_data-offsets.s F
$(call filechk,offsets,__PM_DATA_OFFSETS_H__)
arch/arm/mach-at91/pm_suspend.o: include/generated/at91_pm_data-offsets.h
+
+targets += pm_data-offsets.s
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 55c482c..4afdf56 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -240,3 +240,5 @@ include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORC
$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
+
+targets += pm-asm-offsets.s
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 7372d99..4ba0514 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -52,3 +52,5 @@ include $(src)/Makefile.gate
include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE
$(call filechk,offsets,__ASM_NR_IRQS_H__)
+
+targets += nr-irqs.s
diff --git a/arch/x86/um/Makefile b/arch/x86/um/Makefile
index 1792464..2d686ae 100644
--- a/arch/x86/um/Makefile
+++ b/arch/x86/um/Makefile
@@ -38,6 +38,7 @@ USER_OBJS := bugs_$(BITS).o ptrace_user.o fault.o
$(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \
-Iarch/x86/include/generated
+targets += user-offsets.s
include/generated/user_constants.h: $(obj)/user-offsets.s
$(call filechk,offsets,__USER_CONSTANT_H__)
diff --git a/drivers/memory/Makefile.asm-offsets b/drivers/memory/Makefile.asm-offsets
index f968dfa..0447e17 100644
--- a/drivers/memory/Makefile.asm-offsets
+++ b/drivers/memory/Makefile.asm-offsets
@@ -1,2 +1,4 @@
include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE
$(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__)
+
+targets += emif-asm-offsets.s
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 100a49d..82d5a38 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -230,6 +230,7 @@ $(LIBBPF): FORCE
$(obj)/syscall_nrs.h: $(obj)/syscall_nrs.s FORCE
$(call filechk,offsets,__SYSCALL_NRS_H__)
+targets += syscall_nrs.s
clean-files += syscall_nrs.h
FORCE:
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/3] treewide: add intermediate .s files to targets
@ 2018-12-22 9:50 ` Masahiro Yamada
0 siblings, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2018-12-22 9:50 UTC (permalink / raw)
To: linux-kbuild
Cc: Masahiro Yamada, Tony Luck, linux-ia64, Borislav Petkov,
Alexandre Belloni, Nicolas Ferre, Daniel Borkmann, x86,
Thomas Gleixner, Fenghua Yu, Jeff Dike, H. Peter Anvin, linux-um,
Ludovic Desroches, Ingo Molnar, linux-omap, Russell King,
linux-arm-kernel, Alexei Starovoitov, netdev, linux-kernel,
Richard Weinberger, Tony Lindgren
Avoid unneeded recreation of these in the incremental build.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/mach-at91/Makefile | 2 ++
arch/arm/mach-omap2/Makefile | 2 ++
arch/ia64/kernel/Makefile | 2 ++
arch/x86/um/Makefile | 1 +
drivers/memory/Makefile.asm-offsets | 2 ++
samples/bpf/Makefile | 1 +
6 files changed, 10 insertions(+)
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index f87066b..31b61f0 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -23,3 +23,5 @@ include/generated/at91_pm_data-offsets.h: arch/arm/mach-at91/pm_data-offsets.s F
$(call filechk,offsets,__PM_DATA_OFFSETS_H__)
arch/arm/mach-at91/pm_suspend.o: include/generated/at91_pm_data-offsets.h
+
+targets += pm_data-offsets.s
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 55c482c..4afdf56 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -240,3 +240,5 @@ include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORC
$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
+
+targets += pm-asm-offsets.s
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 7372d99..4ba0514 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -52,3 +52,5 @@ include $(src)/Makefile.gate
include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE
$(call filechk,offsets,__ASM_NR_IRQS_H__)
+
+targets += nr-irqs.s
diff --git a/arch/x86/um/Makefile b/arch/x86/um/Makefile
index 1792464..2d686ae 100644
--- a/arch/x86/um/Makefile
+++ b/arch/x86/um/Makefile
@@ -38,6 +38,7 @@ USER_OBJS := bugs_$(BITS).o ptrace_user.o fault.o
$(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \
-Iarch/x86/include/generated
+targets += user-offsets.s
include/generated/user_constants.h: $(obj)/user-offsets.s
$(call filechk,offsets,__USER_CONSTANT_H__)
diff --git a/drivers/memory/Makefile.asm-offsets b/drivers/memory/Makefile.asm-offsets
index f968dfa..0447e17 100644
--- a/drivers/memory/Makefile.asm-offsets
+++ b/drivers/memory/Makefile.asm-offsets
@@ -1,2 +1,4 @@
include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE
$(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__)
+
+targets += emif-asm-offsets.s
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 100a49d..82d5a38 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -230,6 +230,7 @@ $(LIBBPF): FORCE
$(obj)/syscall_nrs.h: $(obj)/syscall_nrs.s FORCE
$(call filechk,offsets,__SYSCALL_NRS_H__)
+targets += syscall_nrs.s
clean-files += syscall_nrs.h
FORCE:
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/3] treewide: add intermediate .s files to targets
@ 2018-12-22 9:50 ` Masahiro Yamada
0 siblings, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2018-12-22 9:50 UTC (permalink / raw)
To: linux-kbuild
Cc: Alexandre Belloni, linux-ia64, Tony Lindgren, Alexei Starovoitov,
Masahiro Yamada, H. Peter Anvin, Daniel Borkmann,
Richard Weinberger, x86, Russell King, Ludovic Desroches,
Ingo Molnar, Fenghua Yu, Jeff Dike, linux-um, Borislav Petkov,
Thomas Gleixner, linux-omap, linux-arm-kernel, Tony Luck, netdev,
linux-kernel
Avoid unneeded recreation of these in the incremental build.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/mach-at91/Makefile | 2 ++
arch/arm/mach-omap2/Makefile | 2 ++
arch/ia64/kernel/Makefile | 2 ++
arch/x86/um/Makefile | 1 +
drivers/memory/Makefile.asm-offsets | 2 ++
samples/bpf/Makefile | 1 +
6 files changed, 10 insertions(+)
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index f87066b..31b61f0 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -23,3 +23,5 @@ include/generated/at91_pm_data-offsets.h: arch/arm/mach-at91/pm_data-offsets.s F
$(call filechk,offsets,__PM_DATA_OFFSETS_H__)
arch/arm/mach-at91/pm_suspend.o: include/generated/at91_pm_data-offsets.h
+
+targets += pm_data-offsets.s
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 55c482c..4afdf56 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -240,3 +240,5 @@ include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORC
$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
+
+targets += pm-asm-offsets.s
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 7372d99..4ba0514 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -52,3 +52,5 @@ include $(src)/Makefile.gate
include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE
$(call filechk,offsets,__ASM_NR_IRQS_H__)
+
+targets += nr-irqs.s
diff --git a/arch/x86/um/Makefile b/arch/x86/um/Makefile
index 1792464..2d686ae 100644
--- a/arch/x86/um/Makefile
+++ b/arch/x86/um/Makefile
@@ -38,6 +38,7 @@ USER_OBJS := bugs_$(BITS).o ptrace_user.o fault.o
$(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \
-Iarch/x86/include/generated
+targets += user-offsets.s
include/generated/user_constants.h: $(obj)/user-offsets.s
$(call filechk,offsets,__USER_CONSTANT_H__)
diff --git a/drivers/memory/Makefile.asm-offsets b/drivers/memory/Makefile.asm-offsets
index f968dfa..0447e17 100644
--- a/drivers/memory/Makefile.asm-offsets
+++ b/drivers/memory/Makefile.asm-offsets
@@ -1,2 +1,4 @@
include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE
$(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__)
+
+targets += emif-asm-offsets.s
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 100a49d..82d5a38 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -230,6 +230,7 @@ $(LIBBPF): FORCE
$(obj)/syscall_nrs.h: $(obj)/syscall_nrs.s FORCE
$(call filechk,offsets,__SYSCALL_NRS_H__)
+targets += syscall_nrs.s
clean-files += syscall_nrs.h
FORCE:
--
2.7.4
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 2/3] treewide: add intermediate .s files to targets
@ 2018-12-22 9:50 ` Masahiro Yamada
0 siblings, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2018-12-22 9:50 UTC (permalink / raw)
To: linux-kbuild
Cc: Alexandre Belloni, linux-ia64, Tony Lindgren, Alexei Starovoitov,
Masahiro Yamada, H. Peter Anvin, Daniel Borkmann,
Richard Weinberger, x86, Russell King, Ludovic Desroches,
Ingo Molnar, Fenghua Yu, Jeff Dike, linux-um, Borislav Petkov,
Thomas Gleixner, linux-omap, linux-arm-kernel, Tony Luck, netdev,
linux-kernel
Avoid unneeded recreation of these in the incremental build.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
arch/arm/mach-at91/Makefile | 2 ++
arch/arm/mach-omap2/Makefile | 2 ++
arch/ia64/kernel/Makefile | 2 ++
arch/x86/um/Makefile | 1 +
drivers/memory/Makefile.asm-offsets | 2 ++
samples/bpf/Makefile | 1 +
6 files changed, 10 insertions(+)
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index f87066b..31b61f0 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -23,3 +23,5 @@ include/generated/at91_pm_data-offsets.h: arch/arm/mach-at91/pm_data-offsets.s F
$(call filechk,offsets,__PM_DATA_OFFSETS_H__)
arch/arm/mach-at91/pm_suspend.o: include/generated/at91_pm_data-offsets.h
+
+targets += pm_data-offsets.s
diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
index 55c482c..4afdf56 100644
--- a/arch/arm/mach-omap2/Makefile
+++ b/arch/arm/mach-omap2/Makefile
@@ -240,3 +240,5 @@ include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORC
$(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
$(obj)/sleep33xx.o $(obj)/sleep43xx.o: include/generated/ti-pm-asm-offsets.h
+
+targets += pm-asm-offsets.s
diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
index 7372d99..4ba0514 100644
--- a/arch/ia64/kernel/Makefile
+++ b/arch/ia64/kernel/Makefile
@@ -52,3 +52,5 @@ include $(src)/Makefile.gate
include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE
$(call filechk,offsets,__ASM_NR_IRQS_H__)
+
+targets += nr-irqs.s
diff --git a/arch/x86/um/Makefile b/arch/x86/um/Makefile
index 1792464..2d686ae 100644
--- a/arch/x86/um/Makefile
+++ b/arch/x86/um/Makefile
@@ -38,6 +38,7 @@ USER_OBJS := bugs_$(BITS).o ptrace_user.o fault.o
$(obj)/user-offsets.s: c_flags = -Wp,-MD,$(depfile) $(USER_CFLAGS) \
-Iarch/x86/include/generated
+targets += user-offsets.s
include/generated/user_constants.h: $(obj)/user-offsets.s
$(call filechk,offsets,__USER_CONSTANT_H__)
diff --git a/drivers/memory/Makefile.asm-offsets b/drivers/memory/Makefile.asm-offsets
index f968dfa..0447e17 100644
--- a/drivers/memory/Makefile.asm-offsets
+++ b/drivers/memory/Makefile.asm-offsets
@@ -1,2 +1,4 @@
include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE
$(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__)
+
+targets += emif-asm-offsets.s
diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
index 100a49d..82d5a38 100644
--- a/samples/bpf/Makefile
+++ b/samples/bpf/Makefile
@@ -230,6 +230,7 @@ $(LIBBPF): FORCE
$(obj)/syscall_nrs.h: $(obj)/syscall_nrs.s FORCE
$(call filechk,offsets,__SYSCALL_NRS_H__)
+targets += syscall_nrs.s
clean-files += syscall_nrs.h
FORCE:
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [PATCH 3/3] kbuild: remove $(obj)/ prefixes in ./Kbuild
2018-12-22 9:50 ` Masahiro Yamada
` (3 preceding siblings ...)
(?)
@ 2018-12-22 9:50 ` Masahiro Yamada
-1 siblings, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2018-12-22 9:50 UTC (permalink / raw)
To: linux-kbuild; +Cc: Masahiro Yamada, linux-kernel
Adding $(obj)/ to file paths relative from the top objtree looks
a bit redundant to me. This commit has no functional change since
$(obj) is '.' in this file.
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---
Kbuild | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/Kbuild b/Kbuild
index b24210c..03cb8ed 100644
--- a/Kbuild
+++ b/Kbuild
@@ -16,7 +16,7 @@ bounds-file := include/generated/bounds.h
always := $(bounds-file)
targets := kernel/bounds.s
-$(obj)/$(bounds-file): kernel/bounds.s FORCE
+$(bounds-file): kernel/bounds.s FORCE
$(call filechk,offsets,__LINUX_BOUNDS_H__)
#####
@@ -34,7 +34,7 @@ define filechk_gentimeconst
(echo $(CONFIG_HZ) | bc -q $< )
endef
-$(obj)/$(timeconst-file): kernel/time/timeconst.bc FORCE
+$(timeconst-file): kernel/time/timeconst.bc FORCE
$(call filechk,gentimeconst)
#####
@@ -46,9 +46,9 @@ offsets-file := include/generated/asm-offsets.h
always += $(offsets-file)
targets += arch/$(SRCARCH)/kernel/asm-offsets.s
-arch/$(SRCARCH)/kernel/asm-offsets.s: $(obj)/$(timeconst-file) $(obj)/$(bounds-file)
+arch/$(SRCARCH)/kernel/asm-offsets.s: $(timeconst-file) $(bounds-file)
-$(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
+$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
$(call filechk,offsets,__ASM_OFFSETS_H__)
#####
@@ -70,7 +70,7 @@ missing-syscalls: scripts/checksyscalls.sh $(offsets-file) FORCE
extra-$(CONFIG_GDB_SCRIPTS) += build_constants_py
-build_constants_py: $(obj)/$(timeconst-file) $(obj)/$(bounds-file)
+build_constants_py: $(timeconst-file) $(bounds-file)
@$(MAKE) $(build)=scripts/gdb/linux $@
# Keep these three files during make clean
--
2.7.4
^ permalink raw reply related [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] treewide: remove explicit rules for *offsets.s
2018-12-22 9:50 ` Masahiro Yamada
(?)
@ 2018-12-24 15:18 ` Masahiro Yamada
-1 siblings, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2018-12-24 15:18 UTC (permalink / raw)
To: Linux Kbuild mailing list
Cc: Tony Luck, linux-ia64, Alexei Starovoitov, Networking,
Linux Kernel Mailing List, Daniel Borkmann, Ludovic Desroches,
Alexandre Belloni, Tony Lindgren, Nicolas Ferre, Fenghua Yu,
Linux-OMAP, Russell King, linux-arm-kernel
On Sun, Dec 23, 2018 at 7:32 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> These explicit rules are unneeded because scripts/Makefile.build
> provides a pattern rule to create %.s from %.c
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
Series, applied to linux-kbuild.
> Kbuild | 9 +--------
> arch/arm/mach-at91/Makefile | 3 ---
> arch/arm/mach-omap2/Makefile | 3 ---
> arch/ia64/kernel/Makefile | 5 -----
> drivers/memory/Makefile.asm-offsets | 3 ---
> samples/bpf/Makefile | 3 ---
> 6 files changed, 1 insertion(+), 25 deletions(-)
>
> diff --git a/Kbuild b/Kbuild
> index 0053042..b24210c 100644
> --- a/Kbuild
> +++ b/Kbuild
> @@ -16,10 +16,6 @@ bounds-file := include/generated/bounds.h
> always := $(bounds-file)
> targets := kernel/bounds.s
>
> -# We use internal kbuild rules to avoid the "is up to date" message from make
> -kernel/bounds.s: kernel/bounds.c FORCE
> - $(call if_changed_dep,cc_s_c)
> -
> $(obj)/$(bounds-file): kernel/bounds.s FORCE
> $(call filechk,offsets,__LINUX_BOUNDS_H__)
>
> @@ -50,10 +46,7 @@ offsets-file := include/generated/asm-offsets.h
> always += $(offsets-file)
> targets += arch/$(SRCARCH)/kernel/asm-offsets.s
>
> -# We use internal kbuild rules to avoid the "is up to date" message from make
> -arch/$(SRCARCH)/kernel/asm-offsets.s: arch/$(SRCARCH)/kernel/asm-offsets.c \
> - $(obj)/$(timeconst-file) $(obj)/$(bounds-file) FORCE
> - $(call if_changed_dep,cc_s_c)
> +arch/$(SRCARCH)/kernel/asm-offsets.s: $(obj)/$(timeconst-file) $(obj)/$(bounds-file)
>
> $(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
> $(call filechk,offsets,__ASM_OFFSETS_H__)
> diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
> index 7415f18..f87066b 100644
> --- a/arch/arm/mach-at91/Makefile
> +++ b/arch/arm/mach-at91/Makefile
> @@ -19,9 +19,6 @@ ifeq ($(CONFIG_PM_DEBUG),y)
> CFLAGS_pm.o += -DDEBUG
> endif
>
> -arch/arm/mach-at91/pm_data-offsets.s: arch/arm/mach-at91/pm_data-offsets.c
> - $(call if_changed_dep,cc_s_c)
> -
> include/generated/at91_pm_data-offsets.h: arch/arm/mach-at91/pm_data-offsets.s FORCE
> $(call filechk,offsets,__PM_DATA_OFFSETS_H__)
>
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 01377c2..55c482c 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -236,9 +236,6 @@ obj-y += omap_phy_internal.o
>
> obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o
>
> -arch/arm/mach-omap2/pm-asm-offsets.s: arch/arm/mach-omap2/pm-asm-offsets.c
> - $(call if_changed_dep,cc_s_c)
> -
> include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
> $(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
>
> diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
> index d0c0ccd..7372d99 100644
> --- a/arch/ia64/kernel/Makefile
> +++ b/arch/ia64/kernel/Makefile
> @@ -50,10 +50,5 @@ CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31
> # The gate DSO image is built using a special linker script.
> include $(src)/Makefile.gate
>
> -# We use internal kbuild rules to avoid the "is up to date" message from make
> -arch/$(SRCARCH)/kernel/nr-irqs.s: arch/$(SRCARCH)/kernel/nr-irqs.c
> - $(Q)mkdir -p $(dir $@)
> - $(call if_changed_dep,cc_s_c)
> -
> include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE
> $(call filechk,offsets,__ASM_NR_IRQS_H__)
> diff --git a/drivers/memory/Makefile.asm-offsets b/drivers/memory/Makefile.asm-offsets
> index 843ff60..f968dfa 100644
> --- a/drivers/memory/Makefile.asm-offsets
> +++ b/drivers/memory/Makefile.asm-offsets
> @@ -1,5 +1,2 @@
> -drivers/memory/emif-asm-offsets.s: drivers/memory/emif-asm-offsets.c
> - $(call if_changed_dep,cc_s_c)
> -
> include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE
> $(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__)
> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
> index be0a961..100a49d 100644
> --- a/samples/bpf/Makefile
> +++ b/samples/bpf/Makefile
> @@ -227,9 +227,6 @@ $(LIBBPF): FORCE
> # Fix up variables inherited from Kbuild that tools/ build system won't like
> $(MAKE) -C $(dir $@) RM='rm -rf' LDFLAGS= srctree=$(BPF_SAMPLES_PATH)/../../ O=
>
> -$(obj)/syscall_nrs.s: $(src)/syscall_nrs.c
> - $(call if_changed_dep,cc_s_c)
> -
> $(obj)/syscall_nrs.h: $(obj)/syscall_nrs.s FORCE
> $(call filechk,offsets,__SYSCALL_NRS_H__)
>
> --
> 2.7.4
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] treewide: remove explicit rules for *offsets.s
@ 2018-12-24 15:18 ` Masahiro Yamada
0 siblings, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2018-12-24 15:18 UTC (permalink / raw)
To: Linux Kbuild mailing list
Cc: Tony Luck, linux-ia64, Alexei Starovoitov, Networking,
Linux Kernel Mailing List, Daniel Borkmann, Ludovic Desroches,
Alexandre Belloni, Tony Lindgren, Nicolas Ferre, Fenghua Yu,
Linux-OMAP, Russell King, linux-arm-kernel
On Sun, Dec 23, 2018 at 7:32 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> These explicit rules are unneeded because scripts/Makefile.build
> provides a pattern rule to create %.s from %.c
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
Series, applied to linux-kbuild.
> Kbuild | 9 +--------
> arch/arm/mach-at91/Makefile | 3 ---
> arch/arm/mach-omap2/Makefile | 3 ---
> arch/ia64/kernel/Makefile | 5 -----
> drivers/memory/Makefile.asm-offsets | 3 ---
> samples/bpf/Makefile | 3 ---
> 6 files changed, 1 insertion(+), 25 deletions(-)
>
> diff --git a/Kbuild b/Kbuild
> index 0053042..b24210c 100644
> --- a/Kbuild
> +++ b/Kbuild
> @@ -16,10 +16,6 @@ bounds-file := include/generated/bounds.h
> always := $(bounds-file)
> targets := kernel/bounds.s
>
> -# We use internal kbuild rules to avoid the "is up to date" message from make
> -kernel/bounds.s: kernel/bounds.c FORCE
> - $(call if_changed_dep,cc_s_c)
> -
> $(obj)/$(bounds-file): kernel/bounds.s FORCE
> $(call filechk,offsets,__LINUX_BOUNDS_H__)
>
> @@ -50,10 +46,7 @@ offsets-file := include/generated/asm-offsets.h
> always += $(offsets-file)
> targets += arch/$(SRCARCH)/kernel/asm-offsets.s
>
> -# We use internal kbuild rules to avoid the "is up to date" message from make
> -arch/$(SRCARCH)/kernel/asm-offsets.s: arch/$(SRCARCH)/kernel/asm-offsets.c \
> - $(obj)/$(timeconst-file) $(obj)/$(bounds-file) FORCE
> - $(call if_changed_dep,cc_s_c)
> +arch/$(SRCARCH)/kernel/asm-offsets.s: $(obj)/$(timeconst-file) $(obj)/$(bounds-file)
>
> $(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
> $(call filechk,offsets,__ASM_OFFSETS_H__)
> diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
> index 7415f18..f87066b 100644
> --- a/arch/arm/mach-at91/Makefile
> +++ b/arch/arm/mach-at91/Makefile
> @@ -19,9 +19,6 @@ ifeq ($(CONFIG_PM_DEBUG),y)
> CFLAGS_pm.o += -DDEBUG
> endif
>
> -arch/arm/mach-at91/pm_data-offsets.s: arch/arm/mach-at91/pm_data-offsets.c
> - $(call if_changed_dep,cc_s_c)
> -
> include/generated/at91_pm_data-offsets.h: arch/arm/mach-at91/pm_data-offsets.s FORCE
> $(call filechk,offsets,__PM_DATA_OFFSETS_H__)
>
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 01377c2..55c482c 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -236,9 +236,6 @@ obj-y += omap_phy_internal.o
>
> obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o
>
> -arch/arm/mach-omap2/pm-asm-offsets.s: arch/arm/mach-omap2/pm-asm-offsets.c
> - $(call if_changed_dep,cc_s_c)
> -
> include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
> $(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
>
> diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
> index d0c0ccd..7372d99 100644
> --- a/arch/ia64/kernel/Makefile
> +++ b/arch/ia64/kernel/Makefile
> @@ -50,10 +50,5 @@ CFLAGS_traps.o += -mfixed-rangeò-f5,f16-f31
> # The gate DSO image is built using a special linker script.
> include $(src)/Makefile.gate
>
> -# We use internal kbuild rules to avoid the "is up to date" message from make
> -arch/$(SRCARCH)/kernel/nr-irqs.s: arch/$(SRCARCH)/kernel/nr-irqs.c
> - $(Q)mkdir -p $(dir $@)
> - $(call if_changed_dep,cc_s_c)
> -
> include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE
> $(call filechk,offsets,__ASM_NR_IRQS_H__)
> diff --git a/drivers/memory/Makefile.asm-offsets b/drivers/memory/Makefile.asm-offsets
> index 843ff60..f968dfa 100644
> --- a/drivers/memory/Makefile.asm-offsets
> +++ b/drivers/memory/Makefile.asm-offsets
> @@ -1,5 +1,2 @@
> -drivers/memory/emif-asm-offsets.s: drivers/memory/emif-asm-offsets.c
> - $(call if_changed_dep,cc_s_c)
> -
> include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE
> $(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__)
> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
> index be0a961..100a49d 100644
> --- a/samples/bpf/Makefile
> +++ b/samples/bpf/Makefile
> @@ -227,9 +227,6 @@ $(LIBBPF): FORCE
> # Fix up variables inherited from Kbuild that tools/ build system won't like
> $(MAKE) -C $(dir $@) RM='rm -rf' LDFLAGS= srctree=$(BPF_SAMPLES_PATH)/../../ O>
> -$(obj)/syscall_nrs.s: $(src)/syscall_nrs.c
> - $(call if_changed_dep,cc_s_c)
> -
> $(obj)/syscall_nrs.h: $(obj)/syscall_nrs.s FORCE
> $(call filechk,offsets,__SYSCALL_NRS_H__)
>
> --
> 2.7.4
>
--
Best Regards
Masahiro Yamada
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: [PATCH 1/3] treewide: remove explicit rules for *offsets.s
@ 2018-12-24 15:18 ` Masahiro Yamada
0 siblings, 0 replies; 12+ messages in thread
From: Masahiro Yamada @ 2018-12-24 15:18 UTC (permalink / raw)
To: Linux Kbuild mailing list
Cc: Fenghua Yu, Alexandre Belloni, Tony Luck, linux-ia64,
Daniel Borkmann, Tony Lindgren, Networking, Alexei Starovoitov,
Linux Kernel Mailing List, Ludovic Desroches, Russell King,
Linux-OMAP, linux-arm-kernel
On Sun, Dec 23, 2018 at 7:32 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> These explicit rules are unneeded because scripts/Makefile.build
> provides a pattern rule to create %.s from %.c
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---
Series, applied to linux-kbuild.
> Kbuild | 9 +--------
> arch/arm/mach-at91/Makefile | 3 ---
> arch/arm/mach-omap2/Makefile | 3 ---
> arch/ia64/kernel/Makefile | 5 -----
> drivers/memory/Makefile.asm-offsets | 3 ---
> samples/bpf/Makefile | 3 ---
> 6 files changed, 1 insertion(+), 25 deletions(-)
>
> diff --git a/Kbuild b/Kbuild
> index 0053042..b24210c 100644
> --- a/Kbuild
> +++ b/Kbuild
> @@ -16,10 +16,6 @@ bounds-file := include/generated/bounds.h
> always := $(bounds-file)
> targets := kernel/bounds.s
>
> -# We use internal kbuild rules to avoid the "is up to date" message from make
> -kernel/bounds.s: kernel/bounds.c FORCE
> - $(call if_changed_dep,cc_s_c)
> -
> $(obj)/$(bounds-file): kernel/bounds.s FORCE
> $(call filechk,offsets,__LINUX_BOUNDS_H__)
>
> @@ -50,10 +46,7 @@ offsets-file := include/generated/asm-offsets.h
> always += $(offsets-file)
> targets += arch/$(SRCARCH)/kernel/asm-offsets.s
>
> -# We use internal kbuild rules to avoid the "is up to date" message from make
> -arch/$(SRCARCH)/kernel/asm-offsets.s: arch/$(SRCARCH)/kernel/asm-offsets.c \
> - $(obj)/$(timeconst-file) $(obj)/$(bounds-file) FORCE
> - $(call if_changed_dep,cc_s_c)
> +arch/$(SRCARCH)/kernel/asm-offsets.s: $(obj)/$(timeconst-file) $(obj)/$(bounds-file)
>
> $(obj)/$(offsets-file): arch/$(SRCARCH)/kernel/asm-offsets.s FORCE
> $(call filechk,offsets,__ASM_OFFSETS_H__)
> diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
> index 7415f18..f87066b 100644
> --- a/arch/arm/mach-at91/Makefile
> +++ b/arch/arm/mach-at91/Makefile
> @@ -19,9 +19,6 @@ ifeq ($(CONFIG_PM_DEBUG),y)
> CFLAGS_pm.o += -DDEBUG
> endif
>
> -arch/arm/mach-at91/pm_data-offsets.s: arch/arm/mach-at91/pm_data-offsets.c
> - $(call if_changed_dep,cc_s_c)
> -
> include/generated/at91_pm_data-offsets.h: arch/arm/mach-at91/pm_data-offsets.s FORCE
> $(call filechk,offsets,__PM_DATA_OFFSETS_H__)
>
> diff --git a/arch/arm/mach-omap2/Makefile b/arch/arm/mach-omap2/Makefile
> index 01377c2..55c482c 100644
> --- a/arch/arm/mach-omap2/Makefile
> +++ b/arch/arm/mach-omap2/Makefile
> @@ -236,9 +236,6 @@ obj-y += omap_phy_internal.o
>
> obj-$(CONFIG_MACH_OMAP2_TUSB6010) += usb-tusb6010.o
>
> -arch/arm/mach-omap2/pm-asm-offsets.s: arch/arm/mach-omap2/pm-asm-offsets.c
> - $(call if_changed_dep,cc_s_c)
> -
> include/generated/ti-pm-asm-offsets.h: arch/arm/mach-omap2/pm-asm-offsets.s FORCE
> $(call filechk,offsets,__TI_PM_ASM_OFFSETS_H__)
>
> diff --git a/arch/ia64/kernel/Makefile b/arch/ia64/kernel/Makefile
> index d0c0ccd..7372d99 100644
> --- a/arch/ia64/kernel/Makefile
> +++ b/arch/ia64/kernel/Makefile
> @@ -50,10 +50,5 @@ CFLAGS_traps.o += -mfixed-range=f2-f5,f16-f31
> # The gate DSO image is built using a special linker script.
> include $(src)/Makefile.gate
>
> -# We use internal kbuild rules to avoid the "is up to date" message from make
> -arch/$(SRCARCH)/kernel/nr-irqs.s: arch/$(SRCARCH)/kernel/nr-irqs.c
> - $(Q)mkdir -p $(dir $@)
> - $(call if_changed_dep,cc_s_c)
> -
> include/generated/nr-irqs.h: arch/$(SRCARCH)/kernel/nr-irqs.s FORCE
> $(call filechk,offsets,__ASM_NR_IRQS_H__)
> diff --git a/drivers/memory/Makefile.asm-offsets b/drivers/memory/Makefile.asm-offsets
> index 843ff60..f968dfa 100644
> --- a/drivers/memory/Makefile.asm-offsets
> +++ b/drivers/memory/Makefile.asm-offsets
> @@ -1,5 +1,2 @@
> -drivers/memory/emif-asm-offsets.s: drivers/memory/emif-asm-offsets.c
> - $(call if_changed_dep,cc_s_c)
> -
> include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE
> $(call filechk,offsets,__TI_EMIF_ASM_OFFSETS_H__)
> diff --git a/samples/bpf/Makefile b/samples/bpf/Makefile
> index be0a961..100a49d 100644
> --- a/samples/bpf/Makefile
> +++ b/samples/bpf/Makefile
> @@ -227,9 +227,6 @@ $(LIBBPF): FORCE
> # Fix up variables inherited from Kbuild that tools/ build system won't like
> $(MAKE) -C $(dir $@) RM='rm -rf' LDFLAGS= srctree=$(BPF_SAMPLES_PATH)/../../ O=
>
> -$(obj)/syscall_nrs.s: $(src)/syscall_nrs.c
> - $(call if_changed_dep,cc_s_c)
> -
> $(obj)/syscall_nrs.h: $(obj)/syscall_nrs.s FORCE
> $(call filechk,offsets,__SYSCALL_NRS_H__)
>
> --
> 2.7.4
>
--
Best Regards
Masahiro Yamada
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 12+ messages in thread