NetBSD Problem Report #29608
From grant@mofo.grunta.com Sun Mar 6 03:26:06 2005
Return-Path: <grant@mofo.grunta.com>
Received: from mofo.grunta.com (mofo.grunta.com [203.55.81.8])
by narn.netbsd.org (Postfix) with ESMTP id 2A76B63B104
for <gnats-bugs@gnats.NetBSD.org>; Sun, 6 Mar 2005 03:26:05 +0000 (UTC)
Message-Id: <200503060326.j263Q2ov020272@mofo.grunta.com>
Date: Sun, 6 Mar 2005 14:26:02 +1100 (EST)
From: grant@NetBSD.org
To: gnats-bugs@netbsd.org
Subject: gcc options not always passed to imake on Solaris
X-Send-Pr-Version: 3.95
>Number: 29608
>Category: pkg
>Synopsis: gcc options not always passed to imake on Solaris
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: solaris-pkg-people
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Mar 06 03:27:00 +0000 2005
>Closed-Date: Sat Jul 23 04:48:46 +0000 2005
>Last-Modified: Wed Aug 24 09:02:00 +0000 2005
>Originator: grant beattie
>Release: SunOS 5.8
>Organization:
>Environment:
System: SunOS sunburst 5.8 Generic_108528-13 sun4u sparc SUNW,Sun-Blade-1000
Architecture: sparc
Machine: sun4u
>Description:
compiler/gcc.mk has:
# Pass the required flags to imake to tell it we're using gcc on
# Solaris.
.if ${OPSYS} == "SunOS"
IMAKEOPTS+= -DHasGcc2=YES -DHasGcc2ForCplusplus=YES
.endif
however, these flags aren't passed to imake when it is called, so the
compiler flags for sunpro are passed to gcc, resulting in:
===> Building for xpm-3.4knb2
making all in ./lib...
rm -f data.o unshared/data.o
cc -c -Xc -xF -xcg92 -I. -I/usr/pkg/include -Dsun -Dsparc -DSVR4 -DSYSV -O2 data.c
gcc: unrecognized option `-Xc'
gcc: language cg92 not recognized
I suspect this is related to the xpkgwedge and the imake wrapper. the
values of IMAKEOPTS and IMAKE respectively:
-DHasGcc2=YES -DHasGcc2ForCplusplus=YES
/usr/openwin/bin/imake -DHasGcc2=YES -DHasGcc2ForCplusplus=YES
upon closer inspection, pkgxmkmf is called without ${IMAKEOPTS}, so
the flags are not passed to the imake wrapper. however, even when
IMAKEOPTS is added to XMKMF_CMD:
/usr/pkg/bin/pkgxmkmf -DHasGcc2=YES -DHasGcc2ForCplusplus=YES
the flags are not passed to all invocations of imake, and the SunPro
flags are still passed.
>How-To-Repeat:
attempt to build graphics/xpm with gcc on Solaris.
>Fix:
the real fix is probably to always add the required flags in the imake
wrapper.
the imake config files on Solaris 8 still pass -Kpic to ${CC}, which
is ignored by gcc and results in relocation errors at link time. this
can be fixed wholesale by adding a wrapper for gcc on Solaris to
transform this flag.
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: pkg-manager->solaris-pkg-people
Responsible-Changed-By: wiz@netbsd.org
Responsible-Changed-When: Sun, 06 Mar 2005 10:26:19 +0000
Responsible-Changed-Why:
Solaris specific pkgsrc PR.
From: Robert Lillack <lillack@mis.mpg.de>
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/29608: gcc options not always passed to imake on Solaris
Date: Thu, 28 Apr 2005 21:55:27 +0200
Could somebody please commit grant's patch:
http://mail-index.netbsd.org/pkgsrc-bugs/2005/03/06/0005.html
It looks reasonable, works and if you'd pull it up to pkgsrc-2005Q1
I---and a few others, I think---would have a lot less trouble.
Thanks!
--
+- Robert Lillack ------------------ lillack@mis.mpg.de -+
/ Max Planck Institute for Mathematics in the Sciences /
+- Leipzig, Germany ----------- phone: +49-341-9959-693 -+
From: grant beattie <grant@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: PR/29608 CVS commit: pkgsrc/mk/wrapper
Date: Sat, 23 Jul 2005 04:45:30 +0000 (UTC)
Module Name: pkgsrc
Committed By: grant
Date: Sat Jul 23 04:45:30 UTC 2005
Modified Files:
pkgsrc/mk/wrapper: bsd.wrapper.mk
Added Files:
pkgsrc/mk/wrapper: cmd-sink-solaris-imake transform-solaris-gcc
Log Message:
ensure gcc options are always passed to imake when using gcc on
Solaris.
fixes PR pkg/29608.
To generate a diff of this commit:
cvs rdiff -r1.34 -r1.35 pkgsrc/mk/wrapper/bsd.wrapper.mk
cvs rdiff -r0 -r1.1 pkgsrc/mk/wrapper/cmd-sink-solaris-imake \
pkgsrc/mk/wrapper/transform-solaris-gcc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
State-Changed-From-To: open->closed
State-Changed-By: grant@netbsd.org
State-Changed-When: Sat, 23 Jul 2005 04:48:46 +0000
State-Changed-Why:
committed my proposed fix.
From: Lubomir Sedlacik <salo@netbsd.org>
To: gnats-bugs@netbsd.org
Cc:
Subject: PR/29608 CVS commit: [pkgsrc-2005Q2] pkgsrc/mk/wrapper
Date: Wed, 24 Aug 2005 09:01:20 +0000 (UTC)
Module Name: pkgsrc
Committed By: salo
Date: Wed Aug 24 09:01:19 UTC 2005
Modified Files:
pkgsrc/mk/wrapper [pkgsrc-2005Q2]: bsd.wrapper.mk
Added Files:
pkgsrc/mk/wrapper [pkgsrc-2005Q2]: cmd-sink-solaris-imake
transform-solaris-gcc
Log Message:
Pullup ticket 708 - requested by Grant Beattie
portability fix for compiler wrapper
Revisions pulled up:
- pkgsrc/mk/wrapper/bsd.wrapper.mk 1.35
- pkgsrc/mk/wrapper/cmd-sink-solaris-imake 1.1
- pkgsrc/mk/wrapper/transform-solaris-gcc 1.1
Module Name: pkgsrc
Committed By: grant
Date: Sat Jul 23 04:45:30 UTC 2005
Modified Files:
pkgsrc/mk/wrapper: bsd.wrapper.mk
Added Files:
pkgsrc/mk/wrapper: cmd-sink-solaris-imake transform-solaris-gcc
Log Message:
ensure gcc options are always passed to imake when using gcc on
Solaris.
fixes PR pkg/29608.
To generate a diff of this commit:
cvs rdiff -r1.32.2.1 -r1.32.2.2 pkgsrc/mk/wrapper/bsd.wrapper.mk
cvs rdiff -r0 -r1.1.2.1 pkgsrc/mk/wrapper/cmd-sink-solaris-imake \
pkgsrc/mk/wrapper/transform-solaris-gcc
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.