This is the mail archive of the
binutils@sourceware.cygnus.com
mailing list for the binutils project.
Re: A patch for cross compiling checking
- To: "H . J . Lu" <hjl at valinux dot com>
- Subject: Re: A patch for cross compiling checking
- From: Andrew Cagney <ac131313 at cygnus dot com>
- Date: Sat, 20 May 2000 10:49:08 +1000
- CC: binutils at sourceware dot cygnus dot com
- Organization: Cygnus Solutions
- References: <20000519082458.A11047@valinux.com>
"H . J . Lu" wrote:
>
> I got some feedbacks on my last patch. Here is a patch.
>
> --
> H.J. Lu (hjl@gnu.org)
> --
> 20000-05-19 H.J. Lu (hjl@gnu.org)
>
> * configure: Provide --disable-target-dir-sanity-checking to
> disable the gcc directory checking for cross compiling.
>
> Index: configure
> ===================================================================
> RCS file: /work/cvs/gnu/binutils/configure,v
> retrieving revision 1.1.1.7
> diff -u -p -r1.1.1.7 configure
> --- configure 2000/05/18 21:20:25 1.1.1.7
> +++ configure 2000/05/19 15:21:13
> @@ -753,8 +753,21 @@ 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 [ x${gcc_version} != x -a ! -d ${prefix}/lib/gcc-lib/${target_alias}/${gcc_version} ]; then
> +# 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 the C header files, the gcc directory may be needed
> +# for successful cross-compilation. This sanity check can be disabled
> +# by passing
> +#
> +# --disable-target-dir-sanity-checking
> +#
> +# to configure.
> +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
Does this test require that a GCC cross compiler be built/installed
before the configure goes ahead?
If the given cross compiler requires some obscure directory
configuration then can't that be tested by simply trying to run the
thing?
Andrew