From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 5EDCC386F82E; Mon, 8 Jun 2020 15:06:56 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5EDCC386F82E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1591628816; bh=6NdP34Q26EYPv9u48JsPuMP/cwhs8Skcx5lG+3Gk5RM=; h=From:To:Subject:Date:In-Reply-To:References:From; b=pXG8P44F7sK0BIyJtyr+3wX+vBD0XLM9RYfFvMf/kds2ip4stKdV7JOKi+glCV2Ag Jld1cwesNElDCHxsjsVkl+7Wpg3sJySccSQkZrjZ/WbkhOazzZQAA4Y7bTcOgEVuNa EfiHSGOUE0XULhFoYxBpMx2LJ11A5hnmj03q4GQA= From: "iains at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug testsuite/95577] Tcl error with testsuite/gcc.misc-tests/outputs.exp on darwin Date: Mon, 08 Jun 2020 15:06:56 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: testsuite X-Bugzilla-Version: 11.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: iains at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: 11.0 X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cf_reconfirmed_on everconfirmed bug_status cf_gcctarget cf_gcchost cf_gccbuild target_milestone Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Jun 2020 15:06:56 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D95577 Iain Sandoe changed: What |Removed |Added ---------------------------------------------------------------------------- Last reconfirmed| |2020-06-08 Ever confirmed|0 |1 Status|UNCONFIRMED |NEW Target|x86_64-apple-darwin* |*-*-darwin* Host|x86_64-apple-darwin* |*-*-darwin* Build|x86_64-apple-darwin* |*-*-darwin* Target Milestone|--- |11.0 --- Comment #1 from Iain Sandoe --- Darwin always separates debug info into a separate package (this is a direc= tory structure named exe.dSYM, for an exe name exe) [somewhat like split-dwarf, = but not optional or controlled by any command line flag] This output is produced by the debug linker (dsymutil) any time that there = is a debug option on the command line + a source file, for which the object woul= d be temporary. the failure mentioned occurs because the debug files are not being checked = for or deleted (and they are directory packages so that we need to use a suitab= le delete). this (first Part of the ) problem is fixed by the fragment below (Dominque's patch + a tweak from me). This then reveals a second issue - which is that the LTO tests are witten to assume that the target generates thin LTO objects by default (which is true= for Linux but not for Darwin).=20=20 The second problem can be catered for with a much longer patch which essentially repeats the LTO tests for targets with/without fat-lto-objects.= =20 This seems a bit clunky and maybe there can be a better solution (maybe the= re should also be a token test or two for linux using -ffat-lto-objects). ------ diff --git a/gcc/testsuite/gcc.misc-tests/outputs.exp b/gcc/testsuite/gcc.misc-tests/outputs.exp index 06a32dbeb9e..b3a1913f96c 100644 --- a/gcc/testsuite/gcc.misc-tests/outputs.exp +++ b/gcc/testsuite/gcc.misc-tests/outputs.exp @@ -43,6 +43,7 @@ if ![check_no_compiler_messages gsplitdwarf object { # Check for -flto support. We explicitly test the result to skip # tests that use -flto. set skip_lto ![check_effective_target_lto] +set target_lto_linker_plugin [check_linker_plugin_available] # Prepare additional options to be used for linking. # We do not compile to an executable, because that requires naming an outp= ut. @@ -105,8 +106,12 @@ proc outest { test sources opts dirs outputs } { } } set options "" + set saw_debug 0 foreach opt [split $opts " "] { append options " additional_flags=3D$opt" + if {[string match "-g*" "$opt"]} { + set saw_debug 1 + } } # Add linker flags if we're linking if {![string match "* -\[ESc\] *" " $opts "]} { @@ -143,6 +148,12 @@ proc outest { test sources opts dirs outputs } { if { [file exists $d$o] } then { pass "$test: $d$o" file delete $d$o + if { $saw_debug && [file exists $d$o.dSYM]} { + # Darwin split debug directory packages, expected for + # any case where debug is enabled for a single-file + # test. + file delete -force $d$o.dSYM + } } else { set ogl [glob -nocomplain -path $d -- $o] if { $ogl !=3D {} } {=