From patchwork Fri Dec 12 09:42:30 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Schwinge X-Patchwork-Id: 420414 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 4B75E140081 for ; Fri, 12 Dec 2014 20:43:06 +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=IR7fj9PiC02pzrpf ua6Z6vhDahUA+DBVAWoqAteRbDotc/HnNuA/3BLXXbxep2MLEYRF0BxFAr2GgLIF UegQkV2ADG9BokOqBcl/yFBRjntJd0khZuJfoM5r3D1WoWwAOkfPUO+xRLJxQCt0 uTp1ofmeKXIlTcFJUxezyUqPgXg= 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=8rL0MwNGTw8UCt+20ZGAs2 q+Nbg=; b=eaHoklcUbu3QRvy2VIF39WUoLNPKhCQkgZGsr1B1dZUA3ltntveCG1 VfYkkFb5OZhDR3BjFdbyikS6g4nVAxtzmEwB0fX7Wi2ui1BlRBMQmSxU2VXk/OGU aDbGQkCl/GLiqSE/DWEU/y/k+lR7nxn4gON+WlyCPjea6a8O3yvDs= Received: (qmail 2353 invoked by alias); 12 Dec 2014 09:42:59 -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 2341 invoked by uid 89); 12 Dec 2014 09:42:57 -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 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; Fri, 12 Dec 2014 09:42:54 +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 1XzMkM-0000Rf-79 from Thomas_Schwinge@mentor.com ; Fri, 12 Dec 2014 01:42:50 -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; Fri, 12 Dec 2014 09:42:48 +0000 From: Thomas Schwinge To: Ilya Verbin , Jakub Jelinek CC: , Kirill Yukhin , Andrey Turetskiy Subject: Re: [PATCH 3/4] Add libgomp plugin for Intel MIC In-Reply-To: <20141110143006.GA50497@msticlxl57.ims.intel.com> References: <20141021171323.GA47586@msticlxl57.ims.intel.com> <20141021172413.GD47586@msticlxl57.ims.intel.com> <20141022092205.GL10376@tucnak.redhat.com> <20141023154112.GA65020@msticlxl57.ims.intel.com> <20141024143521.GF10376@tucnak.redhat.com> <20141024150844.GA16821@msticlxl57.ims.intel.com> <20141024151858.GG10376@tucnak.redhat.com> <20141027121556.GB41265@msticlxl57.ims.intel.com> <20141106182536.GQ5026@tucnak.redhat.com> <20141110143006.GA50497@msticlxl57.ims.intel.com> User-Agent: Notmuch/0.9-101-g81dad07 (http://notmuchmail.org) Emacs/24.4.1 (i586-pc-linux-gnu) Date: Fri, 12 Dec 2014 10:42:30 +0100 Message-ID: <87k31x4321.fsf@kepler.schwinge.homeip.net> MIME-Version: 1.0 Hi! On Mon, 10 Nov 2014 17:30:38 +0300, Ilya Verbin wrote: > --- /dev/null > +++ b/liboffloadmic/plugin/Makefile.am > @@ -0,0 +1,123 @@ > +# Plugin for offload execution on Intel MIC devices. > +libgomp_src_dir = $(top_srcdir)/../../libgomp > +libgomp_dir = $(build_dir)/../../libgomp Hmm, I'm not too happy about external (to libgomp) files using (for example, #include) stuff from libgomp, for the reason given in : it can then easily happen that any such files depend on, for example, Autoconf definitions which are provided in only one of the instances. That said, libgomp_target.h as well as omp.h currently are self-contained (the latter file after having been created from omp.h.in by libgomp's configure script), so this currently is not an actual problem. > + AM_LDFLAGS = -L$(liboffload_dir)/.libs -L$(libgomp_dir)/.libs -loffloadmic_target -lcoi_device -lmyo-service -lgomp -rdynamic Given that this plugin wishes to link against libgomp, don't we have to make sure that libgomp has actually been built before that is attempted, and the following (untested) patch would be required? Grüße, Thomas diff --git Makefile.def Makefile.def index 7c8761a..f0a3a91 100644 --- Makefile.def +++ Makefile.def @@ -550,7 +550,7 @@ dependencies = { module=configure-target-libvtv; on=all-target-libstdc++-v3; }; // generated by the libgomp configure. Unfortunately, due to the use of // recursive make, we can't be that specific. dependencies = { module=all-target-libstdc++-v3; on=configure-target-libgomp; }; -dependencies = { module=all-target-liboffloadmic; on=configure-target-libgomp; }; +dependencies = { module=all-target-liboffloadmic; on=all-target-libgomp; }; dependencies = { module=install-target-libgo; on=install-target-libatomic; }; dependencies = { module=install-target-libgfortran; on=install-target-libquadmath; }; diff --git Makefile.in Makefile.in index ba5ae4c..8c060b9 100644 --- Makefile.in +++ Makefile.in @@ -48884,7 +48884,7 @@ all-stage3-target-libstdc++-v3: maybe-configure-stage3-target-libgomp all-stage4-target-libstdc++-v3: maybe-configure-stage4-target-libgomp all-stageprofile-target-libstdc++-v3: maybe-configure-stageprofile-target-libgomp all-stagefeedback-target-libstdc++-v3: maybe-configure-stagefeedback-target-libgomp -all-target-liboffloadmic: maybe-configure-target-libgomp +all-target-liboffloadmic: maybe-all-target-libgomp install-target-libgo: maybe-install-target-libatomic install-target-libgfortran: maybe-install-target-libquadmath install-target-libgfortran: maybe-install-target-libgcc