diff mbox series

[v2,1/2] Makefile: Export clang toolchain variables

Message ID 20181112042116.5271-2-joel@jms.id.au
State New
Headers show
Series powerpc/boot: Fix cross compiling with clang | expand

Commit Message

Joel Stanley Nov. 12, 2018, 4:21 a.m. UTC
The powerpc makefile will use these in it's boot wrapper.

Signed-off-by: Joel Stanley <joel@jms.id.au>

---
 Makefile | 1 +
 1 file changed, 1 insertion(+)

-- 
2.19.1

Comments

Nick Desaulniers Nov. 12, 2018, 6:55 p.m. UTC | #1
On Sun, Nov 11, 2018 at 8:21 PM Joel Stanley <joel@jms.id.au> wrote:
>

> The powerpc makefile will use these in it's boot wrapper.

>

> Signed-off-by: Joel Stanley <joel@jms.id.au>

> ---

>  Makefile | 1 +

>  1 file changed, 1 insertion(+)

>

> diff --git a/Makefile b/Makefile

> index 09278330282d..840efe6eb54c 100644

> --- a/Makefile

> +++ b/Makefile

> @@ -495,6 +495,7 @@ endif

>  ifneq ($(GCC_TOOLCHAIN),)

>  CLANG_FLAGS    += --gcc-toolchain=$(GCC_TOOLCHAIN)

>  endif

> +export CLANG_FLAGS

>  CLANG_FLAGS    += -no-integrated-as


Does this export CLANG_FLAGS before `-no-integrated-as` is set?
Either way, I think it would be clearer to export this after all the
relevant flags are set.

>  KBUILD_CFLAGS  += $(CLANG_FLAGS)

>  KBUILD_AFLAGS  += $(CLANG_FLAGS)

> --

> 2.19.1

>



-- 
Thanks,
~Nick Desaulniers
Masahiro Yamada Nov. 13, 2018, 5:16 a.m. UTC | #2
On Tue, Nov 13, 2018 at 3:56 AM Nick Desaulniers
<ndesaulniers@google.com> wrote:
>

> On Sun, Nov 11, 2018 at 8:21 PM Joel Stanley <joel@jms.id.au> wrote:

> >

> > The powerpc makefile will use these in it's boot wrapper.

> >

> > Signed-off-by: Joel Stanley <joel@jms.id.au>

> > ---

> >  Makefile | 1 +

> >  1 file changed, 1 insertion(+)

> >

> > diff --git a/Makefile b/Makefile

> > index 09278330282d..840efe6eb54c 100644

> > --- a/Makefile

> > +++ b/Makefile

> > @@ -495,6 +495,7 @@ endif

> >  ifneq ($(GCC_TOOLCHAIN),)

> >  CLANG_FLAGS    += --gcc-toolchain=$(GCC_TOOLCHAIN)

> >  endif

> > +export CLANG_FLAGS

> >  CLANG_FLAGS    += -no-integrated-as

>

> Does this export CLANG_FLAGS before `-no-integrated-as` is set?


This does not matter.

For example, KBUILD_CFLAGS accumulates several compiler flags
after it is marked as 'export'.


> Either way, I think it would be clearer to export this after all the

> relevant flags are set.


OK. It is just a matter of preference,
but I will move the export line below
when I pick up this patch set.



> >  KBUILD_CFLAGS  += $(CLANG_FLAGS)

> >  KBUILD_AFLAGS  += $(CLANG_FLAGS)

> > --

> > 2.19.1

> >

>

>

> --

> Thanks,

> ~Nick Desaulniers




-- 
Best Regards
Masahiro Yamada
Masahiro Yamada Nov. 13, 2018, 11:34 p.m. UTC | #3
On Mon, Nov 12, 2018 at 1:21 PM Joel Stanley <joel@jms.id.au> wrote:
>

> The powerpc makefile will use these in it's boot wrapper.

>

> Signed-off-by: Joel Stanley <joel@jms.id.au>

> ---



Applied to linux-kbuild.
Thanks!


>  Makefile | 1 +

>  1 file changed, 1 insertion(+)

>

> diff --git a/Makefile b/Makefile

> index 09278330282d..840efe6eb54c 100644

> --- a/Makefile

> +++ b/Makefile

> @@ -495,6 +495,7 @@ endif

>  ifneq ($(GCC_TOOLCHAIN),)

>  CLANG_FLAGS    += --gcc-toolchain=$(GCC_TOOLCHAIN)

>  endif

> +export CLANG_FLAGS

>  CLANG_FLAGS    += -no-integrated-as

>  KBUILD_CFLAGS  += $(CLANG_FLAGS)

>  KBUILD_AFLAGS  += $(CLANG_FLAGS)

> --

> 2.19.1

>



-- 
Best Regards
Masahiro Yamada
diff mbox series

Patch

diff --git a/Makefile b/Makefile
index 09278330282d..840efe6eb54c 100644
--- a/Makefile
+++ b/Makefile
@@ -495,6 +495,7 @@  endif
 ifneq ($(GCC_TOOLCHAIN),)
 CLANG_FLAGS	+= --gcc-toolchain=$(GCC_TOOLCHAIN)
 endif
+export CLANG_FLAGS
 CLANG_FLAGS	+= -no-integrated-as
 KBUILD_CFLAGS	+= $(CLANG_FLAGS)
 KBUILD_AFLAGS	+= $(CLANG_FLAGS)