From: Markus Mayer via buildroot <buildroot@buildroot.org>
To: Arnout Vandecappelle <arnout@mind.be>, Petr Vorel <petr.vorel@gmail.com>
Cc: Markus Mayer <mmayer@broadcom.com>,
Buildroot Mailing List <buildroot@buildroot.org>
Subject: [Buildroot] [PATCH 1/1] Makefile: set HOST*_NOCCACHE variables only if unset
Date: Tue, 28 Sep 2021 12:55:33 -0700 [thread overview]
Message-ID: <20210928195533.1736944-2-mmayer@broadcom.com> (raw)
In-Reply-To: <20210928195533.1736944-1-mmayer@broadcom.com>
Set HOSTCC_NOCCACHE and HOSTCXX_NOCCACHE only if they are not set. This
allows recursive calls to "make" to work as intended in the presence of
ccache.
Without guarding these variables, a recursive invocation of make would
re-define
HOSTCC_NOCCACHE := $(HOSTCC)
and
HOSTCXX_NOCCACHE := $(HOSTCXX)
at a point in time when HOSTCC and HOSTCXX already point to ccache.
Signed-off-by: Markus Mayer <mmayer@broadcom.com>
---
Makefile | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Makefile b/Makefile
index d248bd76b2..71c0577030 100644
--- a/Makefile
+++ b/Makefile
@@ -286,12 +286,16 @@ ifndef HOSTCC
HOSTCC := gcc
HOSTCC := $(shell command -v $(HOSTCC) || type -p $(HOSTCC) || echo gcc)
endif
+ifndef HOSTCC_NOCCACHE
HOSTCC_NOCCACHE := $(HOSTCC)
+endif
ifndef HOSTCXX
HOSTCXX := g++
HOSTCXX := $(shell command -v $(HOSTCXX) || type -p $(HOSTCXX) || echo g++)
endif
+ifndef HOSTCXX_NOCCACHE
HOSTCXX_NOCCACHE := $(HOSTCXX)
+endif
ifndef HOSTCPP
HOSTCPP := cpp
endif
--
2.25.1
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2021-09-28 19:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-28 19:55 [Buildroot] [PATCH 0/1] Build issue related to "command -v" Markus Mayer via buildroot
2021-09-28 19:55 ` Markus Mayer via buildroot [this message]
2021-09-29 19:27 ` [Buildroot] [PATCH 1/1] Makefile: set HOST*_NOCCACHE variables only if unset Petr Vorel
2021-12-28 21:18 ` Thomas Petazzoni
2021-12-28 21:26 ` Nicolas Cavallari
2021-12-29 9:00 ` Thomas Petazzoni
2021-12-29 9:12 ` Thomas Petazzoni
2021-09-29 8:24 ` [Buildroot] [PATCH 0/1] Build issue related to "command -v" Nicolas Cavallari
2021-09-29 16:14 ` David Laight
2021-09-29 17:30 ` Petr Vorel
2021-09-29 19:59 ` Arnout Vandecappelle
2021-09-29 20:11 ` Petr Vorel
2021-10-01 17:53 ` Markus Mayer via buildroot
2021-10-01 18:17 ` Yann E. MORIN
2021-10-02 19:23 ` Petr Vorel
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=20210928195533.1736944-2-mmayer@broadcom.com \
--to=buildroot@buildroot.org \
--cc=arnout@mind.be \
--cc=mmayer@broadcom.com \
--cc=petr.vorel@gmail.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.