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

Steve Lhomme git at videolan.org
Fri Jun 5 15:02:41 CEST 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Jun  4 15:17:13 2020 +0200| [58e68e2f2ddaadc41c9ec4998df01b3daea7edde] | 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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=58e68e2f2ddaadc41c9ec4998df01b3daea7edde
---

 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 b54617828f..ed34d2038e 100644
--- a/contrib/src/gmp/rules.mak
+++ b/contrib/src/gmp/rules.mak
@@ -35,6 +35,8 @@ gmp: gmp-$(GMP_VERSION).tar.bz2 .sum-gmp
 	$(APPLY) $(SRC)/gmp/ppc64.patch
 	$(APPLY) $(SRC)/gmp/win-arm64.patch
 	$(APPLY) $(SRC)/gmp/gmp-fix-asm-detection.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