The following patch makes cairo 1.2.2 build with gcc 2.95 by making the use of some of the warning flags conditional. Additionally, it implements a comment in configure.in to check for a few more flags.
Created attachment 6505 [details] [review] make some warning flags conditional
Thanks. I committed an improved version of your patch to: 1) cache the resulting WARN_CFLAGS 2) don't check for gcc 3) test all warnings for availability, not only some of them 4) moved -fno-strict-aliasing to CAIRO_CFLAGS Please test and let me know if it works with your compiler.
Kjartan, do you think this (trying gcc-compatible warning flags on whatever compiler is available) a good idea? Does any other compiler use the similar flags?
Well, I only have experience with the intel compiler and sparse which uses GCC as the backend IIRC so I can't say for sure. Intel have been quite good wrt gcc compatibility afaik
(In reply to comment #4) > Intel have been quite good wrt gcc compatibility afaik Does it accept any gcc warning flags? What about -fno-strict-aliasing?
Doesn't look like it from what I can see in the docs at least. Maybe it's called something else. Could be that GCC flags are left undocumented since those are documented in GCC? I'll try and see when I get the compiler installed.
(In reply to comment #2) > Please test and let me know if it works with your compiler. Works fine here. Thanks.
configure works fine with icc too, but it fails in the build later: fbmmx.c(139): error: cast to type "__m64" is not allowed return _mm_xor_si64 (mask, MC(4x00ff)); ^ fbmmx.c(148): error: cast to type "__m64" is not allowed res = _mm_adds_pu16 (res, MC(4x0080)); ^ fbmmx.c(221): error: cast to type "__m64" is not allowed x = _mm_and_si64 (x, MC(ffff0000ffff0000)); ^ fbmmx.c(222): error: cast to type "__m64" is not allowed y = _mm_and_si64 (y, MC(000000000000ffff)); ^ fbmmx.c(223): error: cast to type "__m64" is not allowed z = _mm_and_si64 (z, MC(0000ffff00000000)); ^ fbmmx.c(246): error: cast to type "__m64" is not allowed __m64 srcfaaa = _mm_or_si64 (srca, MC(full_alpha)); Not related to this though I guess.
*** Bug 7858 has been marked as a duplicate of this bug. ***
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.