This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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: [RFC] More changes on how to get the target tools


On Thu, Oct 13, 2005 at 06:29:23PM +0200, Paolo Bonzini wrote:
> I have come to the conclusion that the way we detect target tools is 
> overengineered, and that the right way to fix the PR is, on the 
> contrary, to detect *all* the target tools (assemblers, compilers, etc.) 
> in configure.in.  I think we should just *know* that we already compiled 
> an in-tree "as" whenever we need AS_FOR_TARGET!  The same holds for 
> build tools (bison, flex, m4), but for target tools it is also a 
> correctness issue: if we ever need to mix up an "old" AS_FOR_TARGET and 
> a "new" AS_FOR_TARGET, I think we are doing something wrong.

I am not entirely sure what you're trying to do with this patch, but
bits of it look very strange...

> +AC_CHECK_PROGS([FLEX], [flex], [$MISSING flex])
> +if test -d flex; then
> +  FLEX='$$r/$(BUILD_SUBDIR)/flex/flex'
> +  LEX='$$r/$(BUILD_SUBDIR)/flex/flex'
> +fi

This is configure.in.  Why should the flex subdir exist now?  Do you
want ${srcdir}/flex?  Similarly many other places.

> +# When building target libraries, we use the same toolchain as the compiler
> +# we just built.
> +case " $configdirs " in
> +  *" gcc "*)
> +    COMPILER_AS_FOR_TARGET='$$r/gcc/as'
> +    COMPILER_LD_FOR_TARGET='$$r/gcc/collect-ld'
> +    COMPILER_NM_FOR_TARGET='$$r/gcc/nm'${extra_nmflags_for_target}
> +    COMPILER_OBJDUMP_FOR_TARGET='$$r/gcc/objdump'
> +    ;;
> +  *)
> +    COMPILER_AS_FOR_TARGET='$(AS_FOR_TARGET)'
> +    COMPILER_LD_FOR_TARGET='$(LD_FOR_TARGET)'
> +    COMPILER_NM_FOR_TARGET='$(NM_FOR_TARGET)'
> +    COMPILER_OBJDUMP_FOR_TARGET='$(OBJDUMP_FOR_TARGET)'
> +    ;;
> +esac

What guarantees the creation of gcc/objdump?  Nothing, I think.

-- 
Daniel Jacobowitz
CodeSourcery, LLC


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