From b510e062c4e4ee5023ad5eb85d5c10f5d12dd538 Mon Sep 17 00:00:00 2001 From: Chris Packham Date: Mon, 30 May 2022 19:35:12 +1200 Subject: gmp: Set CC_FOR_BUILD and CPP_FOR_BUILD When GMP is being "cross" compiled for the same architecture (i.e. build == host) it does not pick the right compiler. Set CC_FOR_BUILD and CPP_FOR_BUILD to override the default compiler. Fixes #1328 Signed-off-by: Chris Packham --- scripts/build/companion_libs/100-gmp.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'scripts/build') diff --git a/scripts/build/companion_libs/100-gmp.sh b/scripts/build/companion_libs/100-gmp.sh index a17eda9a..8afa5aec 100644 --- a/scripts/build/companion_libs/100-gmp.sh +++ b/scripts/build/companion_libs/100-gmp.sh @@ -118,9 +118,12 @@ do_gmp_backend() { ;; esac - # FIXME: GMP's configure script doesn't respect the host parameter - # when not cross-compiling, ie when build == host. + # GMP's configure script doesn't respect the host parameter + # when not cross-compiling, ie when build == host so set + # CC_FOR_BUILD and CPP_FOR_BUILD. CT_DoExecLog CFG \ + CC_FOR_BUILD="${CT_BUILD}-gcc" \ + CPP_FOR_BUILD="{CT_BUILD}-cpp" \ CC="${host}-gcc" \ CFLAGS="${cflags} -fexceptions" \ LDFLAGS="${ldflags}" \ -- cgit v1.2.3