Re: [PATCH v2 2/2] Makefile: infer CROSS_COMPILE from SRCARCH for LLVM=1 LLVM_IAS=1

From: Masahiro Yamada
Date: Wed Jul 21 2021 - 01:13:58 EST


On Wed, Jul 21, 2021 at 8:20 AM Linus Torvalds
<torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
>
> On Tue, Jul 20, 2021 at 2:54 PM Linus Torvalds
> <torvalds@xxxxxxxxxxxxxxxxxxxx> wrote:
> >
> > But there are other things that stick around. In particular, I have
> > considered simply using git config variables for that.
> >
> > Something like this in the main Makefile:
>
> A slightly more fleshed-out patch to do this just to see if somebody
> wants to work on something like this.
>
> It really would seem to make it very easy to set up any random build
> environment, and not have to remember it once it's done.
>
> There are probably better ways to do this, I normally try to avoid
> doing Makefile magic, since others have taken it over. Masahiro?


The patch would uglify the Makefile.

If git is not installed, $(shell git config ...)
will spit an error message, so '2>/dev/null' is needed.

Actually, I believe we should be able to build the kernel
from a source tarball without relying on git in any way.

In fact, we rely on git in some places, for example,
scripts/setlocalversion can add commit hash to the release
string, but I want to minimize the git-dependent code.








> Linus
>
> --
> You received this message because you are subscribed to the Google Groups "Clang Built Linux" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to clang-built-linux+unsubscribe@xxxxxxxxxxxxxxxx.
> To view this discussion on the web visit https://groups.google.com/d/msgid/clang-built-linux/CAHk-%3DwhS1zBU%3DuhDTk2M1LwkqG7AKLsR0_%2BXG%2BsaY_s2FHZr-A%40mail.gmail.com.



--
Best Regards
Masahiro Yamada