[vlc-devel] [PATCH 7/7] contrib: nettle: fix build with CC_FOR_BUILD set to recent clang

Felix Paul Kühne fkuehne at videolan.org
Mon Nov 30 19:18:46 CET 2020


From: David Fuhrmann <dfuhrmann at videolan.org>

See upstream https://git.lysator.liu.se/nettle/nettle/-/merge_requests/9/diffs

Signed-off-by: Felix Paul Kühne <felix at feepk.net>
---
 contrib/src/nettle/fix-cc-for-build.patch | 34 +++++++++++++++++++++++
 contrib/src/nettle/rules.mak              |  3 +-
 2 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 contrib/src/nettle/fix-cc-for-build.patch

diff --git a/contrib/src/nettle/fix-cc-for-build.patch b/contrib/src/nettle/fix-cc-for-build.patch
new file mode 100644
index 0000000000..37826f7820
--- /dev/null
+++ b/contrib/src/nettle/fix-cc-for-build.patch
@@ -0,0 +1,34 @@
+From 91df68136ad1562cf9217599254706d8cfa970ea Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Adrien=20B=C3=A9raud?= <adrien.beraud at savoirfairelinux.com>
+Date: Sun, 20 Sep 2020 19:35:54 +0200
+Subject: [PATCH] m4: follow GMP changes for GMP_PROG_CC_FOR_BUILD
+
+---
+ aclocal.m4 | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/aclocal.m4 b/aclocal.m4
+index 513b2df4..e81e0351 100644
+--- a/aclocal.m4
++++ b/aclocal.m4
+@@ -369,7 +369,7 @@ cat >conftest.c <<EOF
+ int
+ main ()
+ {
+-  exit(0);
++  return 0;
+ }
+ EOF
+ gmp_compile="$1 conftest.c"
+@@ -410,7 +410,7 @@ else
+ int
+ main ()
+ {
+-  exit (0);
++  return 0;
+ }
+ EOF
+   for i in .exe ,ff8 ""; do
+-- 
+GitLab
+
diff --git a/contrib/src/nettle/rules.mak b/contrib/src/nettle/rules.mak
index 84cf05de27..7e885f3766 100644
--- a/contrib/src/nettle/rules.mak
+++ b/contrib/src/nettle/rules.mak
@@ -20,7 +20,7 @@ $(TARBALLS)/nettle-$(NETTLE_VERSION).tar.gz:
 
 nettle: nettle-$(NETTLE_VERSION).tar.gz .sum-nettle
 	$(UNPACK)
-	$(UPDATE_AUTOCONFIG)
+	$(APPLY) $(SRC)/nettle/fix-cc-for-build.patch
 	$(MOVE)
 
 DEPS_nettle = gmp $(DEPS_gmp)
@@ -30,6 +30,7 @@ DEPS_nettle = gmp $(DEPS_gmp)
 ifndef GPL
 	$(REQUIRE_GNUV3)
 endif
+	$(RECONF)
 	cd $< && $(HOSTVARS) ./configure $(HOSTCONF) $(NETTLE_CONF)
 	cd $< && $(MAKE) install
 	touch $@
-- 
2.24.3 (Apple Git-128)



More information about the vlc-devel mailing list