On Wed, Nov 27, 2013 at 11:00:29PM +0000, Stuart Henderson wrote:
> On 2013/11/27 23:56, Juan Francisco Cantero Hurtado wrote:
> > On Wed, Nov 27, 2013 at 07:38:32PM +0000, Stuart Henderson wrote:
> > > On 2013/11/27 22:53, Vadim Zhukov wrote:
> > > > > Why not add support for ports-gcc/clang?. The symlinks only works with
> > > > > base-gcc but ccache can work with any compiler using
> > > > > "CCACHE_CC=mycompiler". I think a script in ${WRKDIR}/bin with
> > > > > "CCACHE_CC=mycompiler ccache $@" inside or something similar should be
> > > > > enough.
> > > > 
> > > > Won't work for more than one language: either C or C++, but not both.
> > > 
> > > something like (untested)
> > > 
> > > .if !empty(_MODGCC4_LINKS)
> > > .  for _src _dest in ${_MODGCC4_LINKS}
> > > .    if ${USE_CCACHE:L} == "yes"
> > > printf '#!/bin/sh\nexec CCACHE_CC="${_src}" ccache $@\n' > 
> > > ${WRKDIR}/bin/${_dest}
> > > chmod +x ${WRKDIR}/bin/${_dest}
> > > .    else
> > > MODGCC4_post-patch += ln -sf ${LOCALBASE}/bin/${_src} 
> > > ${WRKDIR}/bin/${_dest};
> > > .    endif
> > > .  endfor
> > > .endif
> > > 
> > 
> > *** Parse error in /usr/ports/www/webkit: Need an operator in '''
> > (/usr/ports/lang/gcc/4.6/gcc4.port.mk:81)
> > *** Parse error: Need an operator in '/bin/gcc'
> > (/usr/ports/lang/gcc/4.6/gcc4.port.mk:82)
> > *** Parse error: Need an operator in '''
> > (/usr/ports/lang/gcc/4.6/gcc4.port.mk:81)
> > *** Parse error: Need an operator in '/bin/cc'
> > (/usr/ports/lang/gcc/4.6/gcc4.port.mk:82)
> > *** Parse error: Need an operator in '''
> > (/usr/ports/lang/gcc/4.6/gcc4.port.mk:81)
> > *** Parse error: Need an operator in '/bin/g++'
> > (/usr/ports/lang/gcc/4.6/gcc4.port.mk:82)
> > *** Parse error: Need an operator in '''
> > (/usr/ports/lang/gcc/4.6/gcc4.port.mk:81)
> > *** Parse error: Need an operator in '/bin/c++'
> > (/usr/ports/lang/gcc/4.6/gcc4.port.mk:82)
> > 
> > Line 81 is the printf.
> > 
> > -- 
> > Juan Francisco Cantero Hurtado http://juanfra.info
> > 
> 
> Oh yes, that needs some "MODGCC4_post-patch +="
> 

MODGCC4_post-patch += printf '#!/bin/sh\nexec CCACHE_CC="${_src}" ccache $@\n' 
> ${WRKDIR}/bin/${_dest}
MODGCC4_post-patch += chmod +x ${WRKDIR}/bin/${_dest}

or

MODGCC4_post-patch += printf '#!/bin/sh\nexec CCACHE_CC="${_src}" ccache $@\n' 
> ${WRKDIR}/bin/${_dest}; chmod +x ${WRKDIR}/bin/${_dest}

These lines don't work. Webkit uses ccache with system-gcc.

-- 
Juan Francisco Cantero Hurtado http://juanfra.info

Reply via email to