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



I have narrowed this down, and the following patch fixes it, however,
I suspect that there may be a simpler way to fix this that I have
overlooked.

comments?

grant.


Index: bsd.wrapper.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/wrapper/bsd.wrapper.mk,v
retrieving revision 1.24
diff -u -r1.24 bsd.wrapper.mk
--- bsd.wrapper.mk      19 Feb 2005 04:19:59 -0000      1.24
+++ bsd.wrapper.mk      6 Mar 2005 03:19:48 -0000
@@ -326,6 +326,15 @@
 _WRAP_TRANSFORM.CXX=   ${_WRAP_TRANSFORM.CC}
 .endif
 
+.if ${OPSYS} == "SunOS" && !empty(PKGSRC_COMPILER:Mgcc)
+_WRAP_CACHE_BODY.CC=   ${WRAPPER_TMPDIR}/cache-body-solaris-gcc
+_WRAP_TRANSFORM.CC=    ${WRAPPER_TMPDIR}/transform-solaris-gcc
+_WRAP_CACHE_BODY.CXX=  ${_WRAP_CACHE_BODY.CC}
+_WRAP_TRANSFORM.CXX=   ${_WRAP_TRANSFORM.CC}
+_WRAP_CMD_SINK.IMAKE=  ${WRAPPER_TMPDIR}/cmd-sink-solaris-imake
+_WRAP_CACHE_BODY.IMAKE=        ${WRAPPER_TMPDIR}/cache-body-solaris-imake
+.endif
+
 # Filter to scrunch shell scripts by removing comments and empty lines.
 _WRAP_SH_CRUNCH_FILTER=                                                        
\
        ${GREP} -v "^\#[^!]" | ${GREP} -v "^[   ][      ]*\#" |         \
@@ -446,6 +455,18 @@
 do-wrapper: ${_target_}
 .endfor
 
+${WRAPPER_TMPDIR}/transform-solaris-gcc:                               \
+               ${WRAPPER_SRCDIR}/transform-solaris-gcc
+       ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
+       ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC}                    \
+               | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
+
+${WRAPPER_TMPDIR}/cmd-sink-solaris-imake:                              \
+               ${WRAPPER_SRCDIR}/cmd-sink-solaris-imake
+       ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
+       ${_PKG_SILENT}${_PKG_DEBUG}${CAT} ${.ALLSRC}                    \
+               | ${_WRAP_SH_CRUNCH_FILTER} > ${.TARGET}
+
 ${WRAPPER_TMPDIR}/arg-pp-darwin-gcc:                                   \
                ${WRAPPER_SRCDIR}/arg-pp-darwin-gcc
        ${_PKG_SILENT}${_PKG_DEBUG}${MKDIR} ${.TARGET:H}
arg=-DHasGcc2=YES
$debug_log $wrapperlog "    (cmd-sink-solaris-imake) pop:  $arg"
. $buildcmd

arg=-DHasGcc2ForCplusplus=YES
$debug_log $wrapperlog "    (cmd-sink-solaris-imake) pop:  $arg"
. $buildcmd

while ! queue_is_empty cmdbuf; do
        pop_queue cmdbuf arg
        $debug_log $wrapperlog "    (cmd-sink-solaris-imake) pop:  $arg"
        . $buildcmd
done
case $arg in
# the imake config templates on Solaris 8 pass -Kpic to build PIC, even
# when -DHasGcc2=YES -DHasGcc2ForCplusplus=YES is passed, so transform
# -Kpic to -fPIC.
-Kpic|-KPIC)
        arg=-fPIC
        msg_log $wrapperlog "   (transform-solaris-gcc) to: $arg"
        addtocache=yes
        ;;
esac


Home | Main Index | Thread Index | Old Index