Skip to content

Commit

Permalink
kbuild: Send various piping stderr stream output to /dev/null
Browse files Browse the repository at this point in the history
- This suppresses following errors for us:

  error: write on a pipe with no reader

- Fix references are from issue ClangBuiltLinux/linux#1651

Co-authored-by: GhostMaster69-dev <rathore6375@gmail.com>
Signed-off-by: GhostMaster69-dev <rathore6375@gmail.com>
[Diaz1401: also apply on cmd_modversions_S]
Signed-off-by: Diaz1401 <reagor8161@outlook.com>
  • Loading branch information
2 people authored and Diaz1401 committed Feb 22, 2025
1 parent 31ca441 commit 67cc333
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/Makefile.build
Original file line number Diff line number Diff line change
Expand Up @@ -195,20 +195,20 @@ ifdef CONFIG_LTO_CLANG
# to the kernel and/or modules at the end.
cmd_modversions_c = \
if $(OBJDUMP) -h $(@D)/.tmp_$(@F) >/dev/null 2>/dev/null; then \
if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
if $(OBJDUMP) -h $(@D)/.tmp_$(@F) 2>/dev/null | grep -q __ksymtab; then \
$(call cmd_gensymtypes_c,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \
> $(@D)/$(@F).symversions; \
fi; \
else \
if $(LLVM_NM) $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
if $(LLVM_NM) $(@D)/.tmp_$(@F) 2>/dev/null | grep -q __ksymtab; then \
$(call cmd_gensymtypes_c,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \
> $(@D)/$(@F).symversions; \
fi; \
fi; \
mv -f $(@D)/.tmp_$(@F) $@;
else
cmd_modversions_c = \
if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
if $(OBJDUMP) -h $(@D)/.tmp_$(@F) 2>/dev/null | grep -q __ksymtab; then \
$(call cmd_gensymtypes_c,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \
> $(@D)/.tmp_$(@F:.o=.ver); \
\
Expand Down Expand Up @@ -421,7 +421,7 @@ else
cmd_as_o_S = $(CC) $(a_flags) -c -o $(@D)/.tmp_$(@F) $<

cmd_modversions_S = \
if $(OBJDUMP) -h $(@D)/.tmp_$(@F) | grep -q __ksymtab; then \
if $(OBJDUMP) -h $(@D)/.tmp_$(@F) 2>/dev/null | grep -q __ksymtab; then \
$(call cmd_gensymtypes_S,$(KBUILD_SYMTYPES),$(@:.o=.symtypes)) \
> $(@D)/.tmp_$(@F:.o=.ver); \
\
Expand Down

0 comments on commit 67cc333

Please sign in to comment.