This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
Re: [Bug runtime/22572] systemtap 3.2 failed to compile on ARM
- From: Torsten Polle <Torsten dot Polle at gmx dot de>
- To: fche at redhat dot com <sourceware-bugzilla at sourceware dot org>
- Cc: systemtap at sourceware dot org
- Date: Fri, 8 Dec 2017 23:32:01 +0100
- Subject: Re: [Bug runtime/22572] systemtap 3.2 failed to compile on ARM
- Authentication-results: sourceware.org; auth=none
- References: <bug-22572-6586@http.sourceware.org/bugzilla/> <bug-22572-6586-WdWVODEf5B@http.sourceware.org/bugzilla/>
Hi,
I had a similar problem with gcc 4.5.2 and fixed it as follows.
--------------------------------- staptree.h ----------------------------------
index a376a43..d1e2da4 100644
@@ -519,9 +519,9 @@ struct print_format: public expression
unsigned width;
unsigned precision;
unsigned flags : 8;
- width_type widthtype : 8;
- precision_type prectype : 8;
- conversion_type type : 8;
+ unsigned char widthtype : 8;
+ unsigned char prectype : 8;
+ unsigned char type : 8;
interned_string literal_string;
bool is_empty() const
{
Additionally, I build staprun for an ARM target with arm-unknown-linux-gnueabi-gcc (crosstool-NG 1.12.1 - buildroot 2011.08) 4.4.3. Here I need an additional patch.
Hack: std::string is missing.
Provide std::string as part of util.h as it missing in string.h.
------------------------------------ util.h ------------------------------------
index e642c5e..e4fdae4 100644
@@ -144,6 +144,15 @@ inline std::string lex_cast(IN const & in)
#if __cplusplus < 201103L
// Older C++0x only had the "long long" implementations, so we cast up.
+# if (__GNUC__ == 4 && __GNUC_MINOR__ == 4)
+namespace std {
+ static std::string to_string(size_t n) {
+ std::ostringstream s;
+ s << n;
+ return s.str();
+ }
+}
+# endif
#define INT_TO_STRING(IN) \
LEX_CAST_TO_STRING(signed IN, long long) \
LEX_CAST_TO_STRING(unsigned IN, unsigned long long)
Kind Regards,
Torsten