pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/46029: lang/gcc34 does not handle PIC flag correctly on Solaris



>Number:         46029
>Category:       pkg
>Synopsis:       lang/gcc34 does not handle PIC flag correctly on Solaris
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 16 02:15:00 +0000 2012
>Originator:     Ryo ONODERA
>Release:        SunOS 5.10 (Solaris 10)
>Organization:
        
>Environment:
        
        
System: SunOS 5.10
Architecture: i386
Machine: i386
>Description:
cc from lang/gcc34 does not handle PIC flag properly.

Before the patch
% gcc -E -dM -xc -fPIC /dev/null|grep -i pic    
(empty)

After
% gcc -E -dM -xc -fPIC /dev/null|grep -i pic    
#define __pic__ 1
#define __PIC__ 1

        
>How-To-Repeat:
        
See http://gnats.netbsd.org/45934 and http://gnats.netbsd.org/42865
>Fix:
        
$NetBSD$

* Fix lack of __PIC__ and __pic__ in gcc -fPIC
  
http://gcc.gnu.org/viewcvs/branches/csl-sol210-3_4-branch/gcc/config/sol2.h?r1=87927&r2=87928&pathrev=178719

--- gcc/config/sol2.h.orig      2004-07-17 21:18:58.000000000 +0000
+++ gcc/config/sol2.h
@@ -73,6 +73,11 @@ Boston, MA 02111-1307, USA.  */
            builtin_define ("_LARGEFILE64_SOURCE=1");   \
            builtin_define ("__EXTENSIONS__");          \
          }                                             \
+       if (flag_pic)                                   \
+         {                                             \
+           builtin_define ("__PIC__");                 \
+           builtin_define ("__pic__");                 \
+         }                                             \
        TARGET_SUB_OS_CPP_BUILTINS();                   \
     } while (0)
 


>Unformatted:
        
        


Home | Main Index | Thread Index | Old Index