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: A patch for configure


On Thu, May 18, 2000 at 09:07:51PM -0300, Alexandre Oliva wrote:
> On May 18, 2000, "H . J . Lu" <hjl@lucon.org> wrote:
> 
> > It won't work if you don't use newlib and have those .o, so, .a and .h
> > files installed under ${prefix}/${target_alias}. How about I also
> > check if newlib doesn't exist?
> 
> I prefer testing for ${prefix}/${target_alias}.  I don't think the
> absence of newlib can be used as a heuristics for the presence of that
> directory, or the need for the gcc installation directory.  I, for
> one, have certainly built toolchains up to the compiler, refraining
> from building any target libraries, because I just wanted to verify
> certain issues in the compiler.  I'd be extremely annoyed if I was
> forced to define an installation prefix and create a particular
> directory within it in order to be able to complete configure.  At the
> very least, there should be an option to tell configure to shut up
> about this because it doesn't know better than I.
> 

How about this one? My goal is people who are not familiar with gcc
can build the whole thing with little confusion. People like you
can always work around this annoying feature without much trouble.

BTW, it was very interesting to bootstrap everything from scratch.
I have done that for ia32 and ia64. I won't recommend it to everyone.


H.J.
---
Index: configure
===================================================================
RCS file: /work/cvs/gnu/binutils/configure,v
retrieving revision 1.1.1.6
diff -u -p -r1.1.1.6 configure
--- configure	2000/04/12 17:04:42	1.1.1.6
+++ configure	2000/05/19 00:11:39
@@ -752,6 +752,22 @@ target_cpu=`echo $result | sed 's/^\([^-
 target_vendor=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
 target_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 target=${target_cpu}-${target_vendor}-${target_os}
+
+# We have to make sure the gcc directory exists for the non-canadian
+# cross compiler if necessary. In that case, we will run the cross
+# compiler we just build to compile other stuff. Due to how the cross
+# compiler finds as, ld, .o, so, and .a files, the gcc directory may
+# be needed for successful cross-compilation.
+if test x${target} != x${build} -a x${build} = x${host} ; then
+    if test x${gcc_version} != x -a -d ${prefix}/${target_alias} -a ! -d ${prefix}/lib/gcc-lib/${target_alias}/${gcc_version} ; then
+    	echo "Please create the directory:" 1>&2
+    	echo 1>&2
+	echo "	${prefix}/lib/gcc-lib/${target_alias}/${gcc_version}" 1>&2
+    	echo 1>&2
+    	echo "first for successful cross-compilation." 1>&2
+	exit 1
+    fi
+fi
 
 . ${tmpfile}.tgt
 

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