This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Get rid of -Wodr warning (PR build/23399)
- From: Tom Tromey <tom at tromey dot com>
- To: Simon Marchi <simon dot marchi at polymtl dot ca>
- Cc: gdb-patches at sourceware dot org, mliska at suse dot cz
- Date: Tue, 28 Aug 2018 11:09:15 -0600
- Subject: Re: [PATCH] Get rid of -Wodr warning (PR build/23399)
- References: <20180825153828.27600-1-simon.marchi@polymtl.ca>
>>>>> "Simon" == Simon Marchi <simon.marchi@polymtl.ca> writes:
Simon> The PR reports that building with -Wodr -flto complains about different
Simon> versions of struct ipa_sym_addresses, in common/agent.c and
Simon> gdbserver/tracepoint.c. This patch renames the version in common to
Simon> ipa_sym_addresses_common to avoid the name clash. Because the IPA_SYM
Simon> assumed the name ipa_sym_addresses, it now requires the includer to
Simon> define the IPA_SYM_STRUCT_NAME macro to define the name of the structure
Simon> holding the IPA symbol addresses.
Simon> gdb/ChangeLog:
Simon> PR build/23399
Simon> * common/agent.c (IPA_SYM_STRUCT_NAME): Define.
Simon> (struct ipa_sym_addresses): Rename to...
Simon> (struct ipa_sym_addresses_common): ... this.
Simon> * common/agent.h (IPA_SYM): Use IPA_SYM_STRUCT_NAME.
Simon> gdb/gdbserver/ChangeLog:
Simon> PR build/23399
Simon> * tracepoint.c (IPA_SYM_STRUCT_NAME): Define.
Thanks for doing this. This seems a bit ugly but I didn't see any
obviously better way to go about it.
I was curious if we needed to add -Wodr to the build, but according to
the gcc manual it is enabled by default, so all is well.
Tom