From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20728 invoked by alias); 23 Mar 2011 16:42:55 -0000 Received: (qmail 20618 invoked by uid 22791); 23 Mar 2011 16:42:53 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Mar 2011 16:42:48 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id EB9232BAE84; Wed, 23 Mar 2011 12:42:47 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id nHBOtwzjzhgj; Wed, 23 Mar 2011 12:42:47 -0400 (EDT) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id BDB652BADDE; Wed, 23 Mar 2011 12:42:47 -0400 (EDT) Received: by joel.gnat.com (Postfix, from userid 1000) id 82C141459AD; Wed, 23 Mar 2011 09:42:36 -0700 (PDT) Date: Wed, 23 Mar 2011 17:02:00 -0000 From: Joel Brobecker To: Mike Frysinger Cc: gdb-patches@sourceware.org, toolchain-devel@blackfin.uclinux.org Subject: Re: [PATCH] sim: tests: support .S/.c files Message-ID: <20110323164236.GA21315@adacore.com> References: <1300057848-2316-1-git-send-email-vapier@gentoo.org> <1300136769-5921-1-git-send-email-vapier@gentoo.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1300136769-5921-1-git-send-email-vapier@gentoo.org> User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2011-03/txt/msg01032.txt.bz2 > 2011-03-14 Mike Frysinger > > * sim-defs.exp: Support cc tag in test files. > (run_sim_test): Support global_cc_options in boards files. Convert > assembler options into compiler options (c_as_options) with -Wa. > Convert linker options into compiler options (c_ld_options) with -Wl. > Compile .c and .S files into .x programs. Sorry for the delay in reviewing. > - set comp_output [target_assemble $sourcefile ${name}.o "$as_options $global_as_options"] > - > - if ![string match "" $comp_output] { > - verbose -log "$comp_output" 3 > - fail "$mach $testname (assembling)" > - continue > - } > + regsub {(^ *| +)([^ ]+)} "$as_options $global_as_options" { -Wa,\2} c_as_options > > if ![info exists opts(ld,$mach)] { > set opts(ld,$mach) $opts(ld) > } > + regsub {(^ *| +)([^ ]+)} "$opts(ld,$mach) $global_ld_options" { -Wl,\2} c_ld_options > + > + if ![info exists opts(cc,$mach)] { > + set opts(cc,$mach) $opts(cc) > + } > + > + if [string match "*.c" $sourcefile] { > + set comp_output [target_compile $sourcefile ${name}.x "executable" \ > + [list "incdir=$srcdir/$subdir" "additional_flags=$c_as_options $c_ld_options $opts(cc,$mach) $global_cc_options"]] > + set method "compiling/linking" > + } else { > + if [string match "*.S" $sourcefile] { > + set comp_output [target_compile $sourcefile ${name}.o "object" \ > + [list "incdir=$srcdir/$subdir" "additional_flags=$c_as_options"]] > + set method "compiling" > + } else { > + set comp_output [target_assemble $sourcefile ${name}.o "$as_options $global_as_options"] > + set method "assembling" > + } > + > + if ![string match "" $comp_output] { > + verbose -log "$comp_output" 3 > + fail "$mach $testname (${method})" > + continue > + } It looks like you are not checking the output from the compilation of .c files, while you kept that check for all other files. Is that intentional? -- Joel