From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10153 invoked by alias); 23 Mar 2011 18:21:33 -0000 Received: (qmail 10142 invoked by uid 22791); 23 Mar 2011 18:21:31 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from mail-fx0-f41.google.com (HELO mail-fx0-f41.google.com) (209.85.161.41) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Mar 2011 18:21:25 +0000 Received: by fxm18 with SMTP id 18so8902839fxm.0 for ; Wed, 23 Mar 2011 11:21:23 -0700 (PDT) Received: by 10.223.94.129 with SMTP id z1mr5691356fam.144.1300904425123; Wed, 23 Mar 2011 11:20:25 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.5.15 with HTTP; Wed, 23 Mar 2011 11:20:05 -0700 (PDT) In-Reply-To: <20110323164236.GA21315@adacore.com> References: <1300057848-2316-1-git-send-email-vapier@gentoo.org> <1300136769-5921-1-git-send-email-vapier@gentoo.org> <20110323164236.GA21315@adacore.com> From: Mike Frysinger Date: Wed, 23 Mar 2011 18:50:00 -0000 Message-ID: Subject: Re: [PATCH] sim: tests: support .S/.c files To: Joel Brobecker Cc: gdb-patches@sourceware.org, toolchain-devel@blackfin.uclinux.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes 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/msg01039.txt.bz2 On Wed, Mar 23, 2011 at 12:42 PM, Joel Brobecker wrote: >> - =A0 =A0 set comp_output [target_assemble $sourcefile ${name}.o "$as_op= tions $global_as_options"] >> - >> - =A0 =A0 if ![string match "" $comp_output] { >> - =A0 =A0 =A0 =A0 verbose -log "$comp_output" 3 >> - =A0 =A0 =A0 =A0 fail "$mach $testname (assembling)" >> - =A0 =A0 =A0 =A0 continue >> - =A0 =A0 } >> + =A0 =A0 regsub {(^ *| +)([^ ]+)} "$as_options $global_as_options" { -W= a,\2} c_as_options >> >> =A0 =A0 =A0 if ![info exists opts(ld,$mach)] { >> =A0 =A0 =A0 =A0 =A0 set opts(ld,$mach) $opts(ld) >> =A0 =A0 =A0 } >> + =A0 =A0 regsub {(^ *| +)([^ ]+)} "$opts(ld,$mach) $global_ld_options" = { -Wl,\2} c_ld_options >> + >> + =A0 =A0 if ![info exists opts(cc,$mach)] { >> + =A0 =A0 =A0 =A0 set opts(cc,$mach) $opts(cc) >> + =A0 =A0 } >> + >> + =A0 =A0 if [string match "*.c" $sourcefile] { >> + =A0 =A0 =A0 =A0 set comp_output [target_compile $sourcefile ${name}.x = "executable" \ >> + =A0 =A0 =A0 =A0 =A0 =A0 [list "incdir=3D$srcdir/$subdir" "additional_f= lags=3D$c_as_options $c_ld_options $opts(cc,$mach) $global_cc_options"]] >> + =A0 =A0 =A0 =A0 set method "compiling/linking" >> + =A0 =A0 } else { >> + =A0 =A0 =A0 =A0 if [string match "*.S" $sourcefile] { >> + =A0 =A0 =A0 =A0 =A0 =A0 set comp_output [target_compile $sourcefile ${= name}.o "object" \ >> + =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 [list "incdir=3D$srcdir/$subdir" "addi= tional_flags=3D$c_as_options"]] >> + =A0 =A0 =A0 =A0 =A0 =A0 set method "compiling" >> + =A0 =A0 =A0 =A0 } else { >> + =A0 =A0 =A0 =A0 =A0 =A0 set comp_output [target_assemble $sourcefile $= {name}.o "$as_options $global_as_options"] >> + =A0 =A0 =A0 =A0 =A0 =A0 set method "assembling" >> + =A0 =A0 =A0 =A0 } >> + >> + =A0 =A0 =A0 =A0 if ![string match "" $comp_output] { >> + =A0 =A0 =A0 =A0 =A0 =A0 verbose -log "$comp_output" 3 >> + =A0 =A0 =A0 =A0 =A0 =A0 fail "$mach $testname (${method})" >> + =A0 =A0 =A0 =A0 =A0 =A0 continue >> + =A0 =A0 =A0 =A0 } > > 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? i dont think so ... actual build failures would still be caught we would try to run it. i'll see if link time warnings cause a problem. there should at least be a comment in here if the behavior is intended. -mike