Skip to content
Snippets Groups Projects
Commit d298e20e authored by Thomas Jahns's avatar Thomas Jahns :cartwheel:
Browse files

configure: Generalize compiler-specific libtool work-around.

parent f705dea1
No related branches found
No related tags found
No related merge requests found
...@@ -94,13 +94,13 @@ EXTRA_DIST = util/sunf95preproc-wrapper \ ...@@ -94,13 +94,13 @@ EXTRA_DIST = util/sunf95preproc-wrapper \
contrib/02nagfor53-shared-patch/README.txt \ contrib/02nagfor53-shared-patch/README.txt \
contrib/02nagfor53-shared-patch/nagfor53-shared.patch \ contrib/02nagfor53-shared-patch/nagfor53-shared.patch \
contrib/03ltmain-ld-groups-patch/README \ contrib/03ltmain-ld-groups-patch/README \
contrib/03ltmain-ld-groups-patch/ltmain-ld-groups-libtool-2.4.6.patch \
contrib/03ltmain-ld-groups-patch/ltmain-ld-groups-libtool-2.4.2.patch \ contrib/03ltmain-ld-groups-patch/ltmain-ld-groups-libtool-2.4.2.patch \
contrib/03ltmain-ld-groups-patch/ltmain-ld-groups-libtool-2.4.6.patch \
contrib/04ltmain-xlinker-patch/README \ contrib/04ltmain-xlinker-patch/README \
contrib/04ltmain-xlinker-patch/ltmain-xlinker-patch.patch \ contrib/04ltmain-xlinker-patch/ltmain-xlinker-patch.patch \
contrib/05macos-nagfor-patch/macos-nagfor-libtool-2.4.2.patch \ contrib/05macos-nagfor-patch/macos-nagfor-libtool-2.4.2.patch \
contrib/05macos-nagfor-patch/macos-nagfor.patch \ contrib/05macos-nagfor-patch/macos-nagfor-libtool-2.4.6.patch \
contrib/06ltmain_nag_pthread-patch/ltmain_nag_pthread.patch \ contrib/06ltmain_nag_pthread-patch/ltmain_nag_pthread-libtool-2.4.6.patch \
contrib/06ltmain_nag_pthread-patch/ltmain_nag_pthread-libtool-2.4.2.patch \ contrib/06ltmain_nag_pthread-patch/ltmain_nag_pthread-libtool-2.4.2.patch \
contrib/07ltmain-early-xcompile-patch/README \ contrib/07ltmain-early-xcompile-patch/README \
contrib/07ltmain-early-xcompile-patch/ltmain-early-xcompile-libtool-2.4.6.patch \ contrib/07ltmain-early-xcompile-patch/ltmain-early-xcompile-libtool-2.4.6.patch \
......
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision"
verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision"
+ # On Darwin other compilers + # On Darwin other compilers
+ case $with_nagfor in + case $compiler_lineage in
+ yes) + NAG)
+ verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" + verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
+ ;; + ;;
+ *) + *)
......
...@@ -6,8 +6,8 @@ ...@@ -6,8 +6,8 @@
# On Darwin other compilers # On Darwin other compilers
- case $CC in - case $CC in
- nagfor*) - nagfor*)
+ case $with_nagfor in + case $compiler_lineage in
+ yes) + NAG)
verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision"
;; ;;
*) *)
--- a/config/ltmain.sh --- a/config/ltmain.sh
+++ b/config/ltmain.sh +++ b/config/ltmain.sh
@@ -6490,6 +6490,12 @@ func_mode_link () @@ -6490,6 +6490,17 @@ func_mode_link ()
# Convert "-framework foo" to "foo.ltframework" # Convert "-framework foo" to "foo.ltframework"
if test -n "$inherited_linker_flags"; then if test -n "$inherited_linker_flags"; then
tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ +
+ # Additionally convert " -pthread" to " -Wl,-pthread" for nagfor + # Additionally convert " -pthread" to " -Wl,-pthread" for nagfor
+ if test yes = "$with_nagfor" ; then + case $compiler_lineage in #(
+ tmp_inherited_linker_flags=`$ECHO " $tmp_inherited_linker_flags " | $SED 's/ -pthread[[:blank:]]/ -Wl,-pthread /g'` + NAG)
+ fi + tmp_inherited_linker_flags=`$ECHO " $tmp_inherited_linker_flags " | $SED 's/ -pthread[[:blank:]]/ -Wl,-pthread /g'`
+ ;; #(
+ PGI)
+ tmp_inherited_linker_flags=`$ECHO " $tmp_inherited_linker_flags " | $SED 's/ -pthread[[:blank:]]//g'`
+ ;;
+ esac
+ +
for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
case " $new_inherited_linker_flags " in case " $new_inherited_linker_flags " in
*" $tmp_inherited_linker_flag "*) ;; *" $tmp_inherited_linker_flag "*) ;;
@@ -8084,6 +8090,20 @@ EOF @@ -8084,6 +8090,22 @@ EOF
;; ;;
esac esac
...@@ -27,9 +32,11 @@ ...@@ -27,9 +32,11 @@
+ # better not to revert the changes, otherwise, uncomment the following + # better not to revert the changes, otherwise, uncomment the following
+ # lines. + # lines.
+ +
+ if test yes = "$with_nagfor" ; then + case $compiler_lineage in #(
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags " | $SED 's/ -Wl,-pthread / -pthread /g;s/^ *//;s/ *$//'` + NAG)
+ fi + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags " | $SED 's/ -Wl,-pthread / -pthread /g;s/^ *//;s/ *$//'`
+ ;;
+ esac
+ +
# move library search paths that coincide with paths to not yet # move library search paths that coincide with paths to not yet
# installed libraries to the beginning of the library search list # installed libraries to the beginning of the library search list
......
--- a/config/ltmain.sh --- a/config/ltmain.sh
+++ b/config/ltmain.sh +++ b/config/ltmain.sh
@@ -7936,6 +7936,12 @@ func_mode_link () @@ -7936,6 +7936,17 @@ func_mode_link ()
# Convert "-framework foo" to "foo.ltframework" # Convert "-framework foo" to "foo.ltframework"
if test -n "$inherited_linker_flags"; then if test -n "$inherited_linker_flags"; then
tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'`
+ +
+ # Additionally convert " -pthread" to " -Wl,-pthread" for nagfor + # Additionally convert " -pthread" to " -Wl,-pthread" for nagfor
+ if test yes = $with_nagfor ; then + case $compiler_lineage in #(
+ tmp_inherited_linker_flags=`$ECHO " $tmp_inherited_linker_flags " | $SED 's/ -pthread[[:blank:]]/ -Wl,-pthread /g'` + NAG)
+ fi + tmp_inherited_linker_flags=`$ECHO " $tmp_inherited_linker_flags " | $SED 's/ -pthread[[:blank:]]/ -Wl,-pthread /g'`
+ ;; #(
+ PGI)
+ tmp_inherited_linker_flags=`$ECHO " $tmp_inherited_linker_flags " | $SED 's/ -pthread[[:blank:]]//g'`
+ ;;
+ esac
+ +
for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do
case " $new_inherited_linker_flags " in case " $new_inherited_linker_flags " in
*" $tmp_inherited_linker_flag "*) ;; *" $tmp_inherited_linker_flag "*) ;;
@@ -9570,6 +9577,20 @@ EOF @@ -9570,6 +9577,22 @@ EOF
;; ;;
esac esac
...@@ -27,9 +32,11 @@ ...@@ -27,9 +32,11 @@
+ # better not to revert the changes, otherwise, uncomment the following + # better not to revert the changes, otherwise, uncomment the following
+ # lines. + # lines.
+ +
+ if test yes = $with_nagfor ; then + case $compiler_lineage in #(
+ new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags " | $SED 's/ -Wl,-pthread / -pthread /g;s/^ *//;s/ *$//'` + NAG)
+ fi + new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags " | $SED 's/ -Wl,-pthread / -pthread /g;s/^ *//;s/ *$//'`
+ ;;
+ esac
+ +
# move library search paths that coincide with paths to not yet # move library search paths that coincide with paths to not yet
# installed libraries to the beginning of the library search list # installed libraries to the beginning of the library search list
......
...@@ -125,14 +125,22 @@ dnl newer PGI or NAG configurations particularly well ...@@ -125,14 +125,22 @@ dnl newer PGI or NAG configurations particularly well
[m4_pushdef(acx_ltconfig,m4_bpatsubst(m4_dquote( [m4_pushdef(acx_ltconfig,m4_bpatsubst(m4_dquote(
m4_bpatsubst(m4_dquote(m4_defn(acx_ltconfig)),[_LT_TAG_COMPILER m4_bpatsubst(m4_dquote(m4_defn(acx_ltconfig)),[_LT_TAG_COMPILER
], ],
[\& _LT_TAGDECL([with_nagfor], [acx_is_nagfor], [0], [Is the compiler the NAG Fortran compiler?])])), [\& _LT_TAGDECL([compiler_lineage], [acx_compiler_lineage], [0], [For inherited options, we need to know how to deal with those when using a library built with compiler X in compiler Y.])])),
[_LT_CONFIG], [_LT_CONFIG],
[AC_MSG_CHECKING([whether this is the NAG Fortran compiler]) [AC_MSG_CHECKING([for the compiler family])
$CC -V 2>&1 | grep '^NAG Fortran Compiler Release' >/dev/null 2>&1 case `$CC -V 2>&1 | sed -n '1,20p'` in #(
_lt_result=$? *NAG\\ Fortran\\ Compiler\\ Release*\)
AS_IF([test $_lt_result -eq 0],[_lt_result=yes],[_lt_result=no]) _lt_result=NAG
;; #(
*PGI\\ Compilers\\ and\\ Tools*|*Portland\\ *\)
_lt_result=PGI
;;
*\)
_lt_result=other
;;
esac
AC_MSG_RESULT([$_lt_result]) AC_MSG_RESULT([$_lt_result])
_LT_TAGVAR([acx_is_nagfor], $][1)=$_lt_result _LT_TAGVAR([acx_compiler_lineage], $][1)=$_lt_result
\&]))])dnl \&]))])dnl
LT_INIT([$1]) LT_INIT([$1])
m4_popdef([_LT_LANG_F77_CONFIG])dnl m4_popdef([_LT_LANG_F77_CONFIG])dnl
...@@ -164,7 +172,8 @@ dnl only causes overhead and potential problems. ...@@ -164,7 +172,8 @@ dnl only causes overhead and potential problems.
[AC_LANG_CASE([Fortran],[m4_pushdef([acx_flags_var],[FCFLAGS])m4_pushdef([acx_lt_tag],[FC])], [AC_LANG_CASE([Fortran],[m4_pushdef([acx_flags_var],[FCFLAGS])m4_pushdef([acx_lt_tag],[FC])],
[Fortran 77],[m4_pushdef([acx_flags_var],[FFLAGS])m4_pushdef([acx_lt_tag],[F77])], [Fortran 77],[m4_pushdef([acx_flags_var],[FFLAGS])m4_pushdef([acx_lt_tag],[F77])],
[C],[m4_pushdef([acx_flags_var],[CFLAGS])m4_pushdef([acx_lt_tag],[])])dnl [C],[m4_pushdef([acx_flags_var],[CFLAGS])m4_pushdef([acx_lt_tag],[])])dnl
AS_IF([test x"$_LT_TAGVAR([acx_is_nagfor],m4_defn([acx_lt_tag]))" = xyes], AS_CASE([$_LT_TAGVAR([acx_compiler_lineage],m4_defn([acx_lt_tag]))],
[NAG],
[AS_CASE([" $acx_flags_var $LDFLAGS "], [AS_CASE([" $acx_flags_var $LDFLAGS "],
[*\ -B*\ *], [*\ -B*\ *],
[extrasub="${extrasub+$extrasub$as_nl}/^\# skip internal symbols for stubs created by xlf/i \\\\${as_nl}\# ignore symbols nagfor injects into our shared objects\\\\${as_nl}/"'^${exp_sym_prefix}'"${acx_symprfx}"'(__NAGf90_|f90_)/b' [extrasub="${extrasub+$extrasub$as_nl}/^\# skip internal symbols for stubs created by xlf/i \\\\${as_nl}\# ignore symbols nagfor injects into our shared objects\\\\${as_nl}/"'^${exp_sym_prefix}'"${acx_symprfx}"'(__NAGf90_|f90_)/b'
......
...@@ -83,8 +83,8 @@ case "$libtoolversion" in ...@@ -83,8 +83,8 @@ case "$libtoolversion" in
contrib/01aix-deplib-rpath-patch/aix-deplib-libtool.patch \ contrib/01aix-deplib-rpath-patch/aix-deplib-libtool.patch \
contrib/03ltmain-ld-groups-patch/ltmain-ld-groups-libtool-2.4.6.patch \ contrib/03ltmain-ld-groups-patch/ltmain-ld-groups-libtool-2.4.6.patch \
contrib/04ltmain-xlinker-patch/ltmain-xlinker-patch.patch \ contrib/04ltmain-xlinker-patch/ltmain-xlinker-patch.patch \
contrib/05macos-nagfor-patch/macos-nagfor.patch \ contrib/05macos-nagfor-patch/macos-nagfor-libtool-2.4.6.patch \
contrib/06ltmain_nag_pthread-patch/ltmain_nag_pthread.patch \ contrib/06ltmain_nag_pthread-patch/ltmain_nag_pthread-libtool-2.4.6.patch \
contrib/07ltmain-early-xcompile-patch/ltmain-early-xcompile-libtool-2.4.6.patch \ contrib/07ltmain-early-xcompile-patch/ltmain-early-xcompile-libtool-2.4.6.patch \
contrib/08ltmain-parallel-printf-patch/ltmain-parallel-printf-libtool-2.4.6.patch \ contrib/08ltmain-parallel-printf-patch/ltmain-parallel-printf-libtool-2.4.6.patch \
contrib/09debian-no-overlink-patch/deplib_binary.patch \ contrib/09debian-no-overlink-patch/deplib_binary.patch \
......
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