linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] kbuild: Remove unused variable TMPO of ld-option
@ 2019-08-06  6:23 Xiao Yang
  2019-08-06  6:33 ` Masahiro Yamada
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Yang @ 2019-08-06  6:23 UTC (permalink / raw)
  To: yamada.masahiro, michal.lkml
  Cc: linux-kbuild, linux-kernel, yangx.jy, Xiao Yang

ld-option implementation has been simplified so variable TMPO
is no longer needed.

Fixes: Commit 0294e6f4a000 ("kbuild: simplify ld-option implementation")
Signed-off-by: Xiao Yang <ice_yangxiao@163.com>
---
 scripts/Kbuild.include | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index 4b0432e095ae..13a6f627351d 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -91,12 +91,11 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
 # automatically cleaned up.
 try-run = $(shell set -e;		\
 	TMP="$(TMPOUT).$$$$.tmp";	\
-	TMPO="$(TMPOUT).$$$$.o";	\
 	if ($(1)) >/dev/null 2>&1;	\
 	then echo "$(2)";		\
 	else echo "$(3)";		\
 	fi;				\
-	rm -f "$$TMP" "$$TMPO")
+	rm -f "$$TMP")
 
 # as-option
 # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
-- 
2.21.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] kbuild: Remove unused variable TMPO of ld-option
  2019-08-06  6:23 [PATCH] kbuild: Remove unused variable TMPO of ld-option Xiao Yang
@ 2019-08-06  6:33 ` Masahiro Yamada
  0 siblings, 0 replies; 2+ messages in thread
From: Masahiro Yamada @ 2019-08-06  6:33 UTC (permalink / raw)
  To: Xiao Yang
  Cc: Michal Marek, Linux Kbuild mailing list,
	Linux Kernel Mailing List, yangx.jy

On Tue, Aug 6, 2019 at 3:23 PM Xiao Yang <ice_yangxiao@163.com> wrote:
>
> ld-option implementation has been simplified so variable TMPO
> is no longer needed.
>
> Fixes: Commit 0294e6f4a000 ("kbuild: simplify ld-option implementation")
> Signed-off-by: Xiao Yang <ice_yangxiao@163.com>
> ---
>  scripts/Kbuild.include | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
> index 4b0432e095ae..13a6f627351d 100644
> --- a/scripts/Kbuild.include
> +++ b/scripts/Kbuild.include
> @@ -91,12 +91,11 @@ TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/)
>  # automatically cleaned up.
>  try-run = $(shell set -e;              \
>         TMP="$(TMPOUT).$$$$.tmp";       \
> -       TMPO="$(TMPOUT).$$$$.o";        \
>         if ($(1)) >/dev/null 2>&1;      \
>         then echo "$(2)";               \
>         else echo "$(3)";               \
>         fi;                             \
> -       rm -f "$$TMP" "$$TMPO")
> +       rm -f "$$TMP")
>
>  # as-option
>  # Usage: cflags-y += $(call as-option,-Wa$(comma)-isa=foo,)
> --
> 2.21.0
>
>

Unfortunately, there is a user in arch/x86/Makefile.

masahiro@pug:~/ref/linux$ git grep TMPO
arch/x86/Makefile:                      $(OBJCOPY) -O elf32-x86-64
"$$TMP" "$$TMPO" && \
arch/x86/Makefile:                      $(LD) -m elf32_x86_64 "$$TMPO"
-o "$$TMP",y,n)
scripts/Kbuild.include:TMPOUT := $(if $(KBUILD_EXTMOD),$(firstword
$(KBUILD_EXTMOD))/)
scripts/Kbuild.include: TMP="$(TMPOUT).$$$$.tmp";       \
scripts/Kbuild.include: TMPO="$(TMPOUT).$$$$.o";        \
scripts/Kbuild.include: rm -f "$$TMP" "$$TMPO")




-- 
Best Regards
Masahiro Yamada

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-08-06  6:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-06  6:23 [PATCH] kbuild: Remove unused variable TMPO of ld-option Xiao Yang
2019-08-06  6:33 ` Masahiro Yamada

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).