mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-24 11:16:51 +00:00
scripts/build: use wrapper scripts when building with local-cc flag
Several packages and buildsystems (most notably cmake) badly trip over CC="ccache gcc" so create local wrapper scripts in the build dir and set CC/CXX to them to work around that - like we do for host-gcc and gcc in toolchain. Signed-off-by: Matthias Reichl <hias@horus.com> fixup scripts/build local-cc wrapper
This commit is contained in:
parent
627b7c9829
commit
8022ec23bf
@ -238,6 +238,23 @@ if [ -f "${PKG_CONFIGURE_SCRIPT}" -o -f "${PKG_CMAKE_SCRIPT}" -o -f "${PKG_MESON
|
||||
MESON_CONF="${PKG_REAL_BUILD}/meson.conf"
|
||||
fi
|
||||
|
||||
# create wrapper scripts in build dir and use them for CC/CXX when
|
||||
# building for host and local-cc build flag is set
|
||||
if [ "${TARGET}" = "host" ] && flag_enabled "local-cc" "no"; then
|
||||
cat > libreelec-local-cc << EOF
|
||||
#!/bin/sh
|
||||
exec ${CC} "\$@"
|
||||
EOF
|
||||
chmod +x libreelec-local-cc
|
||||
export CC=$(pwd)/libreelec-local-cc
|
||||
cat > libreelec-local-cxx << EOF
|
||||
#!/bin/sh
|
||||
exec ${CXX} "\$@"
|
||||
EOF
|
||||
chmod +x libreelec-local-cxx
|
||||
export CXX=$(pwd)/libreelec-local-cxx
|
||||
fi
|
||||
|
||||
# configure
|
||||
if [ -n "${PKG_DEPENDS_CONFIG}" -a -n "${PKG_INSTALL}" ]; then
|
||||
for pkg in ${PKG_DEPENDS_CONFIG}; do
|
||||
|
Loading…
x
Reference in New Issue
Block a user