Skip to contentSkip to conversation

drivers/memory: can't open emif-asm-offsets.s for writing

PATCH In review Anders Roxell 3 participants 3 messages Apr 6, 2018 – Apr 7, 2018 Memory controller drivers

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/memory: can't open emif-asm-offsets.s for writing

Build failes due to that the directory isn't created before we execute
the build rule.
cc1: fatal error: can’t open ‘drivers/memory/emif-asm-offsets.s’ for
writing: No such file or directory compilation terminated.
drivers/memory/Makefile.asm-offsets:2: recipe for target 'drivers/memory/emif-asm-offsets.s' failed make[2]: *** [drivers/memory/emif-asm-offsets.s] Error 1
Makefile:1060: recipe for target
'arch/arm/mach-omap2' failed
make[1]: *** [arch/arm/mach-omap2] Error 2
make[1]: *** Waiting for unfinished jobs....

Current code adds a file check before checking the dependency, in filechk it does mkdir -p $(dir $@).

Fixes 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
---
 drivers/memory/Makefile.asm-offsets | 1 +
 1 file changed, 1 insertion(+)
drivers/memory/Makefile.asm-offsets +1 -0
index 843ff60ccb5a..70d44a9ed32a 100644
@@ -1,4 +1,5 @@
 drivers/memory/emif-asm-offsets.s: drivers/memory/emif-asm-offsets.c
+	$(call filechk,$@)
 	$(call if_changed_dep,cc_s_c)
 
 include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE
Signature · 1 line
2.16.3
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines · Anders Roxell

Build failes due to that the directory isn't created before we execute
the build rule.
cc1: fatal error: can’t open ‘drivers/memory/emif-asm-offsets.s’ for
writing: No such file or directory compilation terminated.
drivers/memory/Makefile.asm-offsets:2: recipe for target 'drivers/memory/emif-asm-offsets.s' failed make[2]: *** [drivers/memory/emif-asm-offsets.s] Error 1
Makefile:1060: recipe for target
'arch/arm/mach-omap2' failed
make[1]: *** [arch/arm/mach-omap2] Error 2
make[1]: *** Waiting for unfinished jobs....

Quoted 6 lines

Current code adds a file check before checking the dependency, in filechk it does mkdir -p $(dir $@).

Fixes 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")

---

#2 lore raw
In reply to Anders Roxell

2018-04-06 22:00 GMT+09:00 Anders Roxell <[email protected]>:

Quoted 31 lines

Build failes due to that the directory isn't created before we execute
the build rule.
cc1: fatal error: can’t open ‘drivers/memory/emif-asm-offsets.s’ for
writing: No such file or directory compilation terminated.
drivers/memory/Makefile.asm-offsets:2: recipe for target 'drivers/memory/emif-asm-offsets.s' failed make[2]: *** [drivers/memory/emif-asm-offsets.s] Error 1
Makefile:1060: recipe for target
'arch/arm/mach-omap2' failed
make[1]: *** [arch/arm/mach-omap2] Error 2
make[1]: *** Waiting for unfinished jobs....

Current code adds a file check before checking the dependency, in filechk it does mkdir -p $(dir $@).

Fixes 41d9d44d7258 ("ARM: OMAP2+: pm33xx-core: Add platform code needed for PM")
---
 drivers/memory/Makefile.asm-offsets | 1 +
 1 file changed, 1 insertion(+)
drivers/memory/Makefile.asm-offsets +1 -1
index 843ff60ccb5a..70d44a9ed32a 100644
@@ -1,4 +1,5 @@
 drivers/memory/emif-asm-offsets.s: drivers/memory/emif-asm-offsets.c
+       $(call filechk,$@)
        $(call if_changed_dep,cc_s_c)
 
 include/generated/ti-emif-asm-offsets.h: drivers/memory/emif-asm-offsets.s FORCE
--
Quoted 1 line

2.16.3

Why filechk just for creating a directory?

$(Q)mkdir $(dir $@)

is enough, but still this is a bad fix.

Generating the same object from different directories is fragile in parallel building.

Signature · 2 lines
Best Regards
Masahiro Yamada