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 10:09:54PM -0300, Alexandre Oliva wrote:
> 
> > It should be the hard error by default.
> 
> As long as it mentions the --disable-target-dir-sanity-checking
> option, it's fine with me.
> 
> > That is one reason why I added -d newlib. Should I add it?
> 
> Nope, it just doesn't make sense.  -d ${srcdir}/newlib might make some
> sense, but even then, I don't think it's The Right Thing (TM) to test
> for.  Let's just keep the current set of tests, plus the additional
> configure option, and see how it works.
> 
> >> the testing or a variable such as
> >> `$enable_target_dir_sanity_checking != no', so that someone can
> >> skip this test with --disable-target-dir-sanity-checking.  What do
> >> you think?
> 
> > I won't mind that. Want a new patch?
> 
> Yes, please.  Hopefully, the last iteration :-)
> 

This patch is for gcc. I will provide one for binutils later if
it is ok.


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 01:19:37
@@ -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} && 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]