This is the mail archive of the
systemtap@sourceware.org
mailing list for the systemtap project.
[Bug runtime/22572] systemtap 3.2 failed to compile on ARM
- From: "mysecondaccountabc at gmail dot com" <sourceware-bugzilla at sourceware dot org>
- To: systemtap at sourceware dot org
- Date: Mon, 11 Dec 2017 01:08:22 +0000
- Subject: [Bug runtime/22572] systemtap 3.2 failed to compile on ARM
- Auto-submitted: auto-generated
- References: <bug-22572-6586@http.sourceware.org/bugzilla/>
https://sourceware.org/bugzilla/show_bug.cgi?id=22572
--- Comment #7 from Gustavo Moreira <mysecondaccountabc at gmail dot com> ---
(In reply to Torsten.Polle from comment #5)
> 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
Thanks Torsten, awesome.
I wonder why it's failing, because it's not due to the CXX11's "Strongly-typed
enums" feature. Actually, I've tested it separately and this feature works with
G++ 4.7 (have a look to my response to David@). It seems to be failing inside
STL.
PS: The 8bit bit-field is redundant for char type, but yeah it doesn't hurt ;)
Thanks again,
Gus
--
You are receiving this mail because:
You are the assignee for the bug.