Bernhard Fischer wrote: > On Thu, Feb 15, 2007 at 03:12:30PM +0100, Bert Wesarg wrote: >> Hello, >> >> when using a multi token CC variable (like "gcc -m32"), the logic to >> extract $extra_ldflags from libtool don't work. So here is a little hack >> to remove the $CC prefix from the libtool-link cmd. >> >> Bert Wesarg > >> diff -ur openmpi-1.1.4/config/ompi_get_libtool_linker_flags.m4 >> openmpi-1.1.4-extra_ldflags-fix/config/ompi_get_libtool_linker_flags.m4 >> --- openmpi-1.1.4/config/ompi_get_libtool_linker_flags.m4 2006-04-12 >> 18:12:28.000000000 +0200 >> +++ openmpi-1.1.4-extra_ldflags-fix/config/ompi_get_libtool_linker_flags.m4 >> 2007-02-15 15:11:28.285844893 +0100 >> @@ -76,11 +76,15 @@ >> cmd="$libtool --dry-run --mode=link --tag=CC $CC bar.lo libfoo.la -o bar >> $extra_flags" >> ompi_check_linker_flags_work yes >> >> +# use array initializer to remove multiple spaces in $CC >> +tempCC=($CC) > > I don't think that this is portable, fwiw. > http://www.opengroup.org/onlinepubs/009695399/idx/shell.html Thank you, you are correct. Than please replace the patch with this one.
Bert > _______________________________________________ > devel mailing list > de...@open-mpi.org > http://www.open-mpi.org/mailman/listinfo.cgi/devel
diff -ur openmpi-1.1.4/config/ompi_get_libtool_linker_flags.m4 openmpi-1.1.4-extra_ldflags-fix/config/ompi_get_libtool_linker_flags.m4 --- openmpi-1.1.4/config/ompi_get_libtool_linker_flags.m4 2006-04-12 18:12:28.000000000 +0200 +++ openmpi-1.1.4-extra_ldflags-fix/config/ompi_get_libtool_linker_flags.m4 2007-02-15 16:04:22.493816366 +0100 @@ -76,11 +76,14 @@ cmd="$libtool --dry-run --mode=link --tag=CC $CC bar.lo libfoo.la -o bar $extra_flags" ompi_check_linker_flags_work yes +# use array initializer to remove multiple spaces in $CC +tempCC=`echo $CC` +output="${output#$tempCC}" +unset tempCC eval "set $output" extra_ldflags= while test -n "[$]1"; do case "[$]1" in - $CC) ;; *.libs/bar*) ;; bar*) ;; -I*) ;;