From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752104AbaBWV4L (ORCPT ); Sun, 23 Feb 2014 16:56:11 -0500 Received: from relay6-d.mail.gandi.net ([217.70.183.198]:35765 "EHLO relay6-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751740AbaBWV4J (ORCPT ); Sun, 23 Feb 2014 16:56:09 -0500 X-Originating-IP: 50.43.14.201 Date: Sun, 23 Feb 2014 13:55:52 -0800 From: Josh Triplett To: "H. Peter Anvin" Cc: Borislav Petkov , Andrew Morton , Andi Kleen , Feng Tang , Ingo Molnar , Jacob Shin , Jan Beulich , Jussi Kivilinna , "Kirill A. Shutemov" , Paul Gortmaker , Peter Zijlstra , "Rafael J. Wysocki" , Rob Landley , Seiji Aguchi , Stephane Eranian , Suravee Suthikulpanit , Thomas Gleixner , linux-kernel@vger.kernel.org, x86@kernel.org Subject: Re: [PATCH v2 2/2] x86: Support compiling out human-friendly processor feature names Message-ID: <20140223215552.GB14411@thin> References: <296de15c8addece6dada4ddac982b3934d8ff6fa.1393096111.git.josh@joshtriplett.org> <4bdaeab748d3b51ef24576ca030b5eb80455aff8.1393098813.git.josh@joshtriplett.org> <20140222204936.GA2534@pd.tnic> <20140222210038.GA19867@thin> <1b6550ce-40bd-4fc4-a3e4-37997da17973@email.android.com> <20140222213640.GA3409@thin> <530A3668.2090902@zytor.com> <20140223213252.GA14411@thin> <530A6BB4.2070407@zytor.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <530A6BB4.2070407@zytor.com> User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Feb 23, 2014 at 01:44:20PM -0800, H. Peter Anvin wrote: > On 02/23/2014 01:32 PM, Josh Triplett wrote: > > > > Because, in order to un-break the build, v3 wraps an ifdef around that > > dependency, to prevent building cpustr.h. Otherwise, the rule for > > cpustr.h tries and fails to build mkcpustr. > > > > Why did it fail to build mkcpustr? It would seem that mkcpustr is or at > least ought to be completely agnostic to any of these options. > > The extra build machinery here seems completely pointless. > > I agree that the #ifdef isn't a big deal, but all this extra machinery > really indicates something is odd. > > Oh, and of course, looking at the v2 patchset, the problem is the ifdef > around the mkcapflags shell script which really shouldn't be necessary. > We may have to add a rule to force capflags.c to be built even if > capflags.o is not requested, but that is fine. > > That will cut down on the Makefile hacks considerably, and will avoid > this problem completely. Why have the build system waste time building several things that won't be used? It seems like the Makefiles are exactly where we *should* have the ifdef machinery, rather than in source. I'd happily add another ifdef in the Makefile rule that builds cpustr.h, to generate a stub cpustr.h header, and then remove one more ifdef in the source. - Josh Triplett