Hi! On Thu, 30 Oct 2014 14:40:01 +0300, Ilya Verbin <iver...@gmail.com> wrote: > This patch allows to run non-fallback 'make check-target-libgomp'. It passes > to > the host compiler additional -B options with the paths to the offload > compilers, > since non-installed host compiler doesn't know where to find mkoffload tools. > Also in case of intelmic offload targets it appends paths to liboffloadmic > lib.
> --- a/libgomp/configure.ac > +++ b/libgomp/configure.ac > @@ -280,9 +280,13 @@ else > multilib_arg= > fi > > +# Get accel target and path to install tree of accel compiler > +offload_additional_options= > +offload_additional_lib_paths= > offload_targets= > if test x"$enable_offload_targets" != x; then > for tgt in `echo $enable_offload_targets | sed -e 's#,# #g'`; do > + tgt_dir=`echo $tgt | grep '=' | sed 's/.*=//'` > tgt=`echo $tgt | sed 's/=.*//'` > case $tgt in > *-intelmic-* | *-intelmicemul-*) > @@ -295,10 +299,20 @@ if test x"$enable_offload_targets" != x; then > else > offload_targets=$offload_targets,$tgt_name > fi > + if test x"$tgt_dir" != x; then > + offload_additional_options="$offload_additional_options > -B$tgt_dir/libexec/gcc/\$(target_alias)/\$(gcc_version) -B$tgt_dir/bin" > + > offload_additional_lib_paths="$offload_additional_lib_paths:$tgt_dir/lib64:$tgt_dir/lib" > + else > + offload_additional_options="$offload_additional_options > -B\$(libexecdir)/gcc/\$(target_alias)/\$(gcc_version) -B\$(bindir)" > + > offload_additional_lib_paths="$offload_additional_lib_paths:$toolexeclibdir" > + 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 } { > > # Disable color diagnostics > lappend ALWAYS_CFLAGS "additional_flags=-fdiagnostics-color=never" > + > + # Required to support non-fallback testing of '#pragma omp target'. > + # Help GCC to find target mkoffload. > + lappend ALWAYS_CFLAGS "additional_flags=${offload_additional_options}" > } 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üße, Thomas
signature.asc
Description: PGP signature