void-packages/srcpkgs/spicy/patches/fix-cross.patch

40 lines
2.1 KiB
Diff

--- a/scripts/precompile-headers.sh
+++ b/scripts/precompile-headers.sh
@@ -27,7 +27,7 @@
config=$1
header=$2;
- for flag in $(${config} --cxxflags); do
+ for flag in $(${CROSSCOMPILE_EMULATOR} ${config} --cxxflags); do
if ! echo "${flag}" | grep -q '^-I'; then
continue
fi
@@ -49,7 +49,7 @@
LIBSPICY=$(search_header "${SPICY_CONFIG}" spicy/rt/libspicy.h)
# Extract version from `hilti-config`. It should be identical to the one from `spicy-config`.
-VERSION=$(${HILTI_CONFIG} --version | cut -d ' ' -f1)
+VERSION=$(${CROSSCOMPILE_EMULATOR} ${HILTI_CONFIG} --version | cut -d ' ' -f1)
# The cache is read from the environment variable `SPICY_CACHE`
# if set; else a patch under the user's home directory is used.
@@ -61,14 +61,14 @@
# NOTE: The compiler invocations here should be kept in sync
# with what we do in `CMakeLists.txt`.
cp "${LIBHILTI}" "${CACHE}/precompiled_libhilti_debug.h"
-$("${HILTI_CONFIG}" --cxx --cxxflags --debug) -x c++-header "${LIBHILTI}" -o "${CACHE}/precompiled_libhilti_debug.h.gch"
+$(${CROSSCOMPILE_EMULATOR} "${HILTI_CONFIG}" --cxx --cxxflags --debug) -x c++-header "${LIBHILTI}" -o "${CACHE}/precompiled_libhilti_debug.h.gch"
cp "${LIBHILTI}" "${CACHE}/precompiled_libhilti.h"
-$("${HILTI_CONFIG}" --cxx --cxxflags) -x c++-header "${LIBHILTI}" -o "${CACHE}/precompiled_libhilti.h.gch"
+$(${CROSSCOMPILE_EMULATOR} "${HILTI_CONFIG}" --cxx --cxxflags) -x c++-header "${LIBHILTI}" -o "${CACHE}/precompiled_libhilti.h.gch"
cp "${LIBSPICY}" "${CACHE}/precompiled_libspicy_debug.h"
-$("${SPICY_CONFIG}" --cxx --cxxflags --debug) -x c++-header "${LIBSPICY}" -o "${CACHE}/precompiled_libspicy_debug.h.gch"
+$(${CROSSCOMPILE_EMULATOR} "${SPICY_CONFIG}" --cxx --cxxflags --debug) -x c++-header "${LIBSPICY}" -o "${CACHE}/precompiled_libspicy_debug.h.gch"
cp "${LIBSPICY}" "${CACHE}/precompiled_libspicy.h"
-$("${SPICY_CONFIG}" --cxx --cxxflags) -x c++-header "${LIBSPICY}" -o "${CACHE}/precompiled_libspicy.h.gch"
+$(${CROSSCOMPILE_EMULATOR} "${SPICY_CONFIG}" --cxx --cxxflags) -x c++-header "${LIBSPICY}" -o "${CACHE}/precompiled_libspicy.h.gch"