Hello.
I was trying to build libtool with a STATIC lib_gcc instead of the evil
shared libgcc_s.so. To my surprise I found that I had to edit this file in
order for it to build the shared libraries with the --static-libgcc:
../libtool-1.5.20/libltdl/libtool
I had to add the following to all of the lines with archive_cmds= and
archive_expsym_cmds= (there were 6):
WAS:
archive_cmds="\$CC -shared \${wl}-h \${wl}\$soname -o \$lib \$libobjs
\$deplibs \$compiler_flags"
archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$lib.exp~cat
\$export_symbols | \$SED -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >>
\$lib.exp~\$echo \\\"local: *; };\\\" >> \$lib.exp~
\$CC -shared \${wl}-M \${wl}\$lib.exp \${wl}-h \${wl}\$soname -o
\$lib \$libobjs \$deplibs \$compiler_flags~\$rm \$lib.exp"
ADDED \$LDFLAGS:
archive_cmds="\$CC -shared \${wl}-h \${wl}\$soname -o \$lib \$libobjs
\$deplibs \$compiler_flags \$LDFLAGS"
archive_expsym_cmds="\$echo \\\"{ global:\\\" > \$lib.exp~cat
\$export_symbols | \$SED -e \\\"s/\\\\(.*\\\\)/\\\\1;/\\\" >>
\$lib.exp~\$echo \\\"local: *; };\\\" >> \$lib.exp~
\$CC -shared \${wl}-M \${wl}\$lib.exp \${wl}-h \${wl}\$soname -o
\$lib \$libobjs \$deplibs \$compiler_flags~\$rm \$lib.exp \$LDFLAGS"
This correctly compiles using the --static-libgcc flag (assuming the user
set their LDFLAGS environment variable). This was on Solaris 9.
This should be corrected. Thanks!
- Neil
_______________________________________________
Bug-libtool mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-libtool