Re: Linux 4.19 and GCC 9
From: Ignat Korchagin
Date: Mon Jun 10 2019 - 11:06:34 EST
On Mon, Jun 10, 2019 at 3:49 PM Greg KH <gregkh@xxxxxxxxxxxxxxxxxxx> wrote:
>
> >
> > I typically compile a bare-bones GCC for those things, it is quite quick.
>
> Pointers to how to do that is appreciated. It's been years since I had
> to build gcc "from scratch".
This is how we do it, but we use it for some other projects as well,
so need ligcc and c++ support. I suspect for kernel-only there may be
a more lightweight approach (for example, by dropping c++):
Env: Debian Stretch (we run in a simple official docker container with
build-essential and make installed) - but probably should work on any
distro
Assuming the sources are extracted into $(BUILDDIR)/gcc-$(VERSION)
cd $(BUILDDIR)/gcc-$(VERSION)
./contrib/download_prerequisites
cd ..
mkdir gcc-build
cd gcc-build
../gcc-$(VERSION)/configure --enable-languages=c,c++
--build=x86_64-linux-gnu --disable-multilib
make -j<something>
sudo make install (or install into alternative dir and point Linux
build system there)
Regards,
Ignat