Re: [ANNOUNCEMENT] GDB 8.1 release branch created!

Simon Marchi
2018-01-26T15:37:17Z

On 2018-01-26 09:18 AM, Eli Zaretskii wrote:
> Ping! Ping! Ping! This is delaying the release of GDB 8.1.
>
> Should I just stop waiting for approval and push this?

Hi Eli,

I didn't reply to your pings because I don't feel qualified to review changes related
to mingw (you are probably the most qualified person here, since you use it). Given
the lack of response, I'd say you can go ahead with the change, tt seems relatively safe.

I have one question below.

>> Date: Thu, 25 Jan 2018 18:58:30 +0200
>> From: Eli Zaretskii <eliz@gnu.org>
>>
>>> Date: Thu, 18 Jan 2018 17:52:53 +0200
>>> From: Eli Zaretskii <eliz@gnu.org>
>>
>> Ping! Ping! OK to push this?
>>
>>> Ping! Is it OK to install the patch proposed below?
>>>
>>>> Date: Tue, 16 Jan 2018 19:31:37 +0200
>>>> From: Eli Zaretskii <eliz@gnu.org>
>>>>
>>>> g++ -x c++ -O2 -gdwarf-4 -g3 -I. -I. -I./common -I./config -DLOCALEDIR="\"d:/usr/share/locale\"" -DHAVE_CONFIG_H -I./../include/opcode -I./../opcodes/.. -I./../readline/.. -I../bfd -I./../bfd -I./../include -I../libdecnumber -I./../libdecnumber -I./gnulib/import -Ibuild-gnulib/import -DTUI=1 -Id:/usr/include -Id:/usr/include/guile/2.0 -Id:/usr/include -Id:/usr/Python26/include -Id:/usr/Python26/include -Wall -Wpointer-arith -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable -Wno-sign-compare -Wno-narrowing -Wno-error=maybe-uninitialized -Wno-format -fno-strict-aliasing -DNDEBUG -fwrapv -c -o python/py-arch.o -MT python/py-arch.o -MMD -MP -MF python/.deps/py-arch.Tpo python/py-arch.c
>>>> In file included from d:\usr\lib\gcc\mingw32\6.3.0\include\c++\math.h:36:0,
>>>> from build-gnulib/import/math.h:27,
>>>> from d:/usr/Python26/include/pyport.h:235,
>>>> from d:/usr/Python26/include/Python.h:58,
>>>> from python/python-internal.h:94,
>>>> from python/py-arch.c:24:
>>>> d:\usr\lib\gcc\mingw32\6.3.0\include\c++\cmath:1157:11: error: '::hypot' has not been declared
>>>> using ::hypot;
>>>> ^~~~~
>>>> Makefile:1618: recipe for target `python/py-arch.o' failed
>>>>
>>>> Googling suggests the following solution; is it okay to push this
>>>> (with the necessary logs and after doing the "paperwork" required for
>>>> branch changes)? Or does someone have better ideas? (Does this work
>>>> in MinGW64?)
>>>>
>>>> --- gdb/python/python-internal.h~0 2018-01-12 05:31:04.000000000 +0200
>>>> +++ gdb/python/python-internal.h 2018-01-16 08:56:10.717759900 +0200
>>>> @@ -85,6 +85,12 @@
>>>> #define HAVE_SNPRINTF 1
>>>> #endif
>>>>
>>>> +/* Another kludge to avoid compilation errors because MinGW defines
>>>> + 'hypot' to '_hypot', but the C++ headers says "using ::hypot". */
>>>> +#if defined(__MINGW32__) && defined(__cplusplus)

Do we need "defined(__cplusplus)", since we are always building GDB as a C++ program?

Thanks,

Simon