This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: 2.95,2 bug; can not create cross compiler


> 
> > 
> > On Wed, 17 Nov 1999, Mike Stump wrote:
> > > Sure, we all do!  But we through experience we already kew that
> > > --with-headers is more than just a good idea, it is required.
> > > 
> > > http://egcs.cygnus.com/install/configure.html has a note about this,
> > > but it is obscure.  Maybe the phrase `THIS OPTION IS REQUIRED when
> > > building a cross compiler' should be added?
> > 
> > Yes, definitely a good idea. A patch in that direction will be highly
> > appreciated -- just go ahead and install that! ;-)
> 
> Perhaps configure should object if the option is not supplied and
> host != target?
> 

I don't use/like --with-headers. The header file is not the only
problem. I have run into those lib*.a lib*.so/crt*.o problems. Here
is a sanity check I use. BTW, you probably will only see those problems
when you use a full C library like glibc 2, libc 5, ... Newlib is ok.


-- 
H.J. Lu (hjl@gnu.org)
--
--- configure.orig	Sat Oct 16 22:25:49 1999
+++ configure	Sun Oct 17 21:55:57 1999
@@ -753,6 +753,17 @@ target_vendor=`echo $result | sed 's/^\(
 target_os=`echo $result | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
 target=${target_cpu}-${target_vendor}-${target_os}
 
+if [ x${target} != x${build} -a x${build} = x${host} ]; then
+    if [ ! -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-compilaition." 1>&2
+	exit 1
+    fi
+fi
+
 . ${tmpfile}.tgt
 
 # Find the source files, if location was not specified.


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