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: Jakub Jelinek <jakub at redhat dot com>
- Cc: FX <fxcoudert at gmail dot com>, 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: Wed, 12 Feb 2014 12:26:42 +0100
- Subject: Re: [RFC, patch] Detect lack of 32-bit devel environment on x86_64-linux targets
- Authentication-results: sourceware.org; auth=none
- References: <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> <CAFiYyc2fxw+wenvTvJL_nTZdDuR7Uz2ocvtX1sKa9WWf26SXOw at mail dot gmail dot com> <CAFiYyc0LVm4OcZ0W_3RXe8cn1zR=3DHLmjb3TVy_Y2TPifqjhA at mail dot gmail dot com> <1BB40030-293F-4DC0-98AF-7636EFAEC25C at gmail dot com> <CAFiYyc3UURzMPPTdRXbyZa+hOuLUUoY4NDfoY4QR-oMvc0XXnQ at mail dot gmail dot com> <20140211161752 dot GX20378 at tucnak dot redhat dot com> <CAFiYyc0ueHfQLQjVg_0RgyYsLub=0qnt=kDiEay5=q-_mK7SzQ at mail dot gmail dot com> <20140212105745 dot GI20378 at tucnak dot redhat dot com>
On Wed, Feb 12, 2014 at 11:57 AM, Jakub Jelinek <jakub@redhat.com> wrote:
> On Wed, Feb 12, 2014 at 11:52:47AM +0100, Richard Biener wrote:
>> On Tue, Feb 11, 2014 at 5:17 PM, Jakub Jelinek <jakub@redhat.com> wrote:
>> > On Fri, Jan 31, 2014 at 03:49:40PM +0100, Richard Biener wrote:
>> >> On Fri, Jan 31, 2014 at 3:45 PM, FX <fxcoudert@gmail.com> wrote:
>> >> >> I've just seen that an explicit --enable-multilib is a way to do that.
>> >> >
>> >> > Yes, I was writing that as a reply when I received your email. (Also, it's written in the configure error message.)
>> >>
>> >> Yeah - you know, that message is quite long and somehow I didn't read it
>> >> carefully. I suspect that will happen to others, too, so we'll get some
>> >> extra complaints from that ;)
>> >>
>> >> >> Btw, doing the configure check exactly after all-stage1-gcc should be
>> >> >> an early enough and a serialization point, no? There you can do the
>> >> >> check even for when cross-compiling.
>> >> >
>> >> > Well, you've already built a whole stage, so it's not so early, is it?
>> >>
>> >> Well, building the stage1 compiler is probably the fastest thing nowadays
>> >> (it didn't yet build the target libraries for stage1 with the stage1,
>> >> unoptimized
>> >> and checking-enabled compiler - which is where it would fail in the odd
>> >> way which is what you want to improve).
>> >>
>> >> As I said, you can't "properly" check it at the point you are checking.
>> >> Which is why I complain - you're not checking this properly!
>> >>
>> >> Anyway, I've fixed the "bug" on our side with --enable-multilib.
>> >
>> > Just hit the same thing, while I have (in mock) 32-bit devel libc installed,
>> > I don't have 32-bit libgcc_s installed (what for, it will be built by gcc).
>> >
>> > Please revert it, or at least improve it (e.g. by trying to build
>> > with -static-libgcc at least).
>>
>> I wouldn't have static 32bit libgcc installed either.
>
> So perhaps turn that into a check if preprocessing of #include <features.h>
> works with -m32 (and never complain when building --with-sysroot*)?
> I mean, if features.h doesn't preprocess successfully (because of missing
> /usr/include/gnu/stubs-32.h), then as long as the compiler is going to
> include the same headers and not some sysroot, multilib building would fail
> in that case too.
That sounds good to me. Though it still wouldn't work with a
non-multilib built host compiler (maybe detect that and just warn
but not abort for that case?).
Richard.
> Jakub