From 67b10306d19bd16ec9f3ca73b14aa82c789436e1 Mon Sep 17 00:00:00 2001 From: Pedro Alves Date: Wed, 15 Jan 2020 21:55:29 +0000 Subject: Fix gdbsupport build on compilers that don't default to C++11 or above gdbsupport fails to build with compilers that don't default to C++11 or above. gdbsupport's configure.ac is already using AX_CXX_COMPILE_STDCXX, which sets CXX_DIALECT to the -std=gnu++11 switch if necessary, but the problem is that nowhere are we using CXX_DIALECT. This fixes it. gdbsupport/ChangeLog: 2020-01-17 Pedro Alves * Makefile.am: Append CXX_DIALECT to CXX. * Makefile.in: Regenerate. --- gdbsupport/ChangeLog | 5 +++++ gdbsupport/Makefile.am | 2 ++ gdbsupport/Makefile.in | 2 ++ 3 files changed, 9 insertions(+) diff --git a/gdbsupport/ChangeLog b/gdbsupport/ChangeLog index e7a902760f7..3583e5bd347 100644 --- a/gdbsupport/ChangeLog +++ b/gdbsupport/ChangeLog @@ -1,3 +1,8 @@ +2020-01-17 Pedro Alves + + * Makefile.am: Append CXX_DIALECT to CXX. + * Makefile.in: Regenerate. + 2020-01-17 Pedro Alves * configure.ac: Generate config.h instead of support-config.h. diff --git a/gdbsupport/Makefile.am b/gdbsupport/Makefile.am index 1a001a00817..4b8a604ce52 100644 --- a/gdbsupport/Makefile.am +++ b/gdbsupport/Makefile.am @@ -24,6 +24,8 @@ AM_CPPFLAGS = -I$(srcdir)/../include -I$(srcdir)/../gdb \ -I../gnulib/import -I$(srcdir)/../gnulib/import \ -I.. -I$(srcdir)/.. $(INCINTL) -I../bfd -I$(srcdir)/../bfd +override CXX += $(CXX_DIALECT) + override CC := $(CXX) override CFLAGS := $(CXXFLAGS) diff --git a/gdbsupport/Makefile.in b/gdbsupport/Makefile.in index 5bbab1c310e..31065af2440 100644 --- a/gdbsupport/Makefile.in +++ b/gdbsupport/Makefile.in @@ -688,6 +688,8 @@ uninstall-am: .PRECIOUS: Makefile +override CXX += $(CXX_DIALECT) + override CC := $(CXX) override CFLAGS := $(CXXFLAGS) -- cgit v1.2.1