diff options
author | Simon Marchi <simon.marchi@efficios.com> | 2020-10-07 13:58:57 -0400 |
---|---|---|
committer | Simon Marchi <simon.marchi@efficios.com> | 2020-10-07 13:59:23 -0400 |
commit | a038ffd88ecb8d994f5f51961529cf82945d61ba (patch) | |
tree | 54a42c00d35bafa030c466008e22c64beb6499f5 /gdbserver/ChangeLog | |
parent | 8b558efe7a219b10b41810d6b17028a6e511b6c4 (diff) | |
download | gdb-a038ffd88ecb8d994f5f51961529cf82945d61ba.zip gdb-a038ffd88ecb8d994f5f51961529cf82945d61ba.tar.gz gdb-a038ffd88ecb8d994f5f51961529cf82945d61ba.tar.bz2 |
gdb: put user-supplied CFLAGS at the end
GDB currently doesn't build cleanly with clang (a -Wdeprecated-copy-dtor
error). I configured my clang-based GDB build with
CXXFLAGS="-Wno-error=deprecated-copy-dtor", so I can use it despite that
problem. However, I found that it had no effect. This is because my
-Wno-error=Wdeprecated-copy-dtor switch is followed by -Werror in the
command line, which switches back all warnings to be errors.
If we want the user-supplied C(XX)FLAGS to be able to override flags
added by our configure script, the user-supplied C(XX)FLAGS should
appear after the configure-supplied flags.
This patch moves the user-supplied CXXFLAGS at the very end of the
compilation command line, which fixes the problem described above. This
means moving it out of INTERNAL_CFLAGS and inlining it in the users of
INTERNAL_CFLAGS.
I observed the problem when building GDB, but the same problem could
happen with GDBserver, so the change is done there too.
In GDBserver, INTERNAL_CFLAGS is passed when linking
gdb/ChangeLog:
* Makefile.in (COMPILE): Add CXXFLAGS.
(INTERNAL_CFLAGS_BASE): Remove CXXFLAGS.
(check-headers): Add CXXFLAGS.
gdbserver/ChangeLog:
* Makefile.in (COMPILE): Add CXXFLAGS.
(INTERNAL_CFLAGS_BASE): Remove CXXFLAGS.
(gdbserver$(EXEEXT)): Add CXXFLAGS.
(gdbreplay$(EXEEXT)): Add CXXFLAGS.
($(IPA_LIB)): Add CXXFLAGS.
(IPAGENT_COMPILE): Add CXXFLAGS.
Change-Id: I00e054506695e0e9536095c6d14827e48abd8f69
Diffstat (limited to 'gdbserver/ChangeLog')
-rw-r--r-- | gdbserver/ChangeLog | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gdbserver/ChangeLog b/gdbserver/ChangeLog index 5ff195c..94f1a75 100644 --- a/gdbserver/ChangeLog +++ b/gdbserver/ChangeLog @@ -1,3 +1,12 @@ +2020-10-07 Simon Marchi <simon.marchi@efficios.com> + + * Makefile.in (COMPILE): Add CXXFLAGS. + (INTERNAL_CFLAGS_BASE): Remove CXXFLAGS. + (gdbserver$(EXEEXT)): Add CXXFLAGS. + (gdbreplay$(EXEEXT)): Add CXXFLAGS. + ($(IPA_LIB)): Add CXXFLAGS. + (IPAGENT_COMPILE): Add CXXFLAGS. + 2020-10-07 Anton Kolesov <anton.kolesov@synopsys.com> * configure.srv: Support ARC architecture. |