Subject: pkg/33917: graphics/cairo 1.2.0 Solaris gcc Sun ld
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Gilles Dauphin <dauphin@enst.fr>
List: pkgsrc-bugs
Date: 07/04/2006 18:55:00
>Number:         33917
>Category:       pkg
>Synopsis:       graphics/cairo 1.2.0 Solaris gcc Sun ld
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Jul 04 18:55:00 +0000 2006
>Originator:     Gilles Dauphin
>Release:        SunOS 5.10 i86pc
>Organization:
ENST 
>Environment:


System: SunOS bi.enst.fr 5.10 Generic_Patch_118844-30 i86pc


>Description:


Same as glitz 1.2.0


>How-To-Repeat:


bmake


>Fix:


hidden attribute is not permit by Solaris gcc because of Sun ld
See comment on glitz and 2 patchs:

--- src/cairoint.h.orig Fri Jun 30 02:05:59 2006
+++ src/cairoint.h      Tue Jul  4 19:44:26 2006
@@ -67,7 +67,7 @@
 
 CAIRO_BEGIN_DECLS
 
-#if __GNUC__ >= 3 && defined(__ELF__)
+#if __GNUC__ >= 3 && defined(__ELF__) && !defined(__sun__)
 # define slim_hidden_proto(name)       slim_hidden_proto1(name, INT_##name)
 # define slim_hidden_def(name)         slim_hidden_def1(name, INT_##name)
 # define slim_hidden_proto1(name, internal)                            \
@@ -95,7 +95,7 @@
 #endif
 
 /* slim_internal.h */
-#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun__)
 #define cairo_private          __attribute__((__visibility__("hidden")))
 #else
 #define cairo_private

--- pixman/src/slim_internal.h.orig     Fri Jun 30 02:05:59 2006
+++ pixman/src/slim_internal.h  Tue Jul  4 19:46:33 2006
@@ -47,7 +47,8 @@
 /* ??? Not marked with "slim" because that makes it look too much
    like the function name instead of just an attribute.  */
 
-#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__)
+#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun__)
+
 #define pixman_private __attribute__((__visibility__("hidden")))
 #else
 #define pixman_private
@@ -77,7 +78,7 @@
    the C symbol "EXT_foo", which is renamed to "foo" at the assembly
    level.  */
 
-#if __GNUC__ >= 3 && defined(__ELF__)
+#if __GNUC__ >= 3 && defined(__ELF__) && !defined(__sun__)
 # define slim_hidden_proto(name)       slim_hidden_proto1(name, INT_##name)
 # define slim_hidden_def(name)         slim_hidden_def1(name, INT_##name)
 # define slim_hidden_proto1(name, internal)