This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 3/4] Add libgomp plugin for Intel MIC
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Ilya Verbin <iverbin at gmail dot com>, David Malcolm <dmalcolm at redhat dot com>
- Cc: Thomas Schwinge <thomas at codesourcery dot com>, gcc-patches at gcc dot gnu dot org, Kirill Yukhin <kirill dot yukhin at gmail dot com>, bvmaks at gmail dot com
- Date: Fri, 24 Jul 2015 10:01:06 +0200
- Subject: Re: [PATCH 3/4] Add libgomp plugin for Intel MIC
- Authentication-results: sourceware.org; auth=none
- References: <20141021171323 dot GA47586 at msticlxl57 dot ims dot intel dot com> <20141021172413 dot GD47586 at msticlxl57 dot ims dot intel dot com> <878uaq68fn dot fsf at kepler dot schwinge dot homeip dot net> <20150723185029 dot GA48606 at msticlxl57 dot ims dot intel dot com>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
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