From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id BA73938418AA; Mon, 27 Jun 2022 10:47:47 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org BA73938418AA Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Tom de Vries To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Workaround unnecessary .s file with gfortran 4.8 X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 2043638bf9e8b7ea31b4cbf2c6f7299a3c27efb5 X-Git-Newrev: cdcec216b49a95e6692ab8c5de5693508ba19759 Message-Id: <20220627104747.BA73938418AA@sourceware.org> Date: Mon, 27 Jun 2022 10:47:47 +0000 (GMT) X-BeenThere: gdb-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gdb-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Jun 2022 10:47:47 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Dcdcec216b49a= 95e6692ab8c5de5693508ba19759 commit cdcec216b49a95e6692ab8c5de5693508ba19759 Author: Tom de Vries Date: Mon Jun 27 12:47:26 2022 +0200 [gdb/testsuite] Workaround unnecessary .s file with gfortran 4.8 =20 After running test-case gdb.fortran/namelist.exp with gfortran 4.8.5, I= 'm left with: ... $ git sti On branch master Your branch is up to date with 'origin/master'. =20 Untracked files: (use "git add ..." to include in what will be committed) gdb/testsuite/lib/compiler.s =20 nothing added to commit but untracked files present (use "git add" to t= rack) ... =20 We're running into PR gcc/60447, which was fixed in gcc 4.9.0. =20 Workaround this by first copying the source file to the temp dir, such = that the .s file is left there instead: ... $ ls build/gdb/testsuite/temp// compiler.c compiler.F90 compiler.s ... =20 Tested on x86_64-linux. Diff: --- gdb/testsuite/lib/gdb.exp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 141cb043fe2..a29b8f947c4 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -4137,6 +4137,12 @@ proc get_compiler_info {{language "c"}} { set cppout [read $file] close $file } else { + # Copy $ifile to temp dir, to work around PR gcc/60447. This will leave = the + # superfluous .s file in the temp dir instead of in the source dir. + set tofile [file tail $ifile] + set tofile [standard_temp_file $tofile] + file copy -force $ifile $tofile + set ifile $tofile set cppout [ gdb_compile "${ifile}" "" preprocess [list "$language" quiet= getting_compiler_info] ] } eval log_file $saved_log