Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1220380
| From | Sedat Dilek <sedat.dilek@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: Use (two) different compilers at build-time? |
| Date | 2015-09-07 22:40 +0200 |
| Message-ID | <q6bmO-7UI-13@gated-at.bofh.it> (permalink) |
| References | <q6a7o-6db-19@gated-at.bofh.it> <q6b3s-7yq-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Sep 7, 2015 at 10:15 PM, Linus Torvalds <torvalds@linux-foundation.org> wrote: > On Mon, Sep 7, 2015 at 12:12 PM, Sedat Dilek <sedat.dilek@gmail.com> 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. > OK. 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 - -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Use (two) different compilers at build-time? Sedat Dilek <sedat.dilek@gmail.com> - 2015-09-07 21:20 +0200
Re: Use (two) different compilers at build-time? Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-07 22:20 +0200
Re: Use (two) different compilers at build-time? Sedat Dilek <sedat.dilek@gmail.com> - 2015-09-07 22:40 +0200
Re: Use (two) different compilers at build-time? Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-07 22:50 +0200
Re: Use (two) different compilers at build-time? Linus Torvalds <torvalds@linux-foundation.org> - 2015-09-07 23:00 +0200
Re: Use (two) different compilers at build-time? Sedat Dilek <sedat.dilek@gmail.com> - 2015-09-07 23:30 +0200
Re: Use (two) different compilers at build-time? Sedat Dilek <sedat.dilek@gmail.com> - 2015-09-08 00:40 +0200
Re: Use (two) different compilers at build-time? Sedat Dilek <sedat.dilek@gmail.com> - 2015-09-08 07:50 +0200
Re: Use (two) different compilers at build-time? Sedat Dilek <sedat.dilek@gmail.com> - 2015-09-08 08:00 +0200
Re: Use (two) different compilers at build-time? Sedat Dilek <sedat.dilek@gmail.com> - 2015-09-07 23:00 +0200
Re: Use (two) different compilers at build-time? Fengguang Wu <fengguang.wu@intel.com> - 2015-09-10 02:30 +0200
Re: Use (two) different compilers at build-time? Sedat Dilek <sedat.dilek@gmail.com> - 2015-09-13 17:30 +0200
Re: Use (two) different compilers at build-time? Fengguang Wu <fengguang.wu@intel.com> - 2015-09-14 04:20 +0200
csiph-web