[vlc-commits] contrib: gmp: don't use the cross compiler to test the build compiler

Steve Lhomme git at videolan.org
Fri Jun 19 15:48:01 CEST 2020


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jun  4 15:17:13 2020 +0200| [2873fdba3b4cff184bb6da6592487c65f3b35c6a] | committer: Steve Lhomme

contrib: gmp: don't use the cross compiler to test the build compiler

To build native tools it tries to use $CC when cross-compilation is detected,
which is most likely wrong.

This patch already exists in nettle that contains a version of gmp. But it's
not in the upstream version of gmp.

(cherry picked from commit 58e68e2f2ddaadc41c9ec4998df01b3daea7edde) (rebased)

rebased:
- the masyer branch has an asm fix detection patch

Signed-off-by: Steve Lhomme <robux4 at ycbcr.xyz>

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=2873fdba3b4cff184bb6da6592487c65f3b35c6a
---

 contrib/src/gmp/rules.mak | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/contrib/src/gmp/rules.mak b/contrib/src/gmp/rules.mak
index 5a698aa4c1..877829dba2 100644
--- a/contrib/src/gmp/rules.mak
+++ b/contrib/src/gmp/rules.mak
@@ -29,6 +29,8 @@ gmp: gmp-$(GMP_VERSION).tar.bz2 .sum-gmp
 	$(UNPACK)
 	$(APPLY) $(SRC)/gmp/ppc64.patch
 	$(APPLY) $(SRC)/gmp/win-arm64.patch
+	# do not try the cross compiler to detect the build compiler
+	cd $(UNPACK_DIR) && sed -i.orig 's/"$$CC" "$$CC $$CFLAGS $$CPPFLAGS" cc gcc c89 c99/cc gcc c89 c99/' acinclude.m4
 	$(MOVE)
 
 # GMP requires either GPLv2 or LGPLv3



More information about the vlc-commits mailing list