From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756901AbbEVNuc (ORCPT ); Fri, 22 May 2015 09:50:32 -0400 Received: from cantor2.suse.de ([195.135.220.15]:37495 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756553AbbEVNub (ORCPT ); Fri, 22 May 2015 09:50:31 -0400 Message-ID: <555F3423.20104@suse.cz> Date: Fri, 22 May 2015 15:50:27 +0200 From: =?UTF-8?B?TWFydGluIExpxaFrYQ==?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Ingo Molnar , Arnaldo Carvalho de Melo CC: linux-kernel@vger.kernel.org, Ingo Molnar , Paul Mackerras , Peter Zijlstra Subject: Re: [PATCH] perf: fix wrong DEBUG configuration 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> <20150520145506.GA15679@gmail.com> <555CB373.7090007@suse.cz> <20150521150536.GB13933@kernel.org> <20150522070250.GA30715@gmail.com> In-Reply-To: <20150522070250.GA30715@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/22/2015 09:02 AM, Ingo Molnar wrote: > > * Arnaldo Carvalho de Melo wrote: > >> Em Wed, May 20, 2015 at 06:16:51PM +0200, Martin Liška escreveu: >>> On 05/20/2015 04:55 PM, Ingo Molnar wrote: >>>> * Arnaldo Carvalho de Melo wrote: >>>>> 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,\ >> >>> I am sorry, I did mistake in understanding of DEBUG variable. >>> Following patch should be fixed, except missing auto-detection >>> of -Og option. >>> >>> Unfortunately, following hunk does not work, no -Ox is added to CFLAGS? >>> >>> -- CFLAGS += -Og >>> ++ CFLAGS += $(call cc-option,-Og,-O0) >> >> I don't know if we have this cc-option, perhaps Ingo is suggesting >> we get it in tools/build/? Or include scripts/Kbuild.include and >> then use it? >> >> I.e. we have checks to see if we can use, for instance >> -fstack-protector-all, see tools/build/feature/Makefile, using this >> cc-option thing, importing it from Kbuild would solve the issue at >> hand in a definitive way and in line with what we have been >> pursuing: to make the tools/ build system be based on Kbuild. > > So I'd suggest copying any necessary functions instead of outright > including all of Kbuild in the tooling build system which creates > non-trivial dependencies that is not necessarily tested as thoroughly > on the kbuild side as on the tooling side. > > Thanks, > > Ingo > May I ask you Ingo for helping with that? It would be easy to test if you grab my patch and add necessary bash functions. Thank you, Martin