diff options
author | Chris Packham <judge.packham@gmail.com> | 2022-05-30 19:35:12 +1200 |
---|---|---|
committer | Chris Packham <judge.packham@gmail.com> | 2022-05-31 20:01:17 +1200 |
commit | b510e062c4e4ee5023ad5eb85d5c10f5d12dd538 (patch) | |
tree | f777eec4a727dc905fc055827ae48809e6eb1763 /scripts | |
parent | a321a0b892e3bc48d0f2ae559c2e763c55486e3e (diff) | |
download | crosstool-ng-b510e062c4e4ee5023ad5eb85d5c10f5d12dd538.tar.gz crosstool-ng-b510e062c4e4ee5023ad5eb85d5c10f5d12dd538.tar.bz2 crosstool-ng-b510e062c4e4ee5023ad5eb85d5c10f5d12dd538.zip |
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 <judge.packham@gmail.com>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/build/companion_libs/100-gmp.sh | 7 |
1 files changed, 5 insertions, 2 deletions
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}" \ |