This is the mail archive of the binutils@sourceware.cygnus.com mailing list for the binutils project.


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

Re: http://gcc.gnu.org/ml/gcc-patches/2000-05/msg01104.html


On Mon, May 22, 2000 at 03:55:23PM -0700, Jim Wilson wrote:
> In article <orbt1z5v17.fsf@tamanduatei.dcc.unicamp.br> you write:
> >AFAIK, multiple -B flags accumulate, and they're searched
> >left-to-right.
> 
> -B flags are prepended to gcc's internal search lists.  Hence, the last
> one specified is the first one searched, and they are searched right to left.
> It has always been this way.
> 
> The part of H.J.'s patch that puts the gcc -B option last is correct.
> When -B flags were added to the Makefiles, there were put in the wrong order,
> and no one noticed for a long time because the order matters only when
> binutils changes in an incompatible way.
> 
> The part of H.J.'s patch that I don't understand is why he adds a
> -B option pointing to a library directory: -B$(build_tooldir)/lib/.
> There are no executables there, so adding a -B option for that directory
> seems wrong and unnecessary.
> 

You are right.  -B$(build_tooldir)/lib/ is not necessary for gcc. But
it is needed for the top level Makefile.in. Otherwise, the target
libiberty won't configure:

configure:1765: /work/ia64/bin/cygnus/20000501/gcc/xgcc -B/usr/ia64-cygnus-linux/ia64-cygnus-linux/bin/ -I/usr/ia64-cygnus-linux/ia64-cygnus-linux/include -B/work/ia64/bin/cygnus/20000501/gcc/ -o conftest -g -O2  -pipe -Dno_inhibit_libc   conftest.c  1>&5
lt-ld-new: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status
configure: failed program was:

#line 1760 "configure"
#include "confdefs.h"

main(){return(0);}


H.J.
---
20000-05-22  H.J. Lu  (hjl@gnu.org)

	* Makefile.in (CC_FOR_TARGET): Make sure as/ld in the gcc
	directory are used if they exist. Make sure
	$(build_tooldir)/include is searched for header files,
	$(build_tooldir)/lib/ for library files.
	(GCC_FOR_TARGET): Likewise.
	(CXX_FOR_TARGET): Likewise.

--- Makefile.in.tool	Wed May 17 14:47:52 2000
+++ Makefile.in	Wed May 17 16:37:27 2000
@@ -226,7 +226,7 @@ CC_FOR_TARGET = ` \
 	  ;; \
       esac \
     else \
-      echo $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/; \
+      echo $$r/gcc/xgcc -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -isystem $(build_tooldir)/include; \
     fi; \
   else \
     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \
@@ -240,7 +240,7 @@ CC_FOR_TARGET = ` \
 # variable is passed down to the gcc Makefile, where it is used to
 # build libgcc2.a.  We define it here so that it can itself be
 # overridden on the command line.
-GCC_FOR_TARGET = $$r/gcc/xgcc -B$$r/gcc/ -B$(build_tooldir)/bin/ -I$(build_tooldir)/include
+GCC_FOR_TARGET = $$r/gcc/xgcc -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -I$(build_tooldir)/include
 
 CHILL_FOR_TARGET = ` \
   if [ -f $$r/gcc/xgcc ] ; then \
@@ -269,7 +269,7 @@ CXX_FOR_TARGET = ` \
 	  ;; \
       esac \
     else \
-      echo $$r/gcc/g++ -B$$r/gcc/ -B$(build_tooldir)/bin/; \
+      echo $$r/gcc/g++ -B$(build_tooldir)/bin/ -B$(build_tooldir)/lib/ -B$$r/gcc/ -I$(build_tooldir)/include; \
     fi; \
   else \
     if [ "$(host_canonical)" = "$(target_canonical)" ] ; then \

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