From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2205) id 7F15A3858D20; Thu, 28 Mar 2024 05:52:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 7F15A3858D20 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1711605121; bh=GQPVA+EHDh3U3fDKC2FlVp/8HY1CBtqdHFiucwCQo4U=; h=From:To:Subject:Date:From; b=DQhojbUx0qs6la9+yPoQM3ngq/7V1/4kE9hbH/EJEecsweqxvuUGJ1NIFPd5iSJXT rQi7z7Xe563ZEx/sRxWoDtlzlZdG7Mfq7gCMeplHG5oEXWnpKwS7W1ml0A5+ZQ8OST c4AiOw1W7fmlx7cHMgyAbg+upk0RZ/QBHYS455DM= 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] Add missing include in gdb.base/rtld-step.exp X-Act-Checkin: binutils-gdb X-Git-Author: Tom de Vries X-Git-Refname: refs/heads/master X-Git-Oldrev: 8e60ff82b8e1f72fdf5863a30bd14837ce2440b7 X-Git-Newrev: 6ccf769a1790b90a85e0b4912a42117eb7c1e108 Message-Id: <20240328055201.7F15A3858D20@sourceware.org> Date: Thu, 28 Mar 2024 05:52:01 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3D6ccf769a1790= b90a85e0b4912a42117eb7c1e108 commit 6ccf769a1790b90a85e0b4912a42117eb7c1e108 Author: Tom de Vries Date: Thu Mar 28 06:51:59 2024 +0100 [gdb/testsuite] Add missing include in gdb.base/rtld-step.exp =20 On fedora rawhide, with test-case gdb.base/rtld-step.exp I get: ... static-pie-static-libc.c: In function '_start':^M static-pie-static-libc.c:1:22: error: \ implicit declaration of function '_exit' [-Wimplicit-function-declara= tion]^M 1 | void _start (void) { _exit (0); }^M | ^~~~~^M compiler exited with status 1 ... UNTESTED: gdb.base/rtld-step.exp: failed to compile \ (-static-pie not supported or static libc missing) ... =20 Fix this by adding the missing include. =20 Tested on aarch64-linux. =20 Approved-by: Kevin Buettner Diff: --- gdb/testsuite/gdb.base/rtld-step.exp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/gdb.base/rtld-step.exp b/gdb/testsuite/gdb.base/= rtld-step.exp index 53725833aa1..198542886cc 100644 --- a/gdb/testsuite/gdb.base/rtld-step.exp +++ b/gdb/testsuite/gdb.base/rtld-step.exp @@ -86,7 +86,10 @@ set rtld_flags [list debug additional_flags=3D[list -sta= tic-pie -fPIE \ -nostdlib -static -lc]] =20 if { ![gdb_can_simple_compile static-pie-static-libc \ - "void _start (void) { _exit (0); }" \ + { + #include + void _start (void) { _exit (0); } + } \ executable $rtld_flags] } { set reason "-static-pie not supported or static libc missing" untested "failed to compile ($reason)"