From: Jakub Jelinek <jakub@redhat.com>
To: Aleksander Ivanyushenko <aleksander.ivanyushenko@gmail.com>
Cc: kirill.yukhin@gmail.com, iverbin@gmail.com, gcc-patches@gcc.gnu.org
Subject: Re: [PATCH 3/4] Add libgomp plugin for Intel MIC
Date: Mon, 30 Nov 2015 15:37:00 -0000 [thread overview]
Message-ID: <20151130152300.GF5675@tucnak.redhat.com> (raw)
In-Reply-To: <20151111145615.GA4807@msticlxl57.ims.intel.com>
On Wed, Nov 11, 2015 at 05:56:15PM +0300, Aleksander Ivanyushenko wrote:
> diff --git a/configure.ac b/configure.ac
> index 9241261..b997646 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -494,6 +494,18 @@ else
> fi])
> AC_SUBST(extra_liboffloadmic_configure_flags)
>
> +# Intelmic and intelmicemul require xxd or python.
> +case "${target}" in
> + *-intelmic-* | *-intelmicemul-*)
> + AC_CHECK_PROG(xxd_present, xxd, "yes", "no")
> + AC_CHECK_PROG(python2_present, python2, "yes", "no")
> + AC_CHECK_PROG(python3_present, python3, "yes", "no")
> + if test "$xxd_present$python2_present$python3_present" = "nonono"; then
> + AC_MSG_ERROR([cannot find neither xxd nor python])
> + fi
> + ;;
> +esac
Why here? I'd do something like that only in
liboffloadmic/plugin/configure.ac. Furthermore, it is inconsistent
with what you actually use in liboffloadmic/plugin (where you look only
for python and above you only look for python[23]).
> @@ -73,7 +75,7 @@ main_target_image.h: offload_target_main
> @echo "};" >> $@
> @echo "extern \"C\" const MainTargetImage main_target_image = {" >> $@
> @echo " image_size, \"offload_target_main\"," >> $@
> - @cat $< | xxd -include >> $@
> + @if test "x$(xxd_path)" != "xno"; then cat $< | $(xxd_path) -include >> $@; else $(python_path) $(XXD_PY) $< >> $@; fi;
> @echo "};" >> $@
I'd prefer to use $(XXD) and $(PYTHON) instead of $(xxd_path) and $(python_path),
that is more consistent with dozens of other variables for other tools.
> --- a/liboffloadmic/plugin/configure.ac
> +++ b/liboffloadmic/plugin/configure.ac
> @@ -124,6 +124,10 @@ case ${enable_version_specific_runtime_libs} in
> ;;
> esac
>
> +# Find path to xxd or python
> +AC_PATH_PROG(xxd_path, xxd, "no")
> +AC_PATH_PROG(python_path, python, "no")
I'd use
+AC_PATH_PROG(XXD, xxd, no)
+AC_PATH_PROGS(PYTHON, python python2 python3, no)
and then add the conditional AC_MSG_ERROR if
x$XXD = xno && x$PYTHON = xno
Jakub
next prev parent reply other threads:[~2015-11-30 15:23 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20151111145615.GA4807@msticlxl57.ims.intel.com>
2015-11-30 15:11 ` Aleksander Ivanyushenko
2015-11-30 15:37 ` Jakub Jelinek [this message]
2014-10-21 17:16 [PATCH 0/4] OpenMP 4.0 offloading to " Ilya Verbin
2014-10-21 17:28 ` [PATCH 3/4] Add libgomp plugin for " Ilya Verbin
2014-10-22 9:47 ` Jakub Jelinek
2014-10-23 16:00 ` Ilya Verbin
2014-10-24 14:57 ` Jakub Jelinek
2014-10-24 15:12 ` Ilya Verbin
2014-10-24 15:19 ` Jakub Jelinek
2014-10-27 14:24 ` Ilya Verbin
2014-11-06 18:25 ` Jakub Jelinek
2014-11-10 14:32 ` Ilya Verbin
2014-11-11 7:07 ` Jakub Jelinek
2014-12-12 9:42 ` Thomas Schwinge
2015-01-08 14:48 ` Thomas Schwinge
2015-07-08 14:16 ` Thomas Schwinge
2015-07-08 15:14 ` Ilya Verbin
2015-07-08 15:52 ` Thomas Schwinge
2015-07-23 19:05 ` Ilya Verbin
2015-07-24 8:06 ` Jakub Jelinek
2015-07-24 14:27 ` David Malcolm
2015-07-28 15:51 ` Maxim Blumental
2015-08-03 10:24 ` Maxim Blumental
2015-08-04 17:40 ` David Malcolm
2015-08-06 14:35 ` Fwd: " Maxim Blumental
2015-08-11 12:27 ` Maxim Blumental
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20151130152300.GF5675@tucnak.redhat.com \
--to=jakub@redhat.com \
--cc=aleksander.ivanyushenko@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=iverbin@gmail.com \
--cc=kirill.yukhin@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).