2020-05-26 13:10:11

by Masahiro Yamada

[permalink] [raw]
Subject: [PATCH 4/4] m68k: pass -D options to KBUILD_CPPFLAGS instead of KBUILD_{A,C}FLAGS

Precisely, -D is a preprocessor option.

KBUILD_CPPFLAGS is passed to for compiling .c and .S files too.

Signed-off-by: Masahiro Yamada <[email protected]>
---

arch/m68k/Makefile | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
index ae6e29da3a3e..c28f9f917ac0 100644
--- a/arch/m68k/Makefile
+++ b/arch/m68k/Makefile
@@ -70,9 +70,8 @@ ifdef CONFIG_MMU
KBUILD_CFLAGS += -fno-strength-reduce -ffixed-a2
else
# we can use a m68k-linux-gcc toolchain with these in place
-KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
-KBUILD_CFLAGS += -D__uClinux__
-KBUILD_AFLAGS += -D__uClinux__
+KBUILD_CPPFLAGS += -DUTS_SYSNAME=\"uClinux\"
+KBUILD_CPPFLAGS += -D__uClinux__
endif

KBUILD_LDFLAGS := -m m68kelf
--
2.25.1


2020-05-27 15:52:25

by Greg Ungerer

[permalink] [raw]
Subject: Re: [PATCH 4/4] m68k: pass -D options to KBUILD_CPPFLAGS instead of KBUILD_{A,C}FLAGS


On 26/5/20 10:38 pm, Masahiro Yamada wrote:
> Precisely, -D is a preprocessor option.
>
> KBUILD_CPPFLAGS is passed to for compiling .c and .S files too.
>
> Signed-off-by: Masahiro Yamada <[email protected]>

Acked-by: Greg Ungerer <[email protected]>

Regards
Greg


> ---
>
> arch/m68k/Makefile | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/arch/m68k/Makefile b/arch/m68k/Makefile
> index ae6e29da3a3e..c28f9f917ac0 100644
> --- a/arch/m68k/Makefile
> +++ b/arch/m68k/Makefile
> @@ -70,9 +70,8 @@ ifdef CONFIG_MMU
> KBUILD_CFLAGS += -fno-strength-reduce -ffixed-a2
> else
> # we can use a m68k-linux-gcc toolchain with these in place
> -KBUILD_CFLAGS += -DUTS_SYSNAME=\"uClinux\"
> -KBUILD_CFLAGS += -D__uClinux__
> -KBUILD_AFLAGS += -D__uClinux__
> +KBUILD_CPPFLAGS += -DUTS_SYSNAME=\"uClinux\"
> +KBUILD_CPPFLAGS += -D__uClinux__
> endif
>
> KBUILD_LDFLAGS := -m m68kelf
>

2020-06-29 19:08:25

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 4/4] m68k: pass -D options to KBUILD_CPPFLAGS instead of KBUILD_{A,C}FLAGS

On Tue, May 26, 2020 at 2:38 PM Masahiro Yamada <[email protected]> wrote:
> Precisely, -D is a preprocessor option.
>
> KBUILD_CPPFLAGS is passed to for compiling .c and .S files too.
>
> Signed-off-by: Masahiro Yamada <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>
i.e. will queue in the m68k for-v5.9 branch.

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds