[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: |
Tue, 9 Aug 2005 15:48:09 +0200 |
User-agent: |
Mutt/1.4.1i |
* Peter O'Gorman wrote on Sun, Jul 24, 2005 at 02:20:29PM CEST:
>
> Okay, whatever, I applied these three patches.
>
> 2005-07-23 Peter O'Gorman <address@hidden>
>
> * m4/libtool.m4 (CXX, archive_cmds) [sun]: Add -lCstd, -lCrun
> and -lc for c++ builds with Sun C++ and Centerline C++..
> Reported by Albert Chin-A-Young <address@hidden>
Now while I cannot thank you guys enough for finally fixing this,
you missed a bit. :->
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. :-/
Have I missed something?
Cheers,
Ralf
> Index: m4/libtool.m4
> ===================================================================
> RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
> retrieving revision 1.203
> diff -u -3 -p -u -r1.203 libtool.m4
> --- m4/libtool.m4 11 Jul 2005 12:11:25 -0000 1.203
> +++ m4/libtool.m4 24 Jul 2005 12:12:03 -0000
> @@ -5542,10 +5542,12 @@ if test "$_lt_caught_CXX_error" != yes;
> case $cc_basename in
> 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} -nolib
> -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects
> $compiler_flags'
> + _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~
> - $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp
> -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects
> $compiler_flags~$RM $lib.exp'
> + $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o
> $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM
> $lib.exp'
>
> _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir'
> _LT_TAGVAR(hardcode_shlibpath_var, $1)=no
> @@ -5565,15 +5567,7 @@ if test "$_lt_caught_CXX_error" != yes;
> esac
> _LT_TAGVAR(link_all_deplibs, $1)=yes
>
> - # Commands to make compiler produce verbose output that lists
> - # what "hidden" libraries, object files and flags are used when
> - # linking a shared library.
> - #
> - # There doesn't appear to be a way to prevent this compiler from
> - # explicitly linking system object files so we need to strip them
> - # from the output so that they don't get included in the library
> - # dependencies.
> - output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v
> conftest.$objext 2>&1 | $GREP "\-[[LR]]"`; list=""; for z in $templist; do
> case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list
> $z";;esac; done; $ECHO "X$list" | $Xsed'
> + output_verbose_link_cmd='echo'
>
> # Archives containing C++ object files must be created using
> # "CC -xar", where "CC" is the Sun C++ compiler. This is
- Re: solaris archive_cmds change for sun CC c++ compiler,
Ralf Wildenhues <=