public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Joseph Myers <joseph@codesourcery.com>
To: <libc-alpha@sourceware.org>
Subject: Handle tests-unsupported if run-built-tests = no
Date: Wed, 02 Nov 2016 23:44:00 -0000	[thread overview]
Message-ID: <alpine.DEB.2.20.1611022344020.23365@digraph.polyomino.org.uk> (raw)

The tests-unsupported variable lists tests that should neither be
compiled nor run, because some support needed to compile them is
missing.

The implementation of this feature involves having a rule to create
.out files for these tests that takes precedence over the default
rule.  This does not work in the run-built-tests = no case (cross
compiling without use of a wrapper to run the tests on a separate
system, in which cases most tests are compiled only) because in that
case the tests target depends on $(tests) to ensure all tests get
compiled.  This patch changes that dependency to filter out
$(tests-unsupported).

Tested with cross-compilation to ARM with GCC 5, where libstdc++ is
missing some C++11 support because of the bug I fixed in
<https://gcc.gnu.org/ml/gcc-patches/2015-10/msg01040.html> and so
tests-unsupported is nonempty and the tests in question fail to
compile.  (When I originally observed the bug, it was with a native
build / test simply using an x86_64 compiler that had been configured
as a cross compiler to isolate it from the system headers / libraries,
so the configuration issue applied to the compiler but run-built-tests
was yes, so I don't observe the issue with tests-unsupported with that
compiler.)

2016-11-02  Joseph Myers  <joseph@codesourcery.com>

	* Rules [$(run-built-tests) = no] (tests): Do not depend on
	$(tests-unsupported).

diff --git a/Rules b/Rules
index 342d659..4b95997 100644
--- a/Rules
+++ b/Rules
@@ -114,7 +114,8 @@ else
 others: $(addprefix $(objpfx),$(extra-objs))
 endif
 ifeq ($(run-built-tests),no)
-tests: $(addprefix $(objpfx),$(tests) $(test-srcs)) $(tests-special)
+tests: $(addprefix $(objpfx),$(filter-out $(tests-unsupported),$(tests)) \
+			     $(test-srcs)) $(tests-special)
 xtests: tests $(xtests-special)
 else
 tests: $(tests:%=$(objpfx)%.out) $(tests-special)

-- 
Joseph S. Myers
joseph@codesourcery.com

             reply	other threads:[~2016-11-02 23:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-11-02 23:44 Joseph Myers [this message]
2016-11-04 21:10 ` Roland McGrath

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=alpine.DEB.2.20.1611022344020.23365@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-alpha@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: 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).