public inbox for gdb-cvs@sourceware.org help / color / mirror / Atom feed
From: Tom de Vries <vries@sourceware.org> To: gdb-cvs@sourceware.org Subject: [binutils-gdb] [gdb/testsuite] Silence compilation fail in gdb.base/rtld-step.exp Date: Fri, 21 Oct 2022 06:36:22 +0000 (GMT) [thread overview] Message-ID: <20221021063622.4621C3858D39@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=b4d6b738075e2d4be9b4a8d2080bcf94e6b7e229 commit b4d6b738075e2d4be9b4a8d2080bcf94e6b7e229 Author: Tom de Vries <tdevries@suse.de> Date: Fri Oct 21 08:36:18 2022 +0200 [gdb/testsuite] Silence compilation fail in gdb.base/rtld-step.exp With gcc 7.5.0 and test-case gdb.base/rtld-step.exp, I run into: ... gdb compile failed, gcc: error: unrecognized command line option \ '-static-pie'; did you mean '-static'? ... Silence this by checking in the test-case that -static-pie is supported, and emitting instead: ... UNTESTED: gdb.base/rtld-step.exp: \ failed to compile (-static-pie not supported or static libc missing) ... Tested on x86_64-linux, with: - gcc 7.5.0: UNTESTED - gcc 12.2.1 with static glibc not installed: UNTESTED - gcc 12.2.1 with static glibc installed: PASS Diff: --- gdb/testsuite/gdb.base/rtld-step.exp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gdb/testsuite/gdb.base/rtld-step.exp b/gdb/testsuite/gdb.base/rtld-step.exp index 4773fa8de3d..0aa2ab0fe1f 100644 --- a/gdb/testsuite/gdb.base/rtld-step.exp +++ b/gdb/testsuite/gdb.base/rtld-step.exp @@ -87,6 +87,14 @@ set binfile_rtld [standard_output_file ${rtld_basename}] 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); }" \ + executable $rtld_flags] } { + set reason "-static-pie not supported or static libc missing" + untested "failed to compile ($reason)" + return -1 +} + # Main program file names and flags: set main_basename ${::gdb_test_file_name}-main set srcfile_main ${srcdir}/${subdir}/${main_basename}.c
reply other threads:[~2022-10-21 6:36 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20221021063622.4621C3858D39@sourceware.org \ --to=vries@sourceware.org \ --cc=gdb-cvs@sourceware.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).