[lkml]   [2015]   [Sep]   [7]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: Use (two) different compilers at build-time?
On Mon, Sep 7, 2015 at 10:15 PM, Linus Torvalds
<> wrote:
> On Mon, Sep 7, 2015 at 12:12 PM, Sedat Dilek <> wrote:
>> is it possible to use a different compiler at build-time?
>> I have here a problem with mm/percpu.c and wanted to build everything
>> with LLVM/Clang but this single file with GCC.
>> Is that possible?
> It should work fine. It's occasionally how people bisect compiler bugs
> in the kernel (although then it's usually just two different versions
> of the same compiler), and I think people have done that with llvm
> too. After all, llvm object files link to gcc-produced object files in
> user space (ie libraries are most often compiled with different
> compilers).
> So no _guarantees_ (especially since the kernel sometimes does odd
> things), but there's no overwhelming reason it shouldn't work, and
> there are several reasons it should be fine.


So, how do I do that conveniently?

In case of percpu.o - hack in the mm/Makefile?

So, I have a percpu.o compiled with clang in my build-dir and want to
recompile just that single file with gcc and create a new bzImage.

Hope I could explain it more exactly.

- Sedat -

 \ /
  Last update: 2015-09-07 22:41    [W:0.078 / U:2.904 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site