From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25636 invoked by alias); 1 Nov 2007 17:15:23 -0000 Received: (qmail 25503 invoked by uid 48); 1 Nov 2007 17:15:14 -0000 Date: Thu, 01 Nov 2007 17:15:00 -0000 Message-ID: <20071101171514.25502.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug bootstrap/33781] [4.3 Regression] "Arg list too long" building libgcc.a In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "roger at eyesopen dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2007-11/txt/msg00049.txt.bz2 ------- Comment #4 from roger at eyesopen dot com 2007-11-01 17:15 ------- Thanks to both Jakub and DJ for their help. I just tried out the suggested patch on my IRIX box, and was surprised that it didn't resolve the error. My apologies that my initial analysis might have been wrong (or incomplete), but it looks like the error occurs earlier on the same command line. Not only does, objects="$(objects)" ; $(AR_CREATE_FOR_TARGET) $@ $$objects Infact, stripping the command back to just objects="$(objects)" is enough to trigger the error. Hoping that this was perhaps a limitation of IRIX's /bin/sh, I've tried again with SHELL=/usr/local/bin/bash but alas I get the same error. make: execvp: /usr/local/bin/bash: Arg list too long So it's not a bound on argc or the number of entries in argv[] that's the problem, but a hard limitation on command line length. So it looks like we can't even assign $objects yet alone use it, either directly or looping over it to use xargs. Perhaps we could do something with "find". Just a wild guess here as I don't understand build machinery but something like: find . -name '*.o' -exec ar rc libgcc.a {} \; And then test afterwards if test ! -f libgcc.a ; then {the eh_dummy.o stuff to avoid empty libgcc.a} ; fi I'm not sure why I'm seeing this. There mustn't be many IRIX testers for mainline and either MIPS is building more objects than other platforms (for saturating and fixed point math) or most OSes are less "restricted" than IRIX. Many thanks again for peoples help. Is "find" portable, or is there a better way to achieve the same thing without ever placing all of the filenames on a single command line? Sorry for any inconvenience. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33781