mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
ccache: use local-cc flag instead of manually setting CC
Signed-off-by: Matthias Reichl <hias@horus.com>
This commit is contained in:
parent
8eb0080e8c
commit
88b3ca8f7e
@ -10,14 +10,10 @@ PKG_SITE="https://ccache.dev/download.html"
|
||||
PKG_URL="https://github.com/ccache/ccache/releases/download/v${PKG_VERSION}/${PKG_NAME}-${PKG_VERSION}.tar.xz"
|
||||
PKG_DEPENDS_HOST="make:host"
|
||||
PKG_LONGDESC="A compiler cache to speed up re-compilation of C/C++ code by caching."
|
||||
PKG_BUILD_FLAGS="+local-cc"
|
||||
|
||||
PKG_CONFIGURE_OPTS_HOST="--with-bundled-zlib"
|
||||
|
||||
pre_configure_host() {
|
||||
export CC=${LOCAL_CC}
|
||||
export CXX=${LOCAL_CXX}
|
||||
}
|
||||
|
||||
post_makeinstall_host() {
|
||||
# setup ccache
|
||||
if [ -z "${CCACHE_DISABLE}" ]; then
|
||||
@ -26,14 +22,14 @@ post_makeinstall_host() {
|
||||
|
||||
cat > ${TOOLCHAIN}/bin/host-gcc <<EOF
|
||||
#!/bin/sh
|
||||
${TOOLCHAIN}/bin/ccache ${CC} "\$@"
|
||||
${TOOLCHAIN}/bin/ccache ${LOCAL_CC} "\$@"
|
||||
EOF
|
||||
|
||||
chmod +x ${TOOLCHAIN}/bin/host-gcc
|
||||
|
||||
cat > ${TOOLCHAIN}/bin/host-g++ <<EOF
|
||||
#!/bin/sh
|
||||
${TOOLCHAIN}/bin/ccache ${CXX} "\$@"
|
||||
${TOOLCHAIN}/bin/ccache ${LOCAL_CXX} "\$@"
|
||||
EOF
|
||||
|
||||
chmod +x ${TOOLCHAIN}/bin/host-g++
|
||||
|
Loading…
x
Reference in New Issue
Block a user