mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Masahiro Yamada <yamada.masahiro@socionext.com>
To: Steffen Trumtrar <s.trumtrar@pengutronix.de>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 04/15] scripts/Kbuild.include: replace KBUILD_CPPFLAGS with CPPFLAGS
Date: Wed, 5 Dec 2018 21:22:29 +0900	[thread overview]
Message-ID: <CAK7LNAS5eO1yRQRQGPcH-PKS2f_-9Oruhb5Pp+O6-ztwJZHw4A@mail.gmail.com> (raw)
In-Reply-To: <20181129113048.31857-5-s.trumtrar@pengutronix.de>

On Thu, Nov 29, 2018 at 8:31 PM Steffen Trumtrar
<s.trumtrar@pengutronix.de> wrote:
>
> The barebox Makefiles do not use KBUILD_CPPFLAGS but CPPFLAGS as variable name.
>
> Signed-off-by: Steffen Trumtrar <s.trumtrar@pengutronix.de>
> ---


This might be a step backward.


In old days, Linux also used well-known CPPFLAGS.

Then Linux renamed CPPFLAGS -> KBUILD_CFLAGS

See the following commit:


commit 06c5040cdb13d27adad118f2fbfae905a1911b37
Author: Sam Ravnborg <sam@neptun.(none)>
Date:   Mon Oct 15 22:17:25 2007 +0200

    kbuild: enable 'make CPPFLAGS=...' to add additional options to CPP



Barebox forked from U-Boot around 2007,
so maybe Barebox is based on older Makefiles.






>  scripts/Kbuild.include | 6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
> index e62bd35692d0..0cb3a70a6a42 100644
> --- a/scripts/Kbuild.include
> +++ b/scripts/Kbuild.include
> @@ -111,12 +111,12 @@ as-instr = $(call try-run,\
>  # Usage: cflags-y += $(call cc-option,-march=winchip-c6,-march=i586)
>
>  cc-option = $(call try-run,\
> -       $(CC) $(KBUILD_CPPFLAGS) $(CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
> +       $(CC) $(CPPFLAGS) $(CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",$(1),$(2))
>
>  # cc-option-yn
>  # Usage: flag := $(call cc-option-yn,-march=winchip-c6)
>  cc-option-yn = $(call try-run,\
> -       $(CC) $(KBUILD_CPPFLAGS) $(CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)
> +       $(CC) $(CPPFLAGS) $(CFLAGS) $(1) -c -xc /dev/null -o "$$TMP",y,n)
>
>  # cc-option-align
>  # Prefix align with either -falign or -malign
> @@ -126,7 +126,7 @@ cc-option-align = $(subst -functions=0,,\
>  # cc-disable-warning
>  # Usage: cflags-y += $(call cc-disable-warning,unused-but-set-variable)
>  cc-disable-warning = $(call try-run,\
> -       $(CC) $(KBUILD_CPPFLAGS) $(CFLAGS) -W$(strip $(1)) -c -xc /dev/null -o "$$TMP",-Wno-$(strip $(1)))
> +       $(CC) $(CPPFLAGS) $(CFLAGS) -W$(strip $(1)) -c -xc /dev/null -o "$$TMP",-Wno-$(strip $(1)))
>
>  # cc-version
>  # Usage gcc-ver := $(call cc-version)
> --
> 2.19.2
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox



-- 
Best Regards
Masahiro Yamada

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  reply	other threads:[~2018-12-05 12:23 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-29 11:30 [PATCH 00/15] Makefile: sync with linux v4.13 and add thin archives support Steffen Trumtrar
2018-11-29 11:30 ` [PATCH 01/15] Makefile: replace LINUXINCLUDE with BAREBOXINCLUDE Steffen Trumtrar
2018-11-29 11:30 ` [PATCH 02/15] Makefile: Correctly deal with make options which contain an "s" Steffen Trumtrar
2018-12-09 23:07   ` Roland Hieber
2018-11-29 11:30 ` [PATCH 03/15] scripts/Kbuild.include: Fix portability problem of "echo -e" Steffen Trumtrar
2018-11-29 11:30 ` [PATCH 04/15] scripts/Kbuild.include: replace KBUILD_CPPFLAGS with CPPFLAGS Steffen Trumtrar
2018-12-05 12:22   ` Masahiro Yamada [this message]
2018-12-05 12:26     ` Masahiro Yamada
2018-12-06  7:54     ` Sascha Hauer
2018-11-29 11:30 ` [PATCH 05/15] debug: Add CONFIG_DEBUG_READABLE_ASM Steffen Trumtrar
2018-11-29 11:30 ` [PATCH 06/15] Makefile: improve line wrapping Steffen Trumtrar
2018-11-29 11:30 ` [PATCH 07/15] Makefile: link of barebox moved to script Steffen Trumtrar
2018-11-30  7:17   ` Sascha Hauer
2018-12-03  4:49   ` Sam Ravnborg
2018-12-04  7:56     ` Sascha Hauer
2018-11-29 11:30 ` [PATCH 08/15] scripts: link-barebox: fix bash-ism Steffen Trumtrar
2018-11-29 11:30 ` [PATCH 09/15] scripts: link-barebox: force error on kallsyms failure Steffen Trumtrar
2018-11-29 11:30 ` [PATCH 10/15] scripts: link-barebox: allow architectures to use thin archives instead of ld -r Steffen Trumtrar
2018-11-29 11:30 ` [PATCH 11/15] scripts: link-barebox: kallsyms allow 3-pass generation Steffen Trumtrar
2018-11-29 11:30 ` [PATCH 12/15] scripts: link-barebox: minor improvement for thin archives build Steffen Trumtrar
2018-11-29 11:30 ` [PATCH 13/15] scripts: link-barebox: close thin archives --whole-archives option Steffen Trumtrar
2018-11-29 11:30 ` [PATCH 14/15] scripts: link-barebox: thin archives use P option to ar Steffen Trumtrar
2018-11-29 11:30 ` [PATCH 15/15] ARM: Kconfig: select THIN_ARCHIVES for ARM Steffen Trumtrar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAK7LNAS5eO1yRQRQGPcH-PKS2f_-9Oruhb5Pp+O6-ztwJZHw4A@mail.gmail.com \
    --to=yamada.masahiro@socionext.com \
    --cc=barebox@lists.infradead.org \
    --cc=s.trumtrar@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox