bug-libtool
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Missing LDFLAGS in libtool


From: Neil Kirr
Subject: Missing LDFLAGS in libtool
Date: Sat, 08 Oct 2005 13:40:58 -0400

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]