Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S934715AbaGXUpq (ORCPT ); Thu, 24 Jul 2014 16:45:46 -0400 Received: from asavdk4.altibox.net ([109.247.116.15]:48591 "EHLO asavdk4.altibox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934176AbaGXUpp (ORCPT ); Thu, 24 Jul 2014 16:45:45 -0400 Date: Thu, 24 Jul 2014 22:45:26 +0200 From: Sam Ravnborg To: Ard Biesheuvel Cc: Andreas Schwab , "linux-arm-kernel@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] arm64/crypto: fix makefile rule for aes-glue-%.o Message-ID: <20140724204526.GA11754@ravnborg.org> References: <20140724161225.GA11204@ravnborg.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 24, 2014 at 09:25:13PM +0200, Ard Biesheuvel wrote: > On 24 July 2014 18:12, Sam Ravnborg wrote: > > On Thu, Jul 24, 2014 at 04:24:48PM +0200, Ard Biesheuvel wrote: > >> On 24 July 2014 16:18, Ard Biesheuvel wrote: > >> > On 24 July 2014 15:40, Andreas Schwab wrote: > >> >> Ard Biesheuvel writes: > >> >> > >> >>> On 24 July 2014 15:26, Andreas Schwab wrote: > >> >>>> You are not using CONFIG_MODVERSIONS. > >> >>>> > >> >>> > >> >>> I am > >> >> > >> >> No, you aren't, since you say that your .cmd contains a command to > >> >> create aes-glue-ce.o, which with CONFIG_MODVERSIONS it doesn't. > >> >> > >> > > >> > OK, you're right, it contains a command to create .tmp_aes-glue-ce.o. > >> > But I am still not seeing the error you are seeing, strangely enough. > >> > >> OK, now I am seeing it. > >> > >> Acked-by: Ard Biesheuvel > > > > Jumping in the end of the thread here - sorry for that. > > > > No worries > > > Another way to solve this would be to create two > > small wrapper files: > > aes-glue-neon.c - which include aes-glue.c > > aes-glue-ce.c that include aes-glue.c > > > > Then you could use standard kbuild support for building your module. > > And we will not potentially break it when we change cc_o_c in the near future. > > > > I see how that would fix this issue, but frankly, if we need to add .c > files that only #include other .c files to support building multiple > objects from a single .c file, I think the flaw is in the build > system, and I would rather fix the build system instead. The kbuild syntax could be extended to allow building multiple .o files from a single .c file. But the need for this feature is so seldom that people would not recognize the syntax most likely. Btw. the current solution is already faulty - even with the fix. There are no support for make C=2 arch/.../crypto/ Therefore - for now the correct fix is to use two wrapper .c files, and accept this. It will not have the C=2 problem above. Sam -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/