[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: arg list too long (so, split it into two?)
From: |
Gary V. Vaughan |
Subject: |
Re: arg list too long (so, split it into two?) |
Date: |
Thu, 5 Oct 2000 22:39:40 +0100 |
User-agent: |
Mutt/1.2.5i |
On Thu, Oct 05, 2000 at 02:20:17PM -0500, Robert Boehne wrote:
> I have a large library that IRIX CC w/ multi-language libtool
> is not happy creating. It seems that the link line is too
> much for CC to handle. Is the only solution to split this
> library into convience libs, then link those toghether?
>
> Let me see if I have THAT straight, in my Makefile.am
> I would need:
> # the main target
> lib_LTLIBRARIES=libTKBool.la
> # archives with about half of the needed object files each
> noinst_LTLIBRARIES = libPart1.la libPart2.la
> # Is this how I make libTKBool.la ?
> libTKBool_la_SOURCES = libPart1.la libPart2.la
> # sources for the noinst archive libraries
> libPart1_la_SOURCES = `about half of my original source files`
> libPart2_la_SOURCES = `the other half of my original source files`
> # link this library in when libTKBool.la is linked
> libTKBool_la_LIBADD = @top_srcdir@/src/TKPrim/libTKPrim.la
>
>
> L/sw5/rbo/OCC/OCC/src/TKMath/.libs -L/sw5/rbo/OCC/OCC/src/TKernel/.libs
> -lc -soname libTKBool.so.1 `test -n "sgi1.0" && echo -set_version
> sgi1.0` -update_registry .libs/so_locations -o .libs/libTKBool.so.1.0
> ../../libtool[3325]: /bin/CC: arg list too long
> make.sgi62[3]: *** [libTKBool.la] Error 1
Looks good to me!
FYI: In the past I have had success in trimming the size of the library
list by carefully not renaming libraries that are already listed as
deplibs of other libraries that are linked. That is:
libfoo.la depends on libbar.la
libbaz.la depends on libfoo.la and libbar.la
libquux.la also depends on libbaz.la etc.
If I naively link an application like this:
application_LDADD = libquux.la libbaz.la libfoo.la libbar.la
The link ine will look something like this:
gcc ... -o application ... .libs/libquux.so .libs/libbaz.so \
.libs/libfoo.so .libs/libbar.so .libs/libbaz.so .libs/libfoo.so \
.libs/libbar.so .libs/libfoo.so .libs/libbar.so .libs/libbar.so
Alternatively:
application_LDADD = libquux.la
will examine the deplibs and produce the much more managable:
gcc ... -o application ... .libs/libquux.so .libs/libbaz.so \
.libs/libfoo.so .libs/libbar.so
HTH,
Gary.
--
___ _ ___ __ _ mailto: address@hidden
/ __|__ _ _ ___ _| | / / | / /_ _ _ _ __ _| |_ __ _ ___ address@hidden
| (_ / _` | '_|// / |/ /| |/ / _` | || / _` | ' \/ _` | _ \
\___\__,_|_|\_, /|___(_)___/\__,_|\_,_\__, |_||_\__,_|//_/
home page: /___/ /___/ gpg public key:
http://www.oranda.demon.co.uk http://www.oranda.demon.co.uk/key.asc