[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: solaris archive_cmds change for sun CC c++ compiler
From: |
Ralf Wildenhues |
Subject: |
Re: solaris archive_cmds change for sun CC c++ compiler |
Date: |
Thu, 11 Aug 2005 18:27:00 +0200 |
User-agent: |
Mutt/1.4.1i |
* Ralf Wildenhues wrote on Tue, Aug 09, 2005 at 03:48:09PM CEST:
>
> These patch actually do not work, except by accident, as they set
> postdeps before _LT_SYS_HIDDEN_LIBDEPS is called (and thus potentially
> overwritten).
>
> Since the system-dependent output_verbose_link_cmd needs to be set
> before _LT_SYS_HIDDEN_LIBDEPS can be called, I guess we need to override
> postdeps after calling _LT_SYS_HIDDEN_LIBDEPS then. Another system-
> dependent "case" statement. :-/
Hmm. While looking at this, I noted that _LT_SYS_HIDDEN_LIBDEPS will be
broken for Fortran as well: there, the respective variables are set
after the macro is called, in _LT_LINKER_SHLIBS (actually, there aren't
any useful values of output_verbose_link_cmds there just yet, but there
will be: Solaris Fortran compilers need it as well). This might make
some more reorganization necessary.
The patches below only fix the behavior for C++, putting in case
statements for systems because it's pretty clear they will be expanded.
OK to apply them to respective branches (and the TODO update to HEAD)?
Regards,
Ralf
HEAD / branch-2-0:
* m4/libtool.m4 [sun, CC] (_LT_LANG_CXX_CONFIG): Move postdeps
override ..
(_LT_SYS_HIDDEN_LIBDEPS): ..here, so they actually override.
* TODO: Updated.
Index: TODO
===================================================================
RCS file: /cvsroot/libtool/libtool/TODO,v
retrieving revision 1.68
diff -u -r1.68 TODO
--- TODO 27 Apr 2005 03:26:59 -0000 1.68
+++ TODO 10 Aug 2005 21:35:18 -0000
@@ -73,11 +73,8 @@
together with a compiler which does not understand `-c -o'.
Reported by Marcin Siennicki.
-* Fix -no-undefined with Solaris CC,f77. Maybe look at implementing something
- along the idea of [support #103719] for CC.
- Reported by Ralf Menzel <address@hidden>,
- Пухальский Юрий Андреевич <address@hidden>,
- Albert Chin <address@hidden> and others.
+* Look at better -no-undefined support, maybe along the idea of
+ [support #103719] for CC.
1.2. libtldl
Index: m4/libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.209
diff -u -r1.209 libtool.m4
--- m4/libtool.m4 10 Aug 2005 06:25:10 -0000 1.209
+++ m4/libtool.m4 10 Aug 2005 21:35:18 -0000
@@ -5551,7 +5551,6 @@
CC*)
# Sun C++ 4.2, 5.x and Centerline C++
_LT_TAGVAR(archive_cmds_need_lc,$1)=yes
- _LT_TAGVAR(postdeps,$1)='-lCstd -lCrun'
_LT_TAGVAR(no_undefined_flag, $1)=' -zdefs'
_LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}
-h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects
$compiler_flags'
_LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" >
$lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local:
*; };" >> $lib.exp~
@@ -5833,6 +5832,18 @@
fi
$RM -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+m4_if([$1], [CXX],
+[case $host_os in
+solaris*)
+ case $cc_basename in
+ CC*)
+ _LT_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+ ;;
+ esac
+esac
+])
case " $_LT_TAGVAR(postdeps, $1) " in
*" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;;
branch-1-5:
* libtool.m4 [sun, CC] (AC_LIBTOOL_LANG_CXX_CONFIG): Move
postdeps override ..
(AC_LIBTOOL_POSTDEP_PREDEP): ..here, so they actually override.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtool.m4,v
retrieving revision 1.314.2.99
diff -u -r1.314.2.99 libtool.m4
--- libtool.m4 10 Aug 2005 06:26:05 -0000 1.314.2.99
+++ libtool.m4 10 Aug 2005 21:35:07 -0000
@@ -3476,7 +3476,6 @@
CC*)
# Sun C++ 4.2, 5.x and Centerline C++
_LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes
- _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
_LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs'
_LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag}
-h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects
$compiler_flags'
_LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" >
$lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo
"local: *; };" >> $lib.exp~
@@ -3736,6 +3735,18 @@
fi
$rm -f confest.$objext
+
+# PORTME: override above test on systems where it is broken
+ifelse([$1],[CXX],
+[case $host_os in
+solaris*)
+ case $cc_basename in
+ CC*)
+ _LT_AC_TAGVAR(postdeps,$1)='-lCstd -lCrun'
+ ;;
+ esac
+esac
+])
case " $_LT_AC_TAGVAR(postdeps, $1) " in
*" -lc "*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;;