[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKwvOd=5AG1ARw6JUXmkuiftuShuYHKLk0ZnueuLhvOdMr5dOA@mail.gmail.com>
Date: Mon, 30 Mar 2020 11:58:19 -0700
From: Nick Desaulniers <ndesaulniers@...gle.com>
To: Masahiro Yamada <masahiroy@...nel.org>
Cc: Nathan Chancellor <natechancellor@...il.com>,
clang-built-linux <clang-built-linux@...glegroups.com>,
Linux Kbuild mailing list <linux-kbuild@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Sandeep Patil <sspatil@...gle.com>
Subject: Re: [PATCH v2] Makefile.llvm: simplify LLVM build
On Sat, Mar 28, 2020 at 6:57 PM Masahiro Yamada <masahiroy@...nel.org> wrote:
>
> I also had planned to provide a single switch to change
> all the tool defaults to LLVM.
>
> So, supporting 'LLVM' is fine, but I'd rather want this
> look symmetrical, and easy to understand.
>
> CPP = $(CC) -E
> ifneq ($(LLVM),)
Yes, a simple if statement is much simpler than the overly complex patch I had.
> CC = $(LLVM_DIR)clang
Do we need $LLVM_DIR? Shouldn't users just have that in their $PATH?
Also, I think we need to support suffixed binaries, as debian
distributes these with version suffixes, as Nathan points out. Or do
the debian packages install suffixed binaries AND path versioned
non-suffixed binaries?
> LD = $(LLVM_DIR)ld.lld
> AR = $(LLVM_DIR)llvm-ar
> NM = $(LLVM_DIR)llvm-nm
> OBJCOPY = $(LLVM_DIR)llvm-objcopy
> OBJDUMP = $(LLVM_DIR)llvm-objdump
> READELF = $(LLVM_DIR)llvm-readelf
> OBJSIZE = $(LLVM_DIR)llvm-size
> STRIP = $(LLVM_DIR)llvm-strip
> else
> CC = $(CROSS_COMPILE)gcc
> LD = $(CROSS_COMPILE)ld
> AR = $(CROSS_COMPILE)ar
> NM = $(CROSS_COMPILE)nm
> OBJCOPY = $(CROSS_COMPILE)objcopy
> OBJDUMP = $(CROSS_COMPILE)objdump
> READELF = $(CROSS_COMPILE)readelf
> OBJSIZE = $(CROSS_COMPILE)size
> STRIP = $(CROSS_COMPILE)strip
> endif
>
>
>
> I attached two patches.
> Comments appreciated.
I'm not sure the second one that recommends changing cc/c++ is the way
to go; I think it might harm hermeticity.
> If you are so addicted to LLVM
Lol, maybe?
--
Thanks,
~Nick Desaulniers
Powered by blists - more mailing lists