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