kbuild: use -E instead of -c for __cc-option
diff mbox series

Message ID 20190628051300.30678-1-yamada.masahiro@socionext.com
State New
Headers show
Series
  • kbuild: use -E instead of -c for __cc-option
Related show

Commit Message

Masahiro Yamada June 28, 2019, 5:13 a.m. UTC
Use -E instead of -c like scripts/Kconfig.include
This makes the compiler flag evaluation slightly faster.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
---

 scripts/Kbuild.include | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Masahiro Yamada July 6, 2019, 2:37 p.m. UTC | #1
On Fri, Jun 28, 2019 at 2:13 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> Use -E instead of -c like scripts/Kconfig.include
> This makes the compiler flag evaluation slightly faster.
>
> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> ---

Applied to linux-kbuild.



>  scripts/Kbuild.include | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
> index f641bb0aa63f..e4329b92d165 100644
> --- a/scripts/Kbuild.include
> +++ b/scripts/Kbuild.include
> @@ -113,7 +113,7 @@ as-instr = $(call try-run,\
>  # __cc-option
>  # Usage: MY_CFLAGS += $(call __cc-option,$(CC),$(MY_CFLAGS),-march=winchip-c6,-march=i586)
>  __cc-option = $(call try-run,\
> -       $(1) -Werror $(2) $(3) -c -x c /dev/null -o "$$TMP",$(3),$(4))
> +       $(1) -Werror $(2) $(3) -E -x c /dev/null -o "$$TMP",$(3),$(4))
>
>  # Do not attempt to build with gcc plugins during cc-option tests.
>  # (And this uses delayed resolution so the flags will be up to date.)
> --
> 2.17.1
>
Masahiro Yamada July 7, 2019, 4:32 a.m. UTC | #2
On Sat, Jul 6, 2019 at 11:37 PM Masahiro Yamada
<yamada.masahiro@socionext.com> wrote:
>
> On Fri, Jun 28, 2019 at 2:13 PM Masahiro Yamada
> <yamada.masahiro@socionext.com> wrote:
> >
> > Use -E instead of -c like scripts/Kconfig.include
> > This makes the compiler flag evaluation slightly faster.
> >
> > Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
> > ---
>
> Applied to linux-kbuild.

Dropped because 0-day bot reported build error.

Patch
diff mbox series

diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
index f641bb0aa63f..e4329b92d165 100644
--- a/scripts/Kbuild.include
+++ b/scripts/Kbuild.include
@@ -113,7 +113,7 @@  as-instr = $(call try-run,\
 # __cc-option
 # Usage: MY_CFLAGS += $(call __cc-option,$(CC),$(MY_CFLAGS),-march=winchip-c6,-march=i586)
 __cc-option = $(call try-run,\
-	$(1) -Werror $(2) $(3) -c -x c /dev/null -o "$$TMP",$(3),$(4))
+	$(1) -Werror $(2) $(3) -E -x c /dev/null -o "$$TMP",$(3),$(4))
 
 # Do not attempt to build with gcc plugins during cc-option tests.
 # (And this uses delayed resolution so the flags will be up to date.)