From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1030211AbbCMSGv (ORCPT ); Fri, 13 Mar 2015 14:06:51 -0400 Received: from lists.s-osg.org ([54.187.51.154]:40355 "EHLO lists.s-osg.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753335AbbCMSGs (ORCPT ); Fri, 13 Mar 2015 14:06:48 -0400 Message-ID: <55032736.9010907@osg.samsung.com> Date: Fri, 13 Mar 2015 12:06:46 -0600 From: Shuah Khan Organization: Samsung Open Source Group User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.5.0 MIME-Version: 1.0 To: Michael Ellerman CC: linux-kernel@vger.kernel.org, davej@codemonkey.org.uk, mmarek@suse.cz, linux-api@vger.kernel.org Subject: Re: [PATCH v4 2/9] kbuild: Don't pass LDFLAGS to selftest Makefile References: <1426046765-19289-1-git-send-email-mpe@ellerman.id.au> <1426046765-19289-2-git-send-email-mpe@ellerman.id.au> In-Reply-To: <1426046765-19289-2-git-send-email-mpe@ellerman.id.au> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 03/10/2015 10:05 PM, Michael Ellerman wrote: > The makefile in arch/x86/Makefile.um sets LDFLAGS and exports it, which > is then propagated to the selftest Makefiles and leads to build errors > there. The build errors occur because we are passing LDFLAGS to CC, but > the option set in Makefile.um (-m elf_x86_64) is not understood by CC. > We could fix that by using -Wl, but that might break the UM build if > it's actually passing that option to LD directly. > > We don't actually want the LDFLAGS from kbuild in the selftest Makefile, > so the simplest fix seems to be to clear LDFLAGS before invoking the > selftest Makefile. > > Signed-off-by: Michael Ellerman > --- > Makefile | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/Makefile b/Makefile > index 0836e9d628f0..5cef1d4c2ea0 100644 > --- a/Makefile > +++ b/Makefile > @@ -1085,7 +1085,7 @@ headers_check: headers_install > > PHONY += kselftest > kselftest: > - $(Q)$(MAKE) -C tools/testing/selftests MAKEFLAGS="$(filter-out rR,$(MAKEFLAGS))" run_tests > + $(Q)$(MAKE) LDFLAGS= -C tools/testing/selftests MAKEFLAGS="$(filter-out rR,$(MAKEFLAGS))" run_tests > > # --------------------------------------------------------------------------- > # Modules > Thanks for finding the problem and fix. I want to handle this in the selftests/Makefile level instead. I have a patch ready to send out for review. thanks, -- Shuah -- Shuah Khan Sr. Linux Kernel Developer Open Source Innovation Group Samsung Research America (Silicon Valley) shuahkh@osg.samsung.com | (970) 217-8978