Bug 27735

Summary: Flag -pedantic causes harm on Solaris w/Sun Studio 12
Product: libspectre Reporter: Dagobert Michelsen <dam>
Component: generalAssignee: Carlos Garcia Campos <carlosgc>
Status: RESOLVED FIXED QA Contact: Carlos Garcia Campos <carlosgc>
Severity: normal    
Priority: medium    
Version: unspecified   
Hardware: SPARC   
OS: Solaris   
Whiteboard:
i915 platform: i915 features:

Description Dagobert Michelsen 2010-04-19 04:24:41 UTC
During configure time some flags are checked for inclusion, one of them is -pedantic. For the Sun Studio compiler this flag does not turn on pedantic mode, but triggers performance gathering. This would make adding the performance library during linking mandatory which is obviously not done. The resulting error is

current9s% /opt/studio/SOS12/SUNWspro/bin/cc -pg -ldl -G -z defs -h libspectre.so.1 -o .libs/libspectre.so.1.1.5  .libs/spectre-status.o .libs/spectre-document.o .libs/spectre-gs.o .libs/spectre-render-context.o .libs/spectre-device.o .libs/spectre-page.o .libs/spectre-exporter.o .libs/spectre-exporter-pdf.o .libs/spectre-exporter-ps.o .libs/spectre-utils.o .libs/ps.o   -L/opt/csw/lib -lgs -lc  -m32 -xarch=v8 -m32 -xarch=v8 
Undefined                       first referenced
 symbol                             in file
_mcount                             .libs/spectre-status.o

Clearing SPECTRE_CFLAGS explicitly during build time solves the problem immediately.
Comment 1 Carlos Garcia Campos 2010-06-01 02:38:28 UTC
I've added a new configure option --enable-iso-c, disabled by default, that tries to use -ansi and -pedantic flags. 

Thanks for reporting.

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.