Bug 55771 - build fails because FE_INVALID is used uncoditionally in tests
Summary: build fails because FE_INVALID is used uncoditionally in tests
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.2
Hardware: ARM Linux (All)
: medium blocker
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-10-08 18:15 UTC by Nico Nelson
Modified: 2012-10-18 11:43 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Patch which #defines all the undefined exception macros (1.24 KB, patch)
2012-10-12 09:15 UTC, Uli Schlachter
Details | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nico Nelson 2012-10-08 18:15:04 UTC
CC     cairo_test_suite-in-fill-trapezoid.o                                                  
  CC     cairo_test_suite-invalid-matrix.o                            
invalid-matrix.c: In function 'draw':                                                                
invalid-matrix.c:367:20: error: 'FE_INVALID' undeclared (first use in this function)
invalid-matrix.c:367:20: note: each undeclared identifier is reported only once for each function it appears in
At top level:                                                                        
cc1: warning: unrecognized command line option "-Wno-unused-but-set-variable"                        
make[4]: *** [cairo_test_suite-invalid-matrix.o] Error 1                                   
make[4]: Leaving directory `/src/build/cairo/cairo-1.12.2/test'                                       
make[3]: *** [all-recursive] Error 1


according to musl libc author:
                                                                                                    
"C99 requires the FE_ macros to be defined if and only if the exception they correspond to is supported"

and since ARM doesn't necessarily support a FPU, this is optional.

the proper way to test is to check if each of the FE_ is defined before using it.
Comment 1 Uli Schlachter 2012-10-12 09:15:31 UTC
Created attachment 68478 [details] [review]
Patch which #defines all the undefined exception macros

Comments? Is this good enough?
Comment 2 Nico Nelson 2012-10-12 15:29:39 UTC
thanks, that works.
Comment 3 Uli Schlachter 2012-10-18 11:43:05 UTC
commit d5f9c694b9145f0464c8bd58d844bddedcb77d5e
Author: Uli Schlachter <psychon@znc.in>
Date:   Tue Oct 16 17:09:42 2012 +0200

    test: Define optional exception classes
    
    According to musl libc author:
    
    "C99 requires the FE_ macros to be defined if and only if the exception they
    correspond to is supported"
    
    So we define these macros to 0 if they are not supported. Support for these FPU
    exceptions is not necessary for correct functionality, but makes some tests less
    effective.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55771
    Signed-off-by: Uli Schlachter <psychon@znc.in>


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.