public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: Toma Tabacu <Toma.Tabacu@imgtec.com>
Cc: "gcc-patches\@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
	       Matthew Fortune <Matthew.Fortune@imgtec.com>,
	       "catherine_moore\@mentor.com" <catherine_moore@mentor.com>
Subject: Re: [PATCH,testsuite] Add check_effective_target_rdynamic and use it in g++.dg/lto/pr69589_0.C.
Date: Wed, 08 Mar 2017 15:04:00 -0000	[thread overview]
Message-ID: <yddo9xbzu5y.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)
In-Reply-To: <A614194ED15B4844BC4C9FB7F21FCD9270456A99@hhmail02.hh.imgtec.org>	(Toma Tabacu's message of "Mon, 6 Mar 2017 14:17:47 +0000")

Hi Toma,

> g++.dg/lto/pr69589_0.C is currently failing for mips-mti-elf with the following error:
>
> xg++: error: unrecognized command line option '-rdynamic'
>
> However, it passes just fine for mips-mti-linux-gnu.
> I think that we should skip this test for mips-mti-elf.

could it be that mips/sde.h is just missing -rdynamic handling in
LINK_SPEC?  At least some bare-metal targets using gld *do* support
-rdynamic (cf. xtensa/elf.h and aarch64/aarch64-elf-raw.h)...

That said, I like the general direction of this patch, even when the new
keyword is only used in one place.

> This patch achieves this by adding support for check_effective_target_rdynamic
> and then using it in g++.dg/lto/pr69589_0.C.
>
> This patch also removes the existing dg-skip-if, as it is made redundant by the
> effective target check. The latter is also more convenient, as we won't have to
> keep tweaking the dg-skip-if for failing targets anymore.
>
> This is similar to my recent check_effective_target_gettimeofday patch,
> which was greatly improved by Rainer Orth's review.
>
> Tested with mips-mti-elf and mips-mti-linux-gnu.
>
> Does this look good ?
[...]
> diff --git a/gcc/testsuite/lib/target-supports.exp b/gcc/testsuite/lib/target-supports.exp
> index 2766af4..f46f0ba 100644
> --- a/gcc/testsuite/lib/target-supports.exp
> +++ b/gcc/testsuite/lib/target-supports.exp
> @@ -1484,6 +1484,16 @@ proc check_effective_target_static_libgfortran { } {
>      } "-static"]
>  }
>  
> +# Return 1 if we can use the -rdynamic option, 0 otherwise.
> +#
> +# When the target name changes, replace the cached result.

I think this line isn't necessary.  Just keep the first.

Ok for mainline with that fixed.

Thanks.
        Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University

  reply	other threads:[~2017-03-08 15:04 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-06 14:17 Toma Tabacu
2017-03-08 15:04 ` Rainer Orth [this message]
2017-03-09  9:39   ` Matthew Fortune
2017-03-09 15:08   ` Toma Tabacu
2017-06-02 14:06     ` Renlin Li
2017-06-05 12:21       ` Toma Tabacu
2017-06-06 10:02         ` Rainer Orth
2017-06-06 11:55           ` Toma Tabacu

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=yddo9xbzu5y.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=Matthew.Fortune@imgtec.com \
    --cc=Toma.Tabacu@imgtec.com \
    --cc=catherine_moore@mentor.com \
    --cc=gcc-patches@gcc.gnu.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: 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).