libtool-patches
[Top][All Lists]
Advanced

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

Re: Using getconf to set max_cmd_len


From: Peter O'Gorman
Subject: Re: Using getconf to set max_cmd_len
Date: Fri, 01 Jun 2007 01:42:11 -0500

On Thu, 2007-05-31 at 08:08 +0200, Paolo Bonzini wrote:
> Steve Ellcey wrote:
> > While integrating a newer libtool into GCC, an issue arose with what
> > value libtool was setting max_cmd_len to.  This patch uses 'getconf
> > ARG_MAX' to set lt_cv_sys_max_cmd_len instead of going through a loop to
> > try and divine the right value, this should give a more accurate value
> > and should be faster too.  getconf is a Posix command that most
> > platforms have and we drop into the old behaviour if it doesn't exist.
> > 
> > I originally thought about putting the getconf call before the case
> > statement (thus skipping the special case handling if getconf exists),
> > but then I thought it would be better to put the getconf usage into the
> > generic case only so that people could still have special case targets
> > if they wanted to avoid using getconf.  If the special case targets want
> > to use getconf they can just delete their entry from the case statement
> > and fall into the generic case.
> 
> This patch is okay for gcc and src also before Peter puts it in libtool.
> 

I applied it to HEAD and branch-1-5 on the theory that if it is broken
somewhere then we'll hear about it and can add it to the case statement
above. The time saved in configure is surely worth it.

By the way, at least osf5 'getconf ARG_MAX' returns a result that is not
at all related to the real arg max (but osf is already special cased,
so...)

Peter




reply via email to

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