This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC, patch] Detect lack of 32-bit devel environment on x86_64-linux targets
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: FX <fxcoudert at gmail dot com>
- Cc: Paolo Bonzini <bonzini at gnu dot org>, Gerald Pfeifer <gerald at pfeifer dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Richard Henderson <rth at redhat dot com>, Uros Bizjak <ubizjak at gmail dot com>
- Date: Fri, 31 Jan 2014 15:33:56 +0100
- Subject: Re: [RFC, patch] Detect lack of 32-bit devel environment on x86_64-linux targets
- Authentication-results: sourceware.org; auth=none
- References: <D0868B7A-7DC1-46B1-B451-1B1A4847F072 at gmail dot com> <08855916-EED2-4485-AE68-4BD91FE4393A at gmail dot com> <alpine dot LNX dot 2 dot 00 dot 1312091143490 dot 2197 at tuna dot site> <52A59FEB dot 4040706 at gnu dot org> <D41B6B80-71D4-4F59-BB65-8D05B5F6979A at gmail dot com> <alpine dot LNX dot 2 dot 00 dot 1312091207090 dot 2197 at tuna dot site> <52A7AA78 dot 1070702 at gnu dot org> <5ADF0994-9729-4A57-8BF1-EEC02E940C36 at gmail dot com>
On Fri, Dec 13, 2013 at 10:47 PM, FX <fxcoudert@gmail.com> wrote:
>> The patch is okay, but if other architecture maintainers could add
>> similar checks for their ports (SPARC and PPC, I guess), it would be nice.
>
> Thanks, committed as rev. 205975
>
> Adding other systems to the list of checks will be easy, once the maintainers confirm that they want to opt in into it.
In our default build environment for package building GCC no longer builds
because of this:
[ 152s] /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/
ld: skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.8/libgcc.a when sea
rching for -lgcc
[ 152s] /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/
ld: cannot find -lgcc
[ 152s] /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:
skipping incompatible /usr/lib64/gcc/x86_64-suse-linux/4.8/libgcc_s.so
when searching for -lgcc_s
[ 152s] /usr/lib64/gcc/x86_64-suse-linux/4.8/../../../../x86_64-suse-linux/bin/ld:
cannot find -lgcc_s
[ 152s] collect2: error: ld returned 1 exit status
[ 152s] configure: error: I suspect your system does not have 32-bit
developement libraries (libc and headers). If you have them, rerun
configure with --enable-multilib. If you do not have them, and want to
build a 64-bit-only compiler, rerun configure with --disable-multilib.
the issue is that while we do have 32bit glibc support installed but not all
required files for the host compiler to produce 32bit executables - which
isn't needed - the compiler we bootstrap will have all the support for this.
In fact, a x86_64 multilib GCC can be just bootstrapped fine with a
non-multilib x86_64 compiler which you also disallow with the above check.
I don't see how you can do this configure check in its current form early,
before you've built the stage1 compiler.
So - please consider reverting this patch or at least provide a way to
override the check.
Thanks,
Richard.
> FX