Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dkrz-sw
sct
Commits
9c9f1a05
Commit
9c9f1a05
authored
Jan 24, 2020
by
Hendryk Bockelmann
☕
Browse files
Merge branch 'mr_redundant_patch' into 'master'
Remove redundant libtool patch. See merge request dkrz-sw/sct!4
parents
92baa032
34376c28
Changes
2
Hide whitespace changes
Inline
Side-by-side
autogen.sh
View file @
9c9f1a05
...
...
@@ -38,11 +38,6 @@ touch -r m4/ltversion.m4 m4/libtool.m4 || exit $?
patch
--forward
--no-backup-if-mismatch
-p1
-s
-l
-i
maint/ltmain.sh.nag_pthread.patch
exitcode
=
$?
;
test
$exitcode
-ne
0
&&
test
$exitcode
-ne
1
&&
exit
$exitcode
# Libtool might duplicate some of the compilation or linking flags (e.g. -fopenmp)
# when calling the actual compiler, which is considered and error by nagfor:
patch
--forward
--no-backup-if-mismatch
-p1
-s
-l
-i
maint/ltmain.sh.no_flag_duplication.patch
exitcode
=
$?
;
test
$exitcode
-ne
0
&&
test
$exitcode
-ne
1
&&
exit
$exitcode
# All went fine since we have not exited before:
exit
0
maint/ltmain.sh.no_flag_duplication.patch
deleted
100644 → 0
View file @
92baa032
--- a/config/ltmain.sh
+++ b/config/ltmain.sh
@@ -8539,11 +8539,33 @@
func_mode_link ()
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment