This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: (top level patch) Autoconfiscate. (Woo!)


On Dec 28, 2002, Nathanael Nerode <neroden@twcny.rr.com> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]