From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23337 invoked by alias); 18 Dec 2014 15:28:13 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 23322 invoked by uid 89); 18 Dec 2014 15:28:12 -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; Thu, 18 Dec 2014 15:28:05 +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 1Y1czh-0002H7-CV from Thomas_Schwinge@mentor.com ; Thu, 18 Dec 2014 07:28:01 -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; Thu, 18 Dec 2014 15:27:59 +0000 From: Thomas Schwinge To: Ilya Verbin , Jakub Jelinek CC: Kirill Yukhin , Andrey Turetskiy , Subject: Re: [PATCH 4/4] OpenMP 4.0 offloading to Intel MIC: non-fallback testing In-Reply-To: <20141030114001.GA34120@msticlxl57.ims.intel.com> References: <20141021171323.GA47586@msticlxl57.ims.intel.com> <20141030114001.GA34120@msticlxl57.ims.intel.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) Date: Thu, 18 Dec 2014 15:56:00 -0000 Message-ID: <87tx0t0yh5.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-SW-Source: 2014-12/txt/msg01546.txt.bz2 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Content-length: 2698 Hi! On Thu, 30 Oct 2014 14:40:01 +0300, Ilya Verbin wrote: > This patch allows to run non-fallback 'make check-target-libgomp'. It pa= sses to > the host compiler additional -B options with the paths to the offload com= pilers, > since non-installed host compiler doesn't know where to find mkoffload to= ols. > Also in case of intelmic offload targets it appends paths to liboffloadmi= c lib. > --- a/libgomp/configure.ac > +++ b/libgomp/configure.ac > @@ -280,9 +280,13 @@ else > multilib_arg=3D > fi >=20=20 > +# Get accel target and path to install tree of accel compiler > +offload_additional_options=3D > +offload_additional_lib_paths=3D > offload_targets=3D > if test x"$enable_offload_targets" !=3D x; then > for tgt in `echo $enable_offload_targets | sed -e 's#,# #g'`; do > + tgt_dir=3D`echo $tgt | grep '=3D' | sed 's/.*=3D//'` > tgt=3D`echo $tgt | sed 's/=3D.*//'` > case $tgt in > *-intelmic-* | *-intelmicemul-*) > @@ -295,10 +299,20 @@ if test x"$enable_offload_targets" !=3D x; then > else > offload_targets=3D$offload_targets,$tgt_name > fi > + if test x"$tgt_dir" !=3D x; then > + offload_additional_options=3D"$offload_additional_options -B$tgt_d= ir/libexec/gcc/\$(target_alias)/\$(gcc_version) -B$tgt_dir/bin" > + offload_additional_lib_paths=3D"$offload_additional_lib_paths:$tgt= _dir/lib64:$tgt_dir/lib" > + else > + offload_additional_options=3D"$offload_additional_options -B\$(lib= execdir)/gcc/\$(target_alias)/\$(gcc_version) -B\$(bindir)" > + offload_additional_lib_paths=3D"$offload_additional_lib_paths:$too= lexeclibdir" > + fi > done > fi Hmm, maybe I'm seeing a problem where there isn't one, but in case I'm not: how will this work if there is more than one offloading compiler configured? Won't you get conflicting -B paths added to offload_additional_options in this case? > --- a/libgomp/testsuite/lib/libgomp.exp > +++ b/libgomp/testsuite/lib/libgomp.exp > @@ -169,6 +186,10 @@ proc libgomp_init { args } { >=20=20 > # Disable color diagnostics > lappend ALWAYS_CFLAGS "additional_flags=3D-fdiagnostics-color=3Dneve= r" > + > + # Required to support non-fallback testing of '#pragma omp target'. > + # Help GCC to find target mkoffload. > + lappend ALWAYS_CFLAGS "additional_flags=3D${offload_additional_optio= ns}" > } What we're doing in OpenACC offloading testing (gomp-4_0-branch), is in the libgomp.oacc-c/c.exp (etc.) file cycle through all the available offloading devices, and then in there -- I think -- such options should be set, that are specific to one particular offloading device/compiler? Gr=C3=BC=C3=9Fe, Thomas --=-=-= Content-Type: application/pgp-signature; name="signature.asc" Content-length: 472 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQEcBAEBAgAGBQJUkvJ2AAoJEK3/DN1sMFFtbogH/R7he1u3FvuRpiQpxqKOZzni fs6huWCfluq2TAZ1IDUiIfvX94OP+JbB0dTKQbYbFWFm0nojUIDpMIaHyjND0KMv dCJETrDymlGGxq0aDri3gojU1j4I8iZAhx5OXdxWTCZOYBOik2T6qXqqbKH28ZTB 8TYdQn7IGAsbUE7+b2/42mlkS4RLbLs5mA4Kan6LaJ8xQ81BWhh60H03k71JlI1U KNjFmC4LeqdoH4pSFqxlZdazPDdo7HawytfWWH6zKeI/nkZ1553y76AxJCnuc3lO exeJwi7kV4g3cM+yvWPfVtvi/xx1HXMKevQNOF09NlZVmedQ/fH5qtOsc/4SH0I= =Jan3 -----END PGP SIGNATURE----- --=-=-=--