From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 9FD793858D38; Sat, 5 Nov 2022 14:06:17 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 9FD793858D38 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1667657177; bh=gSMaYlgpQ5X5Xd7etQYCY2vo/HucHJfRyQza3Q5q1SA=; h=From:To:Subject:Date:In-Reply-To:References:From; b=ZgWiGHfvOjZmKXrBjBPMvDr8ekuUcT8PrHXMscXds1gfP1jqXr2r47TX0hxhB7dZk VeH4bsm4IXB2IbL9DQ0q1zt4+xe5FkK/leyDNcK9RpMByuo53rN9DO12pKTC4yqIJJ lHvwHwNeukZ/IBghM2kAKRdOwgc/SwOYOdAX7S80= From: "vries at gcc dot gnu.org" To: gdb-prs@sourceware.org Subject: [Bug testsuite/16947] Fail to compile test case when board file local-remote-host.exp is used Date: Sat, 05 Nov 2022 14:06:17 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gdb X-Bugzilla-Component: testsuite X-Bugzilla-Version: HEAD X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: vries at gcc dot gnu.org X-Bugzilla-Status: NEW X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 List-Id: https://sourceware.org/bugzilla/show_bug.cgi?id=3D16947 --- Comment #4 from Tom de Vries --- (In reply to Tom de Vries from comment #2) > But ultimately, we run into the same problem with '$ORIGIN' in gdb_compil= e, > and this: > ... > if { [is_remote host] } { > lappend new_options "ldflags=3D-Wl,-rpath,\\\\\$ORIGIN" > } else { > lappend new_options "ldflags=3D-Wl,-rpath,\\\$ORIGIN" > } > ... > seems to be the only fix available. And this is a way to fix this at board level: ... diff --git a/gdb/testsuite/boards/local-remote-host.exp b/gdb/testsuite/boards/local-remote -host.exp index fc87dd48014..36f152b8749 100644 --- a/gdb/testsuite/boards/local-remote-host.exp +++ b/gdb/testsuite/boards/local-remote-host.exp @@ -68,4 +68,10 @@ proc ${board}_spawn { board cmd } { return $spawn_id } +proc ${board}_exec { boardname program pargs inp outp } { + set program [regsub -all {"} $program {\\\\"}] + set program [regsub -all {\\\$} $program {\\\\$}] + return [rsh_exec $boardname $program $pargs $inp $outp] +} + set GDBFLAGS "${GDBFLAGS} -iex \"set style enabled off\"" ... This makes gdb.base/print-file-var.exp pass, which uses both $ORIGIN and SHLIB_NAME. --=20 You are receiving this mail because: You are on the CC list for the bug.=