linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] um: do not evaluate compiler's library path when cleaning
@ 2020-04-17 18:04 Masahiro Yamada
  2020-04-17 22:19 ` Nathan Chancellor
  2020-05-01  5:44 ` Masahiro Yamada
  0 siblings, 2 replies; 3+ messages in thread
From: Masahiro Yamada @ 2020-04-17 18:04 UTC (permalink / raw)
  To: Jeff Dike, Richard Weinberger, Anton Ivanov, linux-um
  Cc: linux-kbuild, Masahiro Yamada, Alex Dewar, Erel Geron,
	Johannes Berg, Nathan Chancellor, Nick Desaulniers, linux-kernel

Since commit a83e4ca26af8 ("kbuild: remove cc-option switch from
-Wframe-larger-than="), 'make ARCH=um clean' emits an error message
as follows:

  $ make ARCH=um clean
  gcc: error: missing argument to '-Wframe-larger-than='

We do not care compiler flags when cleaning.

Use the '=' operator for lazy expansion because we do not use
LDFLAGS_pcap.o or LDFLAGS_vde.o when cleaning.

While I was here, I removed the redundant -r option because it
already exists in the recipe.

Fixes: a83e4ca26af8 ("kbuild: remove cc-option switch from -Wframe-larger-than=")
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
---

 arch/um/drivers/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile
index a290821e355c..2a249f619467 100644
--- a/arch/um/drivers/Makefile
+++ b/arch/um/drivers/Makefile
@@ -18,9 +18,9 @@ ubd-objs := ubd_kern.o ubd_user.o
 port-objs := port_kern.o port_user.o
 harddog-objs := harddog_kern.o harddog_user.o
 
-LDFLAGS_pcap.o := -r $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a)
+LDFLAGS_pcap.o = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a)
 
-LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a)
+LDFLAGS_vde.o = $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a)
 
 targets := pcap_kern.o pcap_user.o vde_kern.o vde_user.o
 
-- 
2.25.1


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

* Re: [PATCH] um: do not evaluate compiler's library path when cleaning
  2020-04-17 18:04 [PATCH] um: do not evaluate compiler's library path when cleaning Masahiro Yamada
@ 2020-04-17 22:19 ` Nathan Chancellor
  2020-05-01  5:44 ` Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: Nathan Chancellor @ 2020-04-17 22:19 UTC (permalink / raw)
  To: Masahiro Yamada
  Cc: Jeff Dike, Richard Weinberger, Anton Ivanov, linux-um,
	linux-kbuild, Alex Dewar, Erel Geron, Johannes Berg,
	Nick Desaulniers, linux-kernel

On Sat, Apr 18, 2020 at 03:04:55AM +0900, Masahiro Yamada wrote:
> Since commit a83e4ca26af8 ("kbuild: remove cc-option switch from
> -Wframe-larger-than="), 'make ARCH=um clean' emits an error message
> as follows:
> 
>   $ make ARCH=um clean
>   gcc: error: missing argument to '-Wframe-larger-than='
> 
> We do not care compiler flags when cleaning.
> 
> Use the '=' operator for lazy expansion because we do not use
> LDFLAGS_pcap.o or LDFLAGS_vde.o when cleaning.
> 
> While I was here, I removed the redundant -r option because it
> already exists in the recipe.
> 
> Fixes: a83e4ca26af8 ("kbuild: remove cc-option switch from -Wframe-larger-than=")
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
> 
>  arch/um/drivers/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile
> index a290821e355c..2a249f619467 100644
> --- a/arch/um/drivers/Makefile
> +++ b/arch/um/drivers/Makefile
> @@ -18,9 +18,9 @@ ubd-objs := ubd_kern.o ubd_user.o
>  port-objs := port_kern.o port_user.o
>  harddog-objs := harddog_kern.o harddog_user.o
>  
> -LDFLAGS_pcap.o := -r $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a)
> +LDFLAGS_pcap.o = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a)
>  
> -LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a)
> +LDFLAGS_vde.o = $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a)
>  
>  targets := pcap_kern.o pcap_user.o vde_kern.o vde_user.o
>  
> -- 
> 2.25.1
> 

I tested building pcap.o both before and after this change, no changes
there.

I do see the clean error fixed.

Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Tested-by: Nathan Chancellor <natechancellor@gmail.com> [build]

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

* Re: [PATCH] um: do not evaluate compiler's library path when cleaning
  2020-04-17 18:04 [PATCH] um: do not evaluate compiler's library path when cleaning Masahiro Yamada
  2020-04-17 22:19 ` Nathan Chancellor
@ 2020-05-01  5:44 ` Masahiro Yamada
  1 sibling, 0 replies; 3+ messages in thread
From: Masahiro Yamada @ 2020-05-01  5:44 UTC (permalink / raw)
  To: Jeff Dike, Richard Weinberger, Anton Ivanov, linux-um
  Cc: Linux Kbuild mailing list, Alex Dewar, Erel Geron, Johannes Berg,
	Nathan Chancellor, Nick Desaulniers, Linux Kernel Mailing List

On Sat, Apr 18, 2020 at 3:06 AM Masahiro Yamada <masahiroy@kernel.org> wrote:
>
> Since commit a83e4ca26af8 ("kbuild: remove cc-option switch from
> -Wframe-larger-than="), 'make ARCH=um clean' emits an error message
> as follows:
>
>   $ make ARCH=um clean
>   gcc: error: missing argument to '-Wframe-larger-than='
>
> We do not care compiler flags when cleaning.
>
> Use the '=' operator for lazy expansion because we do not use
> LDFLAGS_pcap.o or LDFLAGS_vde.o when cleaning.
>
> While I was here, I removed the redundant -r option because it
> already exists in the recipe.
>
> Fixes: a83e4ca26af8 ("kbuild: remove cc-option switch from -Wframe-larger-than=")
> Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
> ---
>
>  arch/um/drivers/Makefile | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/um/drivers/Makefile b/arch/um/drivers/Makefile
> index a290821e355c..2a249f619467 100644
> --- a/arch/um/drivers/Makefile
> +++ b/arch/um/drivers/Makefile
> @@ -18,9 +18,9 @@ ubd-objs := ubd_kern.o ubd_user.o
>  port-objs := port_kern.o port_user.o
>  harddog-objs := harddog_kern.o harddog_user.o
>
> -LDFLAGS_pcap.o := -r $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a)
> +LDFLAGS_pcap.o = $(shell $(CC) $(KBUILD_CFLAGS) -print-file-name=libpcap.a)
>
> -LDFLAGS_vde.o := -r $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a)
> +LDFLAGS_vde.o = $(shell $(CC) $(CFLAGS) -print-file-name=libvdeplug.a)
>
>  targets := pcap_kern.o pcap_user.o vde_kern.o vde_user.o
>
> --
> 2.25.1
>


Applied to linux-kbuild.


-- 
Best Regards
Masahiro Yamada

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

end of thread, other threads:[~2020-05-01  5:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-17 18:04 [PATCH] um: do not evaluate compiler's library path when cleaning Masahiro Yamada
2020-04-17 22:19 ` Nathan Chancellor
2020-05-01  5:44 ` 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).