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 11:03:03PM -0300, Alexandre Oliva wrote:
> On May 18, 2000, "H . J . Lu" <hjl@lucon.org> wrote:
> 
> > +    if test x${enable_target_dir_sanity_checking} != xno && test x${gcc_version} != x && test -d ${prefix}/${target_alias} test ! -d ${prefix}/lib/gcc-lib/${target_alias}/${gcc_version} ; then
>                                                                                                                             ^^^ oops, missing `&&'
> 
> While you're at it, how about some line breaks after the `&&'s?  It
> makes the code significantly more readable.
> 
> Other than that, ok.  Not that this counts as an approval for GCC...
> 


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

        * configure: Ask to create the gcc directory for cross
	compiling if necessary. To turn it off, pass

	--disable-target-dir-sanity-checking

	to configure.

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 02:21:14
@@ -752,6 +752,25 @@ 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} && test x${build} = x${host} ; then
+    if test x${enable_target_dir_sanity_checking} != xno \
+       && test x${gcc_version} != x \
+       && test -d ${prefix}/${target_alias} \
+       && test ! -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]