Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
* [PATCH] [gdb/testsuite] Add missing include in gdb.base/rtld-step.exp
@ 2024-03-27 16:23 Tom de Vries
  2024-03-28  2:24 ` Kevin Buettner
  2024-03-28 17:26 ` John Baldwin
  0 siblings, 2 replies; 4+ messages in thread
From: Tom de Vries @ 2024-03-27 16:23 UTC (permalink / raw)
  To: gdb-patches

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-declaration]^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)
...

Fix this by adding the missing include.

Tested on aarch64-linux.
---
 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=[list -static-pie -fPIE \
 						  -nostdlib -static -lc]]
 
 if { ![gdb_can_simple_compile static-pie-static-libc \
-	   "void _start (void) { _exit (0); }" \
+	   {
+	       #include <unistd.h>
+	       void _start (void) { _exit (0); }
+	   } \
 	   executable $rtld_flags] } {
     set reason "-static-pie not supported or static libc missing"
     untested "failed to compile ($reason)"

base-commit: 6f769dfd831b186258e205bd2ae0d39ae9c5c826
-- 
2.35.3


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [gdb/testsuite] Add missing include in gdb.base/rtld-step.exp
  2024-03-27 16:23 [PATCH] [gdb/testsuite] Add missing include in gdb.base/rtld-step.exp Tom de Vries
@ 2024-03-28  2:24 ` Kevin Buettner
  2024-03-28 17:26 ` John Baldwin
  1 sibling, 0 replies; 4+ messages in thread
From: Kevin Buettner @ 2024-03-28  2:24 UTC (permalink / raw)
  To: Tom de Vries; +Cc: gdb-patches

Hi Tom,

On Wed, 27 Mar 2024 17:23:29 +0100
Tom de Vries <tdevries@suse.de> wrote:

> 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-declaration]^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)
> ...
> 
> Fix this by adding the missing include.
> 
> Tested on aarch64-linux.

Thanks for fixing this.

Approved-by: Kevin Buettner <kevinb@redhat.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [gdb/testsuite] Add missing include in gdb.base/rtld-step.exp
  2024-03-27 16:23 [PATCH] [gdb/testsuite] Add missing include in gdb.base/rtld-step.exp Tom de Vries
  2024-03-28  2:24 ` Kevin Buettner
@ 2024-03-28 17:26 ` John Baldwin
  2024-03-29 10:48   ` Tom de Vries
  1 sibling, 1 reply; 4+ messages in thread
From: John Baldwin @ 2024-03-28 17:26 UTC (permalink / raw)
  To: Tom de Vries, gdb-patches

On 3/27/24 12:23 PM, Tom de Vries wrote:
> 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-declaration]^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)
> ...
> 
> Fix this by adding the missing include.
> 
> Tested on aarch64-linux.

Approved-By: John Baldwin <jhb@FreeBSD.org>

-- 
John Baldwin


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] [gdb/testsuite] Add missing include in gdb.base/rtld-step.exp
  2024-03-28 17:26 ` John Baldwin
@ 2024-03-29 10:48   ` Tom de Vries
  0 siblings, 0 replies; 4+ messages in thread
From: Tom de Vries @ 2024-03-29 10:48 UTC (permalink / raw)
  To: John Baldwin, gdb-patches

On 3/28/24 18:26, John Baldwin wrote:
> On 3/27/24 12:23 PM, Tom de Vries wrote:
>> 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-declaration]^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)
>> ...
>>
>> Fix this by adding the missing include.
>>
>> Tested on aarch64-linux.
> 
> Approved-By: John Baldwin <jhb@FreeBSD.org>
> 

Hi John,

thanks for the review.

I had already committed after the approval of Kevin, so unfortunately 
this was committed without your approved-by tag.

Thanks,
- Tom

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-03-29 10:48 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-27 16:23 [PATCH] [gdb/testsuite] Add missing include in gdb.base/rtld-step.exp Tom de Vries
2024-03-28  2:24 ` Kevin Buettner
2024-03-28 17:26 ` John Baldwin
2024-03-29 10:48   ` Tom de Vries

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox