[Buildroot] [PATCH] toolchain: generate check-headers program under $(BUILD_DIR)
Thomas Petazzoni
thomas.petazzoni at bootlin.com
Mon Sep 23 11:48:18 UTC 2019
On Mon, 23 Sep 2019 08:17:55 -0300
Carlos Santos <unixmania at gmail.com> wrote:
> > I'm rather surprised that check-headers is the nly thing broken in that
> > case... :-/
> >
> > Alternatively, we should probably use our own TMPDIR instead, which
> > would fix all such problems:
> >
> > diff --git a/Makefile b/Makefile
> > index 82c844620a..a006149898 100644
> > --- a/Makefile
> > +++ b/Makefile
> > @@ -209,6 +209,11 @@ BASE_TARGET_DIR := $(BASE_DIR)/target
> > HOST_DIR := $(BASE_DIR)/host
> > GRAPHS_DIR := $(BASE_DIR)/graphs
> >
> > +export TMPDIR = $(BUILD_DIR)/.br-temp-or-whatever
> > +export TMP_DIR = $(TMPDIR)
> > +export TEMP_DIR = $(TMPDIR)
> > +# And so on...
>
> That would create all temporary files under
> $(BUILD_DIR)/.br-temp-or-whatever, ruining the advantage of using a
> tmpfs mounted at /tmp, which is much faster because it's in RAM.
The problem indeed only occurs with temporary files that need to be
*executed*. For example, gcc creates tons of temporary files in /tmp,
and that works perfectly fine and shouldn't be changed. So at this
point, I also tend to prefer Carlos solution to only address the
check-headers case.
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
More information about the buildroot
mailing list