On Tuesday 30 May 2017 14:11:14 Rich Freeman wrote:
> On Tue, May 30, 2017 at 1:50 PM, Mick <[email protected]> wrote:
> > On Tuesday 30 May 2017 13:08:39 Neil Bothwick wrote:
> >> On Tue, 30 May 2017 04:20:17 -0700 (PDT), Mick wrote:
> >> > > After gcc-config, make sure you run:
> >> > > # env-update
> >> > > # source /etc/profile
> >> > > 
> >> > > It looks like something still points to your old compiler.
> >> > 
> >> > Thanks Joost, I've rebooted many times since the move/rebuild of almost
> >> > everything with gcc-5.4.0.  Actually, now that you mention it ... I
> >> > can't recall if I rebuilt the linux-headers.  Hmm ... will look into
> >> > that next.
> >> 
> >> As you are rebuilding the kernel, it may be that you have parts still
> >> built with the old compiler. Try running make clean.
> > 
> > Yes!  That fixed my problem.  Thank you Neil and Joost.  :-)
> 
> This will go a lot slower if you're constantly rebuilding after
> tweaking options, but I direct my kernel builds to a tmpfs.
> 
> mkdir /var/tmp/linux
> make O=/var/tmp/linux oldconfig
> make O=/var/tmp/linux -j#
> make O=/var/tmp/linux modules_install
> make O=/var/tmp/linux install
> emerge @module-rebuild
> 
> This leaves your sources completely untouched - it will just be the
> clean git repo (or wherever you get your sources from).  Note that if
> you want to later build/upgrade any kernel modules you'll need to
> create /var/tmp/linux and run:
> make O=/var/tmp/linux modules_prepare
> 
> (This is because you don't just have all the needed files lying around
> all the time for when portage needs them.)
> 
> Also, you need to make sure your config file is in /boot or that
> /proc/config.gz support is enabled, because there won't be a
> /usr/src/linux/.config file lying around for when portage does kernel
> config checks.  It automatically falls back to the running kernel when
> this is missing.
> 
> From what I understand this is actually what the linux devs consider
> the preferred way to build kernels anyway.  Now, the downside is that
> if not much has changed make can't re-use anything.  The upside is
> that you always get a completely clean build, and since all the
> objects end up in a tmpfs it builds a lot faster (compared to a clean
> build on disk).  I switched over to this when my /usr/src moved to
> tmpfs to cut down on wear, and also because upstream actually
> recommends it.
> 
> But, aside from issues like the one you just ran into you won't really
> run into much trouble building the way most people seem to do it.

Thank you Rich, I don't usually have to tweak much my kernel options, except 
in new systems/hardware.  Nevertheless, this is a clever approach for testing 
out different configurations.  I'll keep this for future reference.  Thanks 
again!

-- 
Regards,
Mick

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to