On Thu, Dec 22, 2005 at 11:39:20AM -0500, Daniel Jacobowitz wrote: > On Thu, Dec 22, 2005 at 05:34:14PM +0100, Gunther Nikl wrote: > > Hello! > > > > The new scheme to select target tools breaks building GCC for me. Maybe I > > have an unusal setup. The problem in my case is that configure now chooses > > tools from $prefix/bin. It did use tools from $prefix/$target/bin before. > > On my setup I have *different* tools in those places. Until know the tools > > from $prefix/$target/bin were selected and everything was fine. Now the > > build process creates eg. gcc/as which uses as from $prefix/bin. That > > assembler is *never* invoked when I running <target>-gcc. Thus I am > > surprised that configure now prefers that version. Is the current > > behaviour a bug? > > From your description I assume this is a native build ($target == > $host). When did this change?
Sorry for being vague, its a cross-compiler (build == host). The build errors out for libgcc.a since gcc/xgcc uses the "wrong" assembler. The last successful build was at the beginning of decemeber. > Also, _why_ do you have different tools in those two places? Is this important? I kept binutil versions in $prefix/bin because at times its useful to have it, eg. comparing its output/behaviour. The replaced tools in $prefix/$target/bin are better suited for my needs, thus I installed them there and until recently GCC always used these tools. > It looks to me like this last changed around 2005-06-16 on HEAD, and we > assume that the assembler installed in $prefix is the assembler you > want the compiler to be using - it's the same assembler you'd get if > you said "as", so why shouldn't we use it? I rarely invoke eg. the assembler manually. Most of the time I use the compiler frontend (gcc) since that is much more convenient. All GCC version I know use $prefix/$target/bin/<tool> if its available, at least for assembler and linker. I never seen the frontend using $target-<tool>. On Thu, Dec 22, 2005 at 12:16:46PM -0500, Daniel Jacobowitz wrote: > On Thu, Dec 22, 2005 at 06:13:22PM +0100, Paolo Bonzini wrote: > > I am a bit confused. > > > > Does Gunther's failure mean that the default for the proposed > > --with-build-tools option, should be $prefix/$target/bin? This would > > set AS_FOR_TARGET, etc. from within the GCC_TARGET_TOOL toplevel > > configure macro, and percolate all the way down to gcc. That would probaly restore previous behaviour since it would prefer tools in $prefix/$target/bin over $prefix/bin. > If I am following correctly: > > The assembler we test for features in Gunther's case has always been > $prefix/bin/as - luckily harmless for him and he probably never > noticed. The installed compiler uses $prefix/$target/bin/as. The > being-built compiler has switched from one to the other. Your analysis seems to be correct. I noticed that "wrong" tools (as/ld) were tested by configure but that was non-problematic. The new behaviour is since now a tool is invoked with wrong options. > One appropriate default for --with-build-tools could be the same as > the defaults for --program-transform-name. A default native build > would use 'as', a default cross build would use '$target-as'. Most > people using --program-prefix would probably also pass the same value > to --with-build-tools. That would not solve the problem. However, Paolo suggestion 2) in another mail (http://gcc.gnu.org/ml/gcc/2005-12/msg00688.html) seems to restore old behaviour and thus fix my issue. Gunther