pkgsrc-Bugs archive

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

pkg/29608: gcc options not always passed to imake on Solaris



>Number:         29608
>Category:       pkg
>Synopsis:       gcc options not always passed to imake on Solaris
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Mar 06 03:27: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.




Home | Main Index | Thread Index | Old Index