This is the mail archive of the
mailing list for the glibc project.
Re: [PATCH] fix #19443 - build failures with -DDEBUG
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>, GNU C Library <libc-alpha at sourceware dot org>, Paul Eggert <eggert at cs dot ucla dot edu>
- Date: Wed, 13 Jan 2016 09:53:11 -0500
- Subject: Re: [PATCH] fix #19443 - build failures with -DDEBUG
- Authentication-results: sourceware.org; auth=none
- References: <5695641C dot 8090607 at gmail dot com> <56959C49 dot 8020606 at redhat dot com> <5695D2A1 dot 7010909 at gmail dot com>
On 01/12/2016 11:29 PM, Martin Sebor wrote:
>>> diff --git a/stdlib/rshift.c b/stdlib/rshift.c
>>> index 4cf345c..71f8736 100644
>>> --- a/stdlib/rshift.c
>>> +++ b/stdlib/rshift.c
>>> @@ -42,7 +42,7 @@ mpn_rshift (register mp_ptr wp,
>>> #ifdef DEBUG
>>> if (usize == 0 || cnt == 0)
>>> - abort ();
>>> + __builtin_abort ();
>>> sh_1 = cnt;
>> This file is shared with GMP.
>> See: https://sourceware.org/glibc/wiki/SharedSourceFiles
>> Can you peek at upstream to see if they included the apporpriate
>> header to make abort(); work and try to harmonize with whatever
>> changes GMP made?
> The latest rshift.c looks quite different:
> I haven't looked at the rest but if (according to the Wiki)
> the last time GMP was integrated into Glibc was 1996 it seems
> that replacing the DEBUG block with an assert might be the thing
> to do for this bug and syncing the two up as a separate project.
> (I'm not sure I have the cycles to take on the latter.)
Agreed, replace it with an assert.
OK with that change.
I'm definitely not asking you to update from upstream GMP (which
is likely impossible due to licensing).
>> Keep in mind GMP v6 and above are LGPLv3 or GPLv2, and I don't
>> know if that blocks us from another import of GMP into glibc.
>>> diff --git a/time/mktime.c b/time/mktime.c
>>> index 7d06314..bc7ed56 100644
>>> --- a/time/mktime.c
>>> +++ b/time/mktime.c
>> This file belongs to gnulib and was last merged 2014-06-27.
>> Could you please look at upstream gnulib and see what they are doing?
> Gnulib still uses DEBUG:
>> Usually rather than work around such an issue we propose a global change
>> to gnulib and glibc that harmonizes such uses.
> I'll wait for Paul to let us know. Another option might be
> to undefine DEBUG in the Makefile just for this file to avoid
> changing it.
Paul just checked it in to gnulib. So you're good to go.