Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755210AbcLBWlj (ORCPT ); Fri, 2 Dec 2016 17:41:39 -0500 Received: from mx1.redhat.com ([209.132.183.28]:50578 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753844AbcLBWlh (ORCPT ); Fri, 2 Dec 2016 17:41:37 -0500 Subject: Re: Odd build breakage in 4.9-rc7 To: Nicolas Pitre , Paul Bolle References: <20161130172435.GG8563@redhat.com> <1480539150.27962.11.camel@tiscali.nl> <942ca543-de49-abda-7e3b-a8a31c0c2c88@redhat.com> <222b47f2-55e0-3410-c87d-183ca5e2a0fe@redhat.com> <1480542127.27962.17.camel@tiscali.nl> <1480543047.27962.23.camel@tiscali.nl> <4330d00e-ed4f-35fe-586e-f3d5dd6db875@redhat.com> <1480582887.27962.48.camel@tiscali.nl> <1480599966.19457.4.camel@tiscali.nl> <1480623331.22912.3.camel@tiscali.nl> Cc: Tony Luck , Linus Torvalds , Prarit Bhargava , linux-kernel@vger.kernel.org From: Jarod Wilson Message-ID: <6276dd2d-b2da-67a5-96b2-0a1b5d1be8a2@redhat.com> Date: Fri, 2 Dec 2016 17:41:33 -0500 User-Agent: Mutt/1.5.21 (2010-09-15) MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Fri, 02 Dec 2016 22:41:37 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1369 Lines: 39 On 2016-12-02 3:11 PM, Nicolas Pitre wrote: > On Thu, 1 Dec 2016, Paul Bolle wrote: > >> On Thu, 2016-12-01 at 12:42 -0500, Nicolas Pitre wrote: >>> OK I understand what the problem is. However most of those hunks below >>> are definitely wrong. ;-) >> >> Probably. By now I've narrowed it down to just these two hunks: > > And they're both wrong. ;-) There is no relation between MODVERSIONS and > TRIM_UNUSED_KSYMS. > >>> I'm trying to determine the best way to fix it. Stay tuned. >> >> Will do. I'm curious to see what a proper fix might look like. > > Here it is: > > ----- >8 > Subject: kbuild: fix building bzImage with CONFIG_TRIM_UNUSED_KSYMS enabled > > When building a specific target such as bzImage, modules aren't normally > built. However if CONFIG_TRIM_UNUSED_KSYMS is enabled, no built modules > means none of the exported symbols are used and therefore they will all > be trimmed away from the final kernel. A subsequent "make modules" will > fail because modpost cannot find the needed symbols for those modules in > the kernel binary. > > Let's make sure modules are also built whenever CONFIG_TRIM_UNUSED_KSYMS > is enabled and that the kernel binary is properly rebuilt accordingly. For my previously failing case, things behave again with this patch. Thanks much! Tested-by: Jarod Wilson -- Jarod Wilson jarod@redhat.com