libtool
[Top][All Lists]
Advanced

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

Re: Fix for Arg list too long


From: Robert Boehne
Subject: Re: Fix for Arg list too long
Date: Tue, 12 Dec 2000 13:35:49 -0600

Libtool developers:

Using the multi-language-branch as a starting point, I have a working
"libtool" script that incrementally links libraries to prevent running
into limits of the shell.  Now I need to clean up the implementation and
auto-generate the proper configuration.  I have defined two new shell
variables in libtool, ${incr_archive_cmds} and ${old_incr_archive_cmds},
which
are used instead of ${archive_cmds}/${old_archive_cmds} when
${max_cmd_len} is less
than the length of the expanded "${archive_cmds}/${old_archive_cmds}".
Since ${max_cmd_len} is not compiler-dependent, where should it be
defined?

The value can be determined with a short C program such as this:

#include <stdio.h>
#ifdef HAVE_LIMITS_H
# include <limits.h>
#endif
#ifdef HAVE_SYS_PARAM_H
# include <sys/param.h>
#endif

int main() {
#if defined(ARG_MAX)
  printf("ARG_MAX is %i\n", ARG_MAX);
#elif defined(NCARGS)
  printf("NCARGS is %i\n", NCARGS);
#else
  printf("neither %i\n",-1);
#endif
  return (0);
}

Should I define an autoconf macro with similar C code to determine the
command length, or should I just put this in configure.in?

In my current implementation, the old method of linking is used unless
${incr_archive_cmds} is defined AND the command is too long for the
shell.
I was considering setting ${max_cmd_len} to -1 on systems with no limit,
but it seems to be redundant if ${incr_archive_cmds} is not defined,
agree?

I would like a bit of guidance since I seem to be hacking at the core
here.

RMS suggested that it may be better to have libtool read commands from
a file, could one of the maintainers comment on that?

Thanks,

Robert

-- 
Robert Boehne             Software Engineer
Ricardo Software   Chicago Technical Center
TEL: (630)789-0003 x. 238
FAX: (630)789-0127
email:  address@hidden



reply via email to

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