Skip to content
Snippets Groups Projects
Commit 11903bd5 authored by Jorrit Fahlke's avatar Jorrit Fahlke
Browse files

[mpi-config.m4] When stripping options, make sure not to leave partial options

behind.

This makes it possible to compile programs again with openmpi.

Also, keep -Wl,OPTION options which pass OPTION down to the linker.

[[Imported from SVN: r6196]]
parent d3b02e41
No related branches found
No related tags found
No related merge requests found
...@@ -25,7 +25,9 @@ mpi_getflags () { ...@@ -25,7 +25,9 @@ mpi_getflags () {
retval=`echo $retval | sed -e "s/ ${2} / /"` retval=`echo $retval | sed -e "s/ ${2} / /"`
fi fi
# remove optimization, warning, etc paramters # remove optimization, warning, etc paramters
retval=`echo $retval | sed -e 's/-g//g' -e 's/-W[[a-z0-9]]\+//g' -e 's/-O[[0-9]]\+//g' -e 's/^ *//g'` retval=`echo " $retval " | sed -e 's/ -g / /g' -e 's/ -W[[a-z0-9]]\+ / /g' -e 's/ -O[[0-9]]\+ / /g'`
# strip leading and trailing spaces
retval=`echo "$retval" | sed 's/^ *//g;s/ *$//g'`
} }
# removes regexp $2 from string $1 # removes regexp $2 from string $1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment