This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: gdb build problem (gdb/unittests/scoped_mmap-selftests.c)
>>>>> "Pedro" == Pedro Alves <palves@redhat.com> writes:
Pedro> On 08/08/2018 06:56 PM, Tom Tromey wrote:
>> diff --git a/gdb/configure.ac b/gdb/configure.ac
>> index 13bc5f9a8f2..76a1ba0364f 100644
>> --- a/gdb/configure.ac
>> +++ b/gdb/configure.ac
>> @@ -2279,6 +2279,10 @@ dnl At the moment, we just assume it's UTF-8.
>> AC_DEFINE(GDB_DEFAULT_HOST_CHARSET, "UTF-8",
>> [Define to be a string naming the default host character set.])
>>
>> +AH_BOTTOM([#if defined __OPTIMIZE__ && __OPTIMIZE__ > 0
>> +#define _FORTIFY_SOURCE 2
>> +#endif])
Pedro> Do we really need to put this in config.h? Wouldn't putting it straight
Pedro> in common/common-defs.h work out the same? We already define
Pedro> __STDC_CONSTANT_MACRO etc. there before any system header.
That does seems simpler, and I think it will work just as well.
Tom