1
1
openmpi/config/ltmain_nag_pthread.diff
Themos Tsikas a8fc30f95a configury: Make more robust in finding NAG Fortran Compiler
The NAG Fortran check only matched "nagfor" exactly, and failed if a
path to nagfor was provided.  Also change "-pthread" into
"-Wl,-pthread".

Signed-off-by: Themos Tsikas <themos.tsikas@nag.co.uk>
Signed-off-by: Jeff Squyres <jsquyres@cisco.com>
2018-03-02 10:50:37 -08:00

19 строки
874 B
Diff

--- config/ltmain.sh
+++ config/ltmain.sh
@@ -6417,8 +6417,14 @@
func_source "$lib"
# Convert "-framework foo" to "foo.ltframework"
+ # and "-pthread" to "-Wl,-pthread" if NAG compiler
if test -n "$inherited_linker_flags"; then
- tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ case "$CC" in
+ *nagfor*)
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g' | $SED 's/-pthread/-Wl,-pthread/g'`;;
+ *)
+ tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`;;
+ esac
for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
case " $new_inherited_linker_flags " in
*" $tmp_inherited_linker_flag "*) ;;