This is the mail archive of the systemtap@sourceware.org mailing list for the systemtap project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [Bug runtime/22572] systemtap 3.2 failed to compile on ARM


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]