From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26120 invoked by alias); 28 Dec 2002 06:50:47 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 26102 invoked from network); 28 Dec 2002 06:50:47 -0000 Received: from unknown (HELO lacrosse.corp.redhat.com) (66.187.233.200) by 209.249.29.67 with SMTP; 28 Dec 2002 06:50:47 -0000 Received: from free.redhat.lsd.ic.unicamp.br (aoliva2.cipe.redhat.com [10.0.1.156]) by lacrosse.corp.redhat.com (8.11.6/8.9.3) with ESMTP id gBS6oWY17594; Sat, 28 Dec 2002 01:50:33 -0500 Received: from free.redhat.lsd.ic.unicamp.br (localhost.localdomain [127.0.0.1]) by free.redhat.lsd.ic.unicamp.br (8.12.6/8.12.6) with ESMTP id gBS6oWMK032209; Sat, 28 Dec 2002 04:50:32 -0200 Received: (from aoliva@localhost) by free.redhat.lsd.ic.unicamp.br (8.12.6/8.12.6/Submit) id gBS6oW0q032205; Sat, 28 Dec 2002 04:50:32 -0200 To: Nathanael Nerode Cc: gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com, binutils@sources.redhat.com, dj@redhat.com Subject: Re: (top level patch) Autoconfiscate. (Woo!) References: <20021228035943.GA3173@doctormoo> From: Alexandre Oliva Organization: GCC Team, Red Hat Date: Fri, 27 Dec 2002 23:07:00 -0000 In-Reply-To: <20021228035943.GA3173@doctormoo> Message-ID: User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-SW-Source: 2002-12/txt/msg00700.txt.bz2 On Dec 28, 2002, Nathanael Nerode wrote: > Canadian cross (host=i386-cygwin, target=powerpc-eabisim) produced a Makefile > with no significant differences. There was a set of spurious differences: > I didn't have all the "i386-cygwin-foo" and "powerpc-eabi-foo" tools in place. > Autoconf actually checks to see if they're present, and if they're not, > defaults to the unprefixed 'foo' tools. This is a mistake. You could end up thinking you built tools for one platform but that will actually work on your native platform. Please arrange for host and target tools not to be too smart in this regard, and actually not go for unprefixed unless we know we don't really need a cross. > +# _NCN_TOOL_PREFIXES: Some stuff that oughtta be done in AC_CANONICAL_SYSTEM Would you mind renaming the _NCN macros to say _TOPLEV or so? Nothing personal, it's just... Well... You understand, don't you? :-) > +# clear some things potentially inherited from environment. > + > +enable_threads=no > +enable_shared=no > +enable_libstdcxx_v3=yes I'm not sure this is actually necessary. Traditionally, configure scripts have taken --with/--enable arguments from the environment too, even if it's just because such variables are not cleaned up. I don't really see a reason to override this behavior. > + PATH=$PATH:${PWD=`${PWDCMD-pwd}`} ; export PATH Huh? Any idea why we need this? (I realize it's inherited from the old configure, but it would be nice if we could get rid of this at some point. It is *so* wrong!) > +# Export original configure arguments for use by sub-configures. > +TOPLEVEL_CONFIGURE_ARGUMENTS="$progname $@" > +export TOPLEVEL_CONFIGURE_ARGUMENTS We probably need some additional quoting here, such that arguments with shell metacharacters and blanks in arguments don't end up being mis-interpreted. Problems from this change (still in configure) have already started showing up, when people used blank as a separator for --enable-languages. > -# On Canadian crosses, configure reads CC_FOR_TARGET from Makefile, > -# if Makefile exists. Prevent $(FLAGS_FOR_TARGET) from being duplicated. > -case $CC_FOR_TARGET in > -*' $(FLAGS_FOR_TARGET)') ;; > -*) CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' ;; > -esac > +CC_FOR_TARGET=$CC_FOR_TARGET' $(FLAGS_FOR_TARGET)' Hmm... I wonder if this can really be taken out. I believe that, when Makefile runs ./config.status --recheck, it may pass CC_FOR_TARGET down with $(FLAGS_FOR_TARGET) in the environment. I'm pretty sure this is the case with ${STAGE_CC_WRAPPER}, because I've seen the number of occurrences thereof grow overtime. Worth a test, touching configure so that Makefile reruns it. None of the changes are show-stoppers, IMHO, even though I consider the first point quite critical. Anyhow, I think it's reasonable to address all of these points in separate patches. Please go ahead and check this patch in. Thanks! -- Alexandre Oliva Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/ Red Hat GCC Developer aoliva@{redhat.com, gcc.gnu.org} CS PhD student at IC-Unicamp oliva@{lsd.ic.unicamp.br, gnu.org} Free Software Evangelist Professional serial bug killer