From patchwork Mon Dec 22 16:21:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 423425 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 05ABA1400B7 for ; Tue, 23 Dec 2014 03:22:42 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; q=dns; s=default; b=Vim1iCXI8AdcWrYx q80UwY7bJ3AWjMD2b1W+tos3I7Ni2KGMugEZkPodmx6hmZlGarnZtDKgyzzVgz2R UxjgxcXi9JOSxKoeEu4OcnYA7S1tODxaNp55KQ/9i3O7jd6DtY28DmsBcLJj/B40 LdHOrcAXmNhhqRyU5F+q6MNrkfI= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:in-reply-to:references:date:message-id :mime-version:content-type; s=default; bh=/biB4ux0u1aS/suJvR1CUH klXJs=; b=ipfVAIX68RI9qAeUWwspum1NzRP9zSbezUoYyD3tBfjjxnLfC0SGDH P022YOvmZRBIU2bMySJ//q/TzYQJ6W5lus+m0C6EZBN2xKUAS2lkcaEOoDpZohC8 aHUaq6ojn0UbfPqdaf03pQ+1z12Pn0tgAEbYfuMKu2NZWrUhUx9eQ= Received: (qmail 20667 invoked by alias); 22 Dec 2014 16:22:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 20654 invoked by uid 89); 22 Dec 2014 16:22:33 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_NONE, SPF_PASS autolearn=ham version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 22 Dec 2014 16:22:30 +0000 Received: from nat-ies.mentorg.com ([192.94.31.2] helo=SVR-IES-FEM-01.mgc.mentorg.com) by relay1.mentorg.com with esmtp id 1Y35kW-00076F-9H from Thomas_Schwinge@mentor.com ; Mon, 22 Dec 2014 08:22:24 -0800 Received: from feldtkeller.schwinge.homeip.net (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.3.181.6; Mon, 22 Dec 2014 16:22:19 +0000 From: Thomas Schwinge To: Jakub Jelinek , CC: Ilya Verbin , Kirill Yukhin , Andrey Turetskiy Subject: Re: [PATCH 4/4] OpenMP 4.0 offloading to Intel MIC: non-fallback testing In-Reply-To: <20141218102120.GC1667@tucnak.redhat.com> References: <20141021171323.GA47586@msticlxl57.ims.intel.com> <20141030114001.GA34120@msticlxl57.ims.intel.com> <20141106175540.GN5026@tucnak.redhat.com> <20141110143430.GB50497@msticlxl57.ims.intel.com> <87a92l3nby.fsf@kepler.schwinge.homeip.net> <20141218102120.GC1667@tucnak.redhat.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.3.1 (x86_64-pc-linux-gnu) Date: Mon, 22 Dec 2014 17:21:52 +0100 Message-ID: <87vbl3y7rz.fsf@schwinge.name> MIME-Version: 1.0 Hi! On Thu, 18 Dec 2014 11:21:20 +0100, Jakub Jelinek wrote: > On Wed, Dec 17, 2014 at 11:48:01PM +0100, Thomas Schwinge wrote: > > I have another suggestion: on gomp-4_0-branch, we had already started > > using a libgomp-test-support.exp file for a similar purpose. I now > > changed your code on gomp-4_0-branch in r218845 as follows (though, not > > very much tested). The advantage here is that people who are not using > > GCC build-tree testing, but are directly invoking runtest, then don't > > have to set various environment variables, but instead just have to copy > > this one libgomp-test-support.exp file from the build tree to the testing > > tree. Does this make sense? > > > > commit de01639bf47e29a20959771e587fb6f30c372a45 > > Author: tschwinge > > Date: Wed Dec 17 22:45:05 2014 +0000 > > > > libgomp: Route offloading data through the libgomp-test-support.exp file. > > > > libgomp/ > > * testsuite/Makefile.am: Don't export OFFLOAD_TARGETS, > > OFFLOAD_ADDITIONAL_OPTIONS, and OFFLOAD_ADDITIONAL_LIB_PATHS... > > * testsuite/libgomp-test-support.exp.in: ..., and instead set > > offload_targets, offload_additional_options, and > > offload_additional_lib_paths here. Update all users. > > LGTM. As discussed in , that doesn't really work: there may be additional (recursive) expansions required (similar to: libexecdir being defined in terms of exec_prefix, that in terms of prefix, and so on), so we really need to handle that in the Makefile, where all these variables are available. Committed to gomp-4_0-branch in r219016: commit 6bb8cfa151e40ab1e991112d2bbe2719f0a2c46a Author: tschwinge Date: Mon Dec 22 16:17:15 2014 +0000 libgomp: Handle Makefile variable usage in testsuite/libgomp-test-support.exp. libgomp/ * testsuite/libgomp-test-support.exp.in (offload_additional_options, offload_additional_lib_paths): Don't set. * configure.ac: Instantiate testsuite/libgomp-test-support.pt.exp instead of testsuite/libgomp-test-support.exp. * testsuite/Makefile.am (libgomp-test-support.exp): New rule. (all-local): Depend on it. * configure: Regenerate. * testsuite/Makefile.in: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gomp-4_0-branch@219016 138bc75d-0d04-0410-961f-82ee72b054a4 --- libgomp/ChangeLog.gomp | 12 ++++++++ libgomp/configure | 4 +-- libgomp/configure.ac | 2 +- libgomp/testsuite/Makefile.am | 14 +++++++++ libgomp/testsuite/Makefile.in | 41 ++++++++++++++++++--------- libgomp/testsuite/libgomp-test-support.exp.in | 2 -- 6 files changed, 56 insertions(+), 19 deletions(-) Grüße, Thomas diff --git libgomp/ChangeLog.gomp libgomp/ChangeLog.gomp index b7a0e7d..6653e58 100644 --- libgomp/ChangeLog.gomp +++ libgomp/ChangeLog.gomp @@ -1,3 +1,15 @@ +2014-12-22 Thomas Schwinge + + * testsuite/libgomp-test-support.exp.in + (offload_additional_options, offload_additional_lib_paths): Don't + set. + * configure.ac: Instantiate testsuite/libgomp-test-support.pt.exp + instead of testsuite/libgomp-test-support.exp. + * testsuite/Makefile.am (libgomp-test-support.exp): New rule. + (all-local): Depend on it. + * configure: Regenerate. + * testsuite/Makefile.in: Likewise. + 2014-12-17 Thomas Schwinge Tom de Vries diff --git libgomp/configure libgomp/configure index f72378e..839b2c6 100755 --- libgomp/configure +++ libgomp/configure @@ -16553,7 +16553,7 @@ ac_config_files="$ac_config_files omp.h omp_lib.h omp_lib.f90 libgomp_f.h" ac_config_files="$ac_config_files Makefile testsuite/Makefile libgomp.spec" -ac_config_files="$ac_config_files testsuite/libgomp-test-support.exp" +ac_config_files="$ac_config_files testsuite/libgomp-test-support.pt.exp:testsuite/libgomp-test-support.exp.in" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure @@ -17699,7 +17699,7 @@ do "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "testsuite/Makefile") CONFIG_FILES="$CONFIG_FILES testsuite/Makefile" ;; "libgomp.spec") CONFIG_FILES="$CONFIG_FILES libgomp.spec" ;; - "testsuite/libgomp-test-support.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libgomp-test-support.exp" ;; + "testsuite/libgomp-test-support.pt.exp") CONFIG_FILES="$CONFIG_FILES testsuite/libgomp-test-support.pt.exp:testsuite/libgomp-test-support.exp.in" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac diff --git libgomp/configure.ac libgomp/configure.ac index 178c34d..4687b01 100644 --- libgomp/configure.ac +++ libgomp/configure.ac @@ -352,5 +352,5 @@ CFLAGS="$save_CFLAGS" AC_CONFIG_FILES(omp.h omp_lib.h omp_lib.f90 libgomp_f.h) AC_CONFIG_FILES(Makefile testsuite/Makefile libgomp.spec) -AC_CONFIG_FILES([testsuite/libgomp-test-support.exp]) +AC_CONFIG_FILES([testsuite/libgomp-test-support.pt.exp:testsuite/libgomp-test-support.exp.in]) AC_OUTPUT diff --git libgomp/testsuite/Makefile.am libgomp/testsuite/Makefile.am index 561b7e2..66a9d94 100644 --- libgomp/testsuite/Makefile.am +++ libgomp/testsuite/Makefile.am @@ -11,3 +11,17 @@ EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \ _RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \ echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi) RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)" + + +# Instead of directly in ../testsuite/libgomp-test-support.exp.in, the +# following variables have to be "routed through" this Makefile, for expansion +# of the several (Makefile) variables used therein. +libgomp-test-support.exp: libgomp-test-support.pt.exp Makefile + cp $< $@.tmp + echo >> $@.tmp \ + 'set offload_additional_options "$(offload_additional_options)"' + echo >> $@.tmp \ + 'set offload_additional_lib_paths "$(offload_additional_lib_paths)"' + mv $@.tmp $@ + +all-local: libgomp-test-support.exp diff --git libgomp/testsuite/Makefile.in libgomp/testsuite/Makefile.in index 016d0d4..352fc3f 100644 --- libgomp/testsuite/Makefile.in +++ libgomp/testsuite/Makefile.in @@ -56,7 +56,7 @@ am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(SHELL) $(top_srcdir)/../mkinstalldirs CONFIG_HEADER = $(top_builddir)/config.h -CONFIG_CLEAN_FILES = libgomp-test-support.exp +CONFIG_CLEAN_FILES = libgomp-test-support.pt.exp CONFIG_CLEAN_VPATH_FILES = SOURCES = DEJATOOL = $(PACKAGE) @@ -258,7 +258,7 @@ $(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps) $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): -libgomp-test-support.exp: $(top_builddir)/config.status $(srcdir)/libgomp-test-support.exp.in +libgomp-test-support.pt.exp: $(top_builddir)/config.status $(srcdir)/libgomp-test-support.exp.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: @@ -313,7 +313,7 @@ distclean-DEJAGNU: check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-DEJAGNU check: check-am -all-am: Makefile +all-am: Makefile all-local installdirs: install: install-am install-exec: install-exec-am @@ -408,19 +408,32 @@ uninstall-am: .MAKE: check-am install-am install-strip -.PHONY: all all-am check check-DEJAGNU check-am clean clean-generic \ - clean-libtool distclean distclean-DEJAGNU distclean-generic \ - distclean-libtool dvi dvi-am html html-am info info-am install \ - install-am install-data install-data-am install-dvi \ - install-dvi-am install-exec install-exec-am install-html \ - install-html-am install-info install-info-am install-man \ - install-pdf install-pdf-am install-ps install-ps-am \ - install-strip installcheck installcheck-am installdirs \ - maintainer-clean maintainer-clean-generic mostlyclean \ - mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ - uninstall uninstall-am +.PHONY: all all-am all-local check check-DEJAGNU check-am clean \ + clean-generic clean-libtool distclean distclean-DEJAGNU \ + distclean-generic distclean-libtool dvi dvi-am html html-am \ + info info-am install install-am install-data install-data-am \ + install-dvi install-dvi-am install-exec install-exec-am \ + install-html install-html-am install-info install-info-am \ + install-man install-pdf install-pdf-am install-ps \ + install-ps-am install-strip installcheck installcheck-am \ + installdirs maintainer-clean maintainer-clean-generic \ + mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ + ps ps-am uninstall uninstall-am +# Instead of directly in ../testsuite/libgomp-test-support.exp.in, the +# following variables have to be "routed through" this Makefile, for expansion +# of the several (Makefile) variables used therein. +libgomp-test-support.exp: libgomp-test-support.pt.exp Makefile + cp $< $@.tmp + echo >> $@.tmp \ + 'set offload_additional_options "$(offload_additional_options)"' + echo >> $@.tmp \ + 'set offload_additional_lib_paths "$(offload_additional_lib_paths)"' + mv $@.tmp $@ + +all-local: libgomp-test-support.exp + # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: diff --git libgomp/testsuite/libgomp-test-support.exp.in libgomp/testsuite/libgomp-test-support.exp.in index 4586fbe..764bec0 100644 --- libgomp/testsuite/libgomp-test-support.exp.in +++ libgomp/testsuite/libgomp-test-support.exp.in @@ -2,5 +2,3 @@ set cuda_driver_include "@CUDA_DRIVER_INCLUDE@" set cuda_driver_lib "@CUDA_DRIVER_LIB@" set offload_targets "@offload_targets@" -set offload_additional_options "@offload_additional_options@" -set offload_additional_lib_paths "@offload_additional_lib_paths@"