Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Tom Tromey <tom@tromey.com>
To: Sandra Loosemore <sandra@codesourcery.com>
Cc: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>,
	 "gdb-patches\@sourceware.org" <gdb-patches@sourceware.org>
Subject: Re: [patch, testsuite] Skip gnu-ifunc tests if building the testcase fails
Date: Thu, 27 Sep 2018 20:31:00 -0000	[thread overview]
Message-ID: <877ej6of7g.fsf@tromey.com> (raw)
In-Reply-To: <bbbef432-bab0-d928-1c36-7b6aa3e5ac21@codesourcery.com> (Sandra	Loosemore's message of "Wed, 26 Sep 2018 20:20:10 -0600")

>>>>> "Sandra" == Sandra Loosemore <sandra@codesourcery.com> writes:

Sandra> Here's a revised patch that adapts the same compile test that gcc
Sandra> uses. Is this one OK?

Thanks for the patch.

Sandra> +# Return true if the IFUNC feature is unsupported.
Sandra> +gdb_caching_proc skip_ifunc_tests {
Sandra> +    # Set up, compile, and execute a test program.
Sandra> +    # Include the current process ID in the file names to prevent conflicts
Sandra> +    # with invocations for multiple testsuites.
Sandra> +    set src [standard_temp_file ifunc[pid].c]
Sandra> +    set obj [standard_temp_file ifunc[pid].o]
Sandra> +
Sandra> +    verbose -log "checking for ifunc support"
Sandra> +    gdb_produce_source $src {
Sandra> +	extern void f_ ();
Sandra> +	typedef void F (void);
Sandra> +	F* g (void) { return &f_; }
Sandra> +	void f () __attribute__ ((ifunc ("g")));
Sandra> +    }
Sandra> +
Sandra> +    set lines [gdb_compile $src $obj object {quiet}]
Sandra> +    file delete $src
Sandra> +    file delete $obj


I wonder whether this could use gdb_can_simple_compile.  A recent patch
changed a bunch of other caching procs to use this helper function
instead.

I didn't examine it in detail, though, so if there is some reason it
can't be used, that's fine.

But if it can be used, this is ok with that change.

Tom


      reply	other threads:[~2018-09-27 20:31 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-26  5:08 Sandra Loosemore
2018-09-26 11:50 ` Rainer Orth
2018-09-27  2:20   ` Sandra Loosemore
2018-09-27 20:31     ` Tom Tromey [this message]

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=877ej6of7g.fsf@tromey.com \
    --to=tom@tromey.com \
    --cc=gdb-patches@sourceware.org \
    --cc=ro@CeBiTec.Uni-Bielefeld.DE \
    --cc=sandra@codesourcery.com \
    /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: link
Be 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