Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753594AbdCNCyh (ORCPT ); Mon, 13 Mar 2017 22:54:37 -0400 Received: from mail-pg0-f68.google.com ([74.125.83.68]:34196 "EHLO mail-pg0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752123AbdCNCyg (ORCPT ); Mon, 13 Mar 2017 22:54:36 -0400 Subject: Re: [RFC PATCH kernel] gcc-goto.sh: Allow to pass with CONFIG_DEBUG_INFO_SPLIT=y To: Jason Baron References: <20170303005105.19425-1-aik@ozlabs.ru> Cc: Michael Ellerman , linux-kernel@vger.kernel.org From: Alexey Kardashevskiy Message-ID: Date: Tue, 14 Mar 2017 13:54:30 +1100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <20170303005105.19425-1-aik@ozlabs.ru> Content-Type: text/plain; charset=koi8-r Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1409 Lines: 53 On 03/03/17 11:51, Alexey Kardashevskiy wrote: > With just CONFIG_DEBUG_INFO=y, the makefile adds "-g" to > KBUILD_CFLAGS/KBUILD_AFLAGS and the test passes. > > However, if CONFIG_DEBUG_INFO_SPLIT is also enabled, the makefile > adds "-gsplit-dwarf" instead which makes the test fail with $?==1 > because of objcopy trying to split the debug info: > > objcopy: Warning: '/dev/null' is not an ordinary file > > This changes the output to $(mktemp) which fixes the problem. > > I am pretty sure there better ways, this is just to demonstrate the bug. > > gcc 5.4.1, ppc64le (does not really matter). > > Cc: Jason Baron Ping? > Signed-off-by: Alexey Kardashevskiy > --- > scripts/gcc-goto.sh | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/scripts/gcc-goto.sh b/scripts/gcc-goto.sh > index c9469d34ecc6..ab21216ab68d 100755 > --- a/scripts/gcc-goto.sh > +++ b/scripts/gcc-goto.sh > @@ -2,7 +2,8 @@ > # Test for gcc 'asm goto' support > # Copyright (C) 2010, Jason Baron > > -cat << "END" | $@ -x c - -c -o /dev/null >/dev/null 2>&1 && echo "y" > +TMPOUT=$(mktemp) > +cat << "END" | $@ -x c - -c -o $TMPOUT >/dev/null 2>&1 && echo "y" > int main(void) > { > #if defined(__arm__) || defined(__aarch64__) > @@ -19,3 +20,5 @@ entry: > return 0; > } > END > + > +rm $TMPOUT 2>/dev/null 2>&1 > -- Alexey