fix: set CC=gcc for clamav Rust proc-macro builds in cross-compile

This commit is contained in:
2026-06-19 12:09:33 -04:00
parent a0875e9e0a
commit 42949532a3

View File

@@ -193,6 +193,13 @@
"-Dtest_run_result=0" "-Dtest_run_result=0"
"-Dtest_run_result__TRYRUN_OUTPUT=" "-Dtest_run_result__TRYRUN_OUTPUT="
]; ];
# Rust proc-macro build scripts need a native linker; cmake overrides
# CC/CXX to the cross-compiler, confusing cargo. Set CC to native gcc
# so proc-macros can compile and run on the build host.
preConfigure = (old.preConfigure or "") + ''
export CC=gcc
export CXX=g++
'';
}); });
}; };