Commit: Fix building gold with gcc 10
Nick Clifton
nickc@redhat.com
Tue Sep 24 09:08:00 GMT 2019
Hi Guys,
I have just been alerted to the fact that gold will not build with
gcc 10 due to a header file problem:
> BUILDSTDERR: In file included from debug.h:29,
> BUILDSTDERR: from workqueue-threads.cc:33:
> BUILDSTDERR: errors.h:87:50: error: 'string' in namespace 'std' does not name a type
> BUILDSTDERR: 87 | undefined_symbol(const Symbol* sym, const std::string& location);
> BUILDSTDERR: | ^~~~~~
> BUILDSTDERR: errors.h:29:1: note: 'std::string' is defined in header '<string>'; did you forget to '#include <string>'?
So I am checking in the obvious patch to fix the problem. (To the
mainline and 2.33 branch).
Cheers
Nick
gold/ChangeLog
2019-09-24 Nick Clifton <nickc@redhat.com>
* descriptors.cc: Include <string>
diff --git a/gold/descriptors.cc b/gold/descriptors.cc
index 92fd42f41f..d5cc9fc4c9 100644
--- a/gold/descriptors.cc
+++ b/gold/descriptors.cc
@@ -26,6 +26,7 @@
#include <cstdio>
#include <cstring>
#include <fcntl.h>
+#include <string>
#include <unistd.h>
#include "debug.h"
More information about the Binutils
mailing list