Bug 7823 - only use supported warning flags
Summary: only use supported warning flags
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.2.2
Hardware: x86 (IA32) Linux (All)
: high normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords: patch
: 7858 (view as bug list)
Depends on:
Blocks:
 
Reported: 2006-08-09 09:21 UTC by Jens Granseuer
Modified: 2006-08-12 13:44 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
make some warning flags conditional (1.65 KB, patch)
2006-08-09 09:22 UTC, Jens Granseuer
Details | Splinter Review

Description Jens Granseuer 2006-08-09 09:21:27 UTC
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.
Comment 1 Jens Granseuer 2006-08-09 09:22:04 UTC
Created attachment 6505 [details] [review]
make some warning flags conditional
Comment 2 Behdad Esfahbod 2006-08-11 08:52:33 UTC
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.
Comment 3 Behdad Esfahbod 2006-08-11 08:54:09 UTC
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?
Comment 4 Kjartan Maraas 2006-08-11 09:15:37 UTC
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
Comment 5 Behdad Esfahbod 2006-08-11 09:26:50 UTC
(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?
Comment 6 Kjartan Maraas 2006-08-12 04:04:09 UTC
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.
Comment 7 Jens Granseuer 2006-08-12 07:26:20 UTC
(In reply to comment #2)
> Please test and let me know if it works with your compiler.

Works fine here. Thanks.
Comment 8 Kjartan Maraas 2006-08-12 10:03:43 UTC
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.
Comment 9 Behdad Esfahbod 2006-08-12 13:44:17 UTC
*** 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.