Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753954AbbETOzT (ORCPT ); Wed, 20 May 2015 10:55:19 -0400 Received: from mail-wg0-f50.google.com ([74.125.82.50]:36429 "EHLO mail-wg0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753297AbbETOzL (ORCPT ); Wed, 20 May 2015 10:55:11 -0400 Date: Wed, 20 May 2015 16:55:06 +0200 From: Ingo Molnar To: Arnaldo Carvalho de Melo Cc: Martin =?utf-8?B?TGnFoWth?= , linux-kernel@vger.kernel.org, Ingo Molnar , Paul Mackerras , Peter Zijlstra Subject: Re: [PATCH] perf: fix wrong DEBUG configuration Message-ID: <20150520145506.GA15679@gmail.com> References: <555B3D6F.6000301@suse.cz> <20150519140422.GJ13946@kernel.org> <555C871B.90900@suse.cz> <20150520131748.GC2955@kernel.org> <555C8C41.1080608@suse.cz> <20150520135333.GE2955@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20150520135333.GE2955@kernel.org> 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 Content-Length: 1349 Lines: 39 * Arnaldo Carvalho de Melo wrote: > Em Wed, May 20, 2015 at 03:29:37PM +0200, Martin Liška escreveu: > > On 05/20/2015 03:17 PM, Arnaldo Carvalho de Melo wrote: > > >Em Wed, May 20, 2015 at 03:07:39PM +0200, Martin Liška escreveu: > > >>Currently, GCC optimizes -O6 same as -O3 level. Right optimize debugging > > >>experience is given by passing -Og to compiler. > > > >Is this is this -Og available in old gcc versions? When was it > > >introduced? Do you know? > > > GCC 4.8.0 is the first version capable of the option: https://gcc.gnu.org/gcc-4.8/changes.html. > > That can be problematic, which GCC version do you support in linux/perf? > > So the rule has been: What are the kernel requirements for the > toolchain? tools/perf/ should build with that. So we could use -Og if it works, like Kbuild does it: KBUILD_CFLAGS += $(call cc-option,-mno-fp-ret-in-387) the 'cc-option' Make function does some magic of silently calling GCC with that option and observing the result. See: scripts/Kbuild.include:cc-option = $(call try-run,\ et al. Thanks, Ingo -- 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/