Subject: Re: pkgsrc, solaris, gcc
To: grant beattie <grant@NetBSD.org>
From: Rob Quinn <rquinn@sec.sprint.net>
List: tech-pkg
Date: 11/29/2004 16:05:54
> > >cc -c -O -Xc -xF -xcg92  -I. -I../include -I../../include 
> > >-I../../lib/audio -I../../include -I/usr/pkg/include  -Dsun -Dsparc -DSVR4 
> > >-DSYSV    -DINCLUDE_ALLOCA_H -DNASCONFSEARCHPATH=\"/usr/pkg/etc/nas/\"  
> > >dispatch.c
> > >gcc: unrecognized option `-Xc'

 I think the problem is that /usr/openwin/lib/config/sun.cf unconditionally
sets HasSunC to YES.

> there is an existing PR for this problem, though it talks about a
> different pkg and the synopsis should be updated - pkg/21943.

 I don't like my fix, but I edited site.def and sun.cf:

dodecahedron:/usr/openwin/lib/config %diff -c sun.cf /tmp
*** sun.cf      Wed Dec 15 18:09:37 1999
--- /tmp/sun.cf Mon Nov 29 15:58:04 2004
***************
*** 1,7 ****
  XCOMM platform:  $XConsortium: sun.cf,v 1.133 94/07/08 12:23:12 gildea Exp $
  XCOMM platform:  $SunSoft: @(#)sun.cf 1.5 08/25/99 12:27:05 $
  
! #define HasSunC YES
  #define CCompilerMajorVersion 4
  
  #ifdef SVR4
--- 1,9 ----
  XCOMM platform:  $XConsortium: sun.cf,v 1.133 94/07/08 12:23:12 gildea Exp $
  XCOMM platform:  $SunSoft: @(#)sun.cf 1.5 08/25/99 12:27:05 $
  
! #define HasSunC NO
! #define HasGcc YES
! #define HasGcc2 YES
  #define CCompilerMajorVersion 4
  
  #ifdef SVR4






dodecahedron:/usr/openwin/lib/config %diff -c site.def /tmp
*** site.def    Wed Dec 15 18:09:37 1999
--- /tmp/site.def       Mon Nov 29 15:58:14 2004
***************
*** 33,43 ****
  
  #ifdef BeforeVendorCF
  
- /*
  #ifndef HasGcc2
  #define HasGcc2 YES
  #endif
! */
  
  /*
  #ifndef HasCplusplus
--- 33,42 ----
  
  #ifdef BeforeVendorCF
  
  #ifndef HasGcc2
  #define HasGcc2 YES
  #endif
! #define HasSunC NO
  
  /*
  #ifndef HasCplusplus