From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20637 invoked by alias); 24 Jul 2015 08:01:17 -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 20624 invoked by uid 89); 24 Jul 2015 08:01:16 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RP_MATCHES_RCVD,SPF_HELO_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Fri, 24 Jul 2015 08:01:15 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 3CFF78B136; Fri, 24 Jul 2015 08:01:14 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-43.ams2.redhat.com [10.36.116.43]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t6O81Bl6003910 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 24 Jul 2015 04:01:13 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id t6O819oX029498; Fri, 24 Jul 2015 10:01:09 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id t6O816Ud029497; Fri, 24 Jul 2015 10:01:06 +0200 Date: Fri, 24 Jul 2015 08:06:00 -0000 From: Jakub Jelinek To: Ilya Verbin , David Malcolm Cc: Thomas Schwinge , gcc-patches@gcc.gnu.org, Kirill Yukhin , bvmaks@gmail.com Subject: Re: [PATCH 3/4] Add libgomp plugin for Intel MIC Message-ID: <20150724080106.GH1780@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20141021171323.GA47586@msticlxl57.ims.intel.com> <20141021172413.GD47586@msticlxl57.ims.intel.com> <878uaq68fn.fsf@kepler.schwinge.homeip.net> <20150723185029.GA48606@msticlxl57.ims.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150723185029.GA48606@msticlxl57.ims.intel.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-07/txt/msg02003.txt.bz2 On Thu, Jul 23, 2015 at 09:50:55PM +0300, Ilya Verbin wrote: > > Here, I note that the xxd tool is being used, which in my distribution is > > part of the Vim editor's package, which -- as far as I know -- is not > > currently declared as a build dependency of GCC? > > We have a patch, which checks for xxd availability, is it ok for trunk? I'd prefer at least some alternatives. E.g. the following xxd.py #!/usr/bin/python import sys with open(sys.argv[1],"rb") as f: nextblock = f.read(12) while 1: block = nextblock nextblock = f.read(12) if block == "": break str = "" for ch in block: if str == "": str = " " else: str += ", " if ord(ch) < 10: str += "0x0" + chr(ord('0')+ord(ch)) elif ord(ch) < 16: str += "0x0" + chr(ord('a')+ord(ch)-10) else: str += hex(ord(ch)) if nextblock != "": str += "," print str python ./xxd.py $< >> $@ does the same thing as cat $< | xxd -include >> $@ (CCing David as python expert, my python knowledge is limited and 15 years old, not sure how portable this is (python 2 vs. python 3, and even python 2 minimal versions)). Thus, perhaps configure could check for python that can handle this, or xxd, and substitute the right command into the makefile and only bail out if neither is found? Jakub