public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Sasha Levin <sashal@kernel.org>
To: Nick Desaulniers <ndesaulniers@google.com>
Cc: Tony Battersby <tonyb@cybernetics.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable <stable@vger.kernel.org>,
	Miguel Ojeda <miguel.ojeda.sandonis@gmail.com>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Josh Poimboeuf <jpoimboe@redhat.com>,
	Andy Lutomirski <luto@amacapital.net>
Subject: Re: Regression: cannot compile kernel 4.14 with old gcc
Date: Fri, 28 Jun 2019 16:37:47 -0400	[thread overview]
Message-ID: <20190628203747.GH11506@sasha-vm> (raw)
In-Reply-To: <CAKwvOdncNyL27A8y0Cq-md1ub9r2RdzBcb7ZrmmmyqLBxKvSfQ@mail.gmail.com>

On Fri, Jun 28, 2019 at 09:42:21AM -0700, Nick Desaulniers wrote:
>On Fri, Jun 28, 2019 at 8:53 AM Tony Battersby <tonyb@cybernetics.com> wrote:
>>
>> Old versions of gcc cannot compile 4.14 since 4.14.113:
>>
>> ./include/asm-generic/fixmap.h:37: error: implicit declaration of function ‘__builtin_unreachable’
>>
>> The stable commit that caused the problem is 82017e26e515 ("compiler.h:
>> update definition of unreachable()") (upstream commit fe0640eb30b7).
>> Reverting the commit fixes the problem.
>>
>> Kernel 4.17 dropped support for older versions of gcc in upstream commit
>> cafa0010cd51 ("Raise the minimum required gcc version to 4.6").  This
>> was not backported to 4.14 since that would go against the stable kernel
>> rules.
>>
>> Upstream commit 815f0ddb346c ("include/linux/compiler*.h: make
>> compiler-*.h mutually exclusive") was a fix for cafa0010cd51.  This was
>> not backported to 4.14.
>>
>> Upstream commit fe0640eb30b7 ("compiler.h: update definition of
>> unreachable()") was a fix for 815f0ddb346c.  This is the commit that was
>> backported to 4.14.  But it only fixed a problem introduced in the other
>> commits, and without those commits, it ends up introducing a problem
>> instead of fixing one.  So I recommend reverting that patch in 4.14,
>> which will enable old gcc to compile 4.14 again.  If I understand
>> correctly, I believe that clang will still be able to compile 4.14 with
>> the patch reverted, although I haven't tried to compile with clang.
>>
>> The problematic commit is not present in 4.9.x, 4.4.x, 3.18.x, or 3.16.x.
>
>$ make CC=clang -j71 arch/x86/mm/fault.o
>produces no objtool warning with upstream commit fe0640eb30b7 reverted.
>
>x86 defconfig w/ Clang also have no issue with that reverted on 4.14.y.
>
>Revert away.
>
>Greg, Sasha,
>Do you need a patch file for that, or can you please push a
>$ cd linux-stable
>$ git checkout 4.14.y
>$ git revert 82017e26e51596ee577171a33f357377ec6513b5

You got it.

>-- 
>Thanks,
>~Nick Desaulniers

      reply	other threads:[~2019-06-28 20:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-28 15:53 Regression: cannot compile kernel 4.14 with old gcc Tony Battersby
2019-06-28 16:42 ` Nick Desaulniers
2019-06-28 20:37   ` Sasha Levin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190628203747.GH11506@sasha-vm \
    --to=sashal@kernel.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jpoimboe@redhat.com \
    --cc=luto@amacapital.net \
    --cc=miguel.ojeda.sandonis@gmail.com \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=stable@vger.kernel.org \
    --cc=tonyb@cybernetics.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox