This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Add ax_pthread.m4 for use in binutils-gdb
- From: Jason Merrill <jason at redhat dot com>
- To: Joshua Watt <jpewhacker at gmail dot com>
- Cc: Pedro Alves <palves at redhat dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 9 May 2018 11:25:46 -0400
- Subject: Re: [PATCH] Add ax_pthread.m4 for use in binutils-gdb
- References: <20180323024534.21170-1-JPEWhacker@gmail.com> <1523985868.31001.7.camel@gmail.com> <3920529f-4107-5e02-96bd-00c5ddebbd73@redhat.com> <1524003002.31001.12.camel@gmail.com> <535b2c5f-98ff-cf78-8975-87ef7a811654@redhat.com> <CAJdd5Gai=ra23UZ0=v-NmEQBGW=mG9=b3BUS9yxg=hLLrHZZ_w@mail.gmail.com>
Applied.
On Tue, May 8, 2018 at 7:47 PM, Joshua Watt <jpewhacker@gmail.com> wrote:
> On Wed, Apr 18, 2018, 05:20 Pedro Alves <palves@redhat.com> wrote:
>
>> On 04/17/2018 11:10 PM, Joshua Watt wrote:
>> > On Tue, 2018-04-17 at 22:50 +0100, Pedro Alves wrote:
>> >> On 04/17/2018 06:24 PM, Joshua Watt wrote:
>> >>> Ping? I'd really like to get this in binutils, which apparently
>> >>> requires getting it here first.
>> >>
>> >> I think it would help if you mentioned what this is and
>> >> what is the intended use case.
>> >
>> > Ah, that would probably be helpful! Yes, this was discussed on the
>> > binutils mailing list, see:
>> > https://sourceware.org/ml/binutils/2018-02/msg00260.html
>> >
>> > In short summary: the gold linker doesn't currently build for mingw,
>> > but only because it is attempting to link against libpthread
>> > incorrectly on that platform. Instead of bringing in more specialized
>> > logic to account for that, I opted to include the autotools
>> > ax_pthread.m4 macro (this patch) that automatically handles discovering
>> > pthreads on a wide variety of platforms and compilers, including mingw.
>> >
>> > binutils slaves its config/ directory to GCC, so the patch is required
>> > to be committed here first, and then it will be ported over there.
>>
>> Thanks, that helps indeed.
>>
>> I agree that the ax_pthread.m4 approach makes sense. Better to use
>> a field-tested macro than reinvent the wheel. We're using other
>> files from the autoconf-archive archive already, for similar reasons
>> (e.g., config/ax_check_define.m4, and gdb/ax_cxx_compile_stdcxx.m4).
>>
>> Since GCC won't be using it (yet at least, but it's conceivable it
>> could make use of it in future), there should be no harm in
>> installing it even if GCC is in stage 4, IMO.
>>
>> I don't have the authority to approve it, though.
>>
>> Thanks,
>> Pedro Alves
>>
>
> Ping (again)
>
>>