NetBSD Problem Report #30341

From www@netbsd.org  Thu May 26 10:54:41 2005
Return-Path: <www@netbsd.org>
Received: by narn.netbsd.org (Postfix, from userid 31301)
	id E966263B104; Thu, 26 May 2005 10:54:40 +0000 (UTC)
Message-Id: <20050526105440.E966263B104@narn.netbsd.org>
Date: Thu, 26 May 2005 10:54:40 +0000 (UTC)
From: idart@performancedesign.no
Reply-To: idart@performancedesign.no
To: gnats-bugs@netbsd.org
Subject: [PATCH] devel/nbitools assumes Sun C compiler on Solaris
X-Send-Pr-Version: www-1.0

>Number:         30341
>Category:       pkg
>Synopsis:       [PATCH] devel/nbitools assumes Sun C compiler on Solaris
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    solaris-pkg-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu May 26 10:55:00 +0000 2005
>Last-Modified:  Fri Jul 22 14:31:00 +0000 2005
>Originator:     Idar Tollefsen
>Release:        nbitools-6.3nb2
>Organization:
Performance Design
>Environment:
SunOS lancaster 5.10 s10_72 sun4u sparc SUNW,Ultra-30
>Description:
devel/nbitools assumes that Sun's C compiler is to be used on SunOS
when major version is >= 5. That, of course, doesn't work for those
of us who doesn't have that compiler and uses GCC in stead.
>How-To-Repeat:
On SunOS >= 5 with GCC installed (and not Sun's C compiler installed)
go to devel/nbitools and try to build it.
>Fix:
Here's a patch against devel/nbitools/Makefile that fixes the problem.
Please note that getting nbitools to build on SunOS still requires
the patch proposed in pkg/27267.
-----------------------------------------------------

--- Makefile.orig	Thu May 26 12:08:07 2005
+++ Makefile	Thu May 26 12:19:35 2005
@@ -27,5 +27,9 @@
 	@${MV} ${WRKSRC}/config/cf/site.def ${WRKSRC}/config/cf/site.def.orig
 	@${SED} -e 's|^\(\#define[ \t]*ProjectRoot\).*|\1 ${PREFIX}|' \
 		${WRKSRC}/config/cf/site.def.orig > ${WRKSRC}/config/cf/site.def
+.if ${OPSYS} == "SunOS" && ${CC} == "gcc"
+	@${ECHO} "#define HasSunC NO" >> ${WRKSRC}/config/cf/host.def
+	@${ECHO} "#define HasGcc2 YES" >> ${WRKSRC}/config/cf/host.def
+.endif

 .include "../../mk/bsd.pkg.mk"

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Thu, 26 May 2005 11:01:11 +0000
Responsible-Changed-Why:
Solaris pkgsrc problem.


From: Idar Tollefsen <idart@performancedesign.no>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: pkg/30341
Date: Fri, 22 Jul 2005 16:16:17 +0200

 Ahem...

 You can of course not check ${CC} against "gcc" since ${CC} is "gcc" even when 
 using the SunPro compiler, in which case it's aliased to gcc anyway.

 I'm not sure what "the right way" to do this is. ${PKGSRC_COMPILER} instead maybe?


 - IT

From: Roland Illig <rillig@NetBSD.org>
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: pkg/30341
Date: Fri, 22 Jul 2005 16:30:50 +0200

 Idar Tollefsen wrote:
 > The following reply was made to PR pkg/30341; it has been noted by GNATS.
 > 
 > From: Idar Tollefsen <idart@performancedesign.no>
 > To: gnats-bugs@NetBSD.org
 > Cc: 
 > Subject: Re: pkg/30341
 > Date: Fri, 22 Jul 2005 16:16:17 +0200
 > 
 >  Ahem...
 >  
 >  You can of course not check ${CC} against "gcc" since ${CC} is "gcc" even when 
 >  using the SunPro compiler, in which case it's aliased to gcc anyway.

 The pkgsrc guide tells you to set CC=cc and CXX=CC in your mk.conf. ;)

 >  I'm not sure what "the right way" to do this is. ${PKGSRC_COMPILER} instead maybe?

 Yes, that sounds good.

 Roland

>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.