Commit b9c5ed79 authored by Hendryk Bockelmann's avatar Hendryk Bockelmann
Browse files

add libtool patch from Sergey Kosukhin to prevent duplicate -fopenmp flag

parent a1bedf14
......@@ -20,4 +20,4 @@ verlte $libtool_version 2.4.2 && {
touch -r m4/ltversion.m4 m4/libtool.m4
}
exit 0
patch --forward --no-backup-if-mismatch -p0 -s -l < maint/ltmain.sh.patch
--- config/ltmain.sh 2018-07-18 09:43:57.970408086 +0200
+++ config/ltmain.sh.patched 2018-07-18 09:48:08.236884128 +0200
@@ -8539,11 +8539,33 @@
fi # linkmode = lib
done # for deplib in $libs
if test link = "$pass"; then
- if test prog = "$linkmode"; then
- compile_deplibs="$new_inherited_linker_flags $compile_deplibs"
- finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs"
- else
- compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ # Avoid duplication of the flags
+ if test -n "$new_inherited_linker_flags"; then
+ if test prog = "$linkmode"; then
+ tmp_inherited_linker_flags_compile_deplibs=
+ tmp_inherited_linker_flags_finalize_deplibs=
+ for new_inherited_linker_flag in $new_inherited_linker_flags; do
+ case "$compile_command " in
+ *" $new_inherited_linker_flag "*) ;;
+ *) func_append tmp_inherited_linker_flags_compile_deplibs " $new_inherited_linker_flag" ;;
+ esac
+ case "$finalize_command " in
+ *" $new_inherited_linker_flag "*) ;;
+ *) func_append tmp_inherited_linker_flags_finalize_deplibs " $new_inherited_linker_flag" ;;
+ esac
+ done
+ compile_deplibs="$tmp_inherited_linker_flags_compile_deplibs $compile_deplibs"
+ finalize_deplibs="$tmp_inherited_linker_flags_finalize_deplibs $finalize_deplibs"
+ else
+ tmp_inherited_linker_flags_compiler_flags=
+ for new_inherited_linker_flag in $new_inherited_linker_flags; do
+ case "$compiler_flags " in
+ *" $new_inherited_linker_flag "*) ;;
+ *) func_append tmp_inherited_linker_flags_compiler_flags " $new_inherited_linker_flag" ;;
+ esac
+ done
+ compiler_flags="$compiler_flags "`$ECHO " $tmp_inherited_linker_flags_compiler_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'`
+ fi
fi
fi
dependency_libs=$newdependency_libs
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment