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