Browse Source

extras/tools: bump bison to 3.8.2

Fixes #28048
Fixes videolan/vlc-android#2477
pull/162/head
Alexandre Janniaux 3 years ago
committed by Steve Lhomme
parent
commit
3a7c80c1fb
  1. 2
      Makefile.am
  2. 2
      extras/tools/SHA512SUMS
  3. 48
      extras/tools/bison-macOS-7df04f9.patch
  4. 45
      extras/tools/bison-macOS-c41f233c.patch
  5. 2
      extras/tools/packages.mak
  6. 2
      extras/tools/tools.mak

2
Makefile.am

@ -63,8 +63,6 @@ EXTRA_DIST += \
extras/tools/tools.mak \
extras/tools/SHA512SUMS \
extras/tools/automake-clang.patch \
extras/tools/bison-macOS-7df04f9.patch \
extras/tools/bison-macOS-c41f233c.patch \
extras/tools/cmake-enable-ALPN-support-on-macOS-10.14.patch \
extras/tools/libtool-2.4.7-bitcode.patch \
extras/tools/libtool-2.4.7-clang-libs.patch \

2
extras/tools/SHA512SUMS

@ -8,7 +8,7 @@ f5dd0f02fcae65a176a16af9a8e1747c26e9440c6c224003ba458d3298b777a75ffb189aee9051fb
dbbb0bb348fac54612d29182c09c88bda7096dea03bd94f03c580c24146e65a06db12808c6a1a9adc94548fa3843511e3e80b251cb07142110cf149eab23f573 sed-4.2.2.tar.bz2
31865930401b1d9497421fa79cfb41a1a47f3bf59fcdde86b28ed4f53d7a3ceaf88d57c1dba0332d3cd76e82a3aeb31b1e4e3af54fc0d0c0ad17c9f239e8d45d tar-1.34.tar.bz2
5a98d40c94ce496047f4dae7844252e91018c5259e7d3bd4bab0f7c8772c82ff137b0a8a263b9a6038bab893af4500009a6f14787aa1f969156fcdceb365203e xz-5.4.1.tar.bz2
bbdc23e7772e49da1c7c47e66d4e4efbfbfe9b21dbc59bf3ad9a6e573eecac6c9f52c7f11a64be9897e8deb99ef7ba015164aa8232aa391b901dd7db03632412 bison-3.0.4.tar.xz
d4d23af6671406e97257892f90651b67f2ab95219831372be032190b7156c10a3435d457857e677445df8b2327aacccc15344acbbc3808a6f332a93cce23b444 bison-3.8.2.tar.xz
e9785f3d620a204b7d20222888917dc065c2036cae28667065bf7862dfa1b25235095a12fd04efdbd09bfd17d3452e6b9ef953a8c1137862ff671c97132a082e flex-2.6.4.tar.gz
611e573756e3e936ce16b456df9583eb9acae51a0fbd28212444ddc0c1c5ec21e893d7a666bd77ef53423024939291a31dcf86d129126fa707b729d80b24184d nasm-2.13.03.tar.gz
073042fa2dc48804c58e76f036130a669e19612c25427b0ab14d0b366b549a63751bf3af03bfd0745d7c4f72497a4b2aab26a3cc6de83189ce111679073878e1 gettext-0.19.8.1.tar.gz

48
extras/tools/bison-macOS-7df04f9.patch

@ -1,48 +0,0 @@
From 7df04f9b8a0adb1575ca0555775ec10860143cbf Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Fri, 7 Jul 2017 23:35:32 +0200
Subject: vasnprintf: port to macOS 10.13
Improve comments in last commit.
---
lib/vasnprintf.c | 17 ++++++++++-------
2 files changed, 11 insertions(+), 7 deletions(-)
diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
index fecaf27..2e4eb19 100644
--- a/lib/vasnprintf.c
+++ b/lib/vasnprintf.c
@@ -4869,10 +4869,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#endif
*fbp = dp->conversion;
#if USE_SNPRINTF
-# if ! (((__GLIBC__ > 2 \
- || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \
- && !defined __UCLIBC__) \
- || (defined __APPLE__ && defined __MACH__) \
+# if ! (((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \
+ && !defined __UCLIBC__) \
+ || (defined __APPLE__ && defined __MACH__) \
|| ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
fbp[1] = '%';
fbp[2] = 'n';
@@ -4887,9 +4886,13 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
in format strings in writable memory may crash the program
(if compiled with _FORTIFY_SOURCE=2), so we should avoid it
in this situation. */
- /* macOS 10.13 High Sierra behaves like glibc with
- _FORTIFY_SOURCE=2, and older macOS releases
- presumably do not need %n. */
+ /* On Mac OS X 10.3 or newer, we know that snprintf's return
+ value conforms to ISO C 99: the tests gl_SNPRINTF_RETVAL_C99
+ and gl_SNPRINTF_TRUNCATION_C99 pass.
+ Therefore we can avoid using %n in this situation.
+ On Mac OS X 10.13 or newer, the use of %n in format strings
+ in writable memory by default crashes the program, so we
+ should avoid it in this situation. */
/* On native Windows systems (such as mingw), we can avoid using
%n because:
- Although the gl_SNPRINTF_TRUNCATION_C99 test fails,
--
cgit v1.0-41-gc330

45
extras/tools/bison-macOS-c41f233c.patch

@ -1,45 +0,0 @@
From c41f233c4c38e84023a16339782ee306f03e7f59 Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Fri, 7 Jul 2017 14:10:20 -0700
Subject: vasnprintf: port to macOS 10.13
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Problem reported by comex in:
http://lists.gnu.org/archive/html/bug-gnulib/2017-07/msg00056.html
* lib/vasnprintf.c (VASNPRINTF): Don’t use %n on macOS.
---
lib/vasnprintf.c | 9 ++++++++-
2 files changed, 15 insertions(+), 1 deletion(-)
diff --git a/lib/vasnprintf.c b/lib/vasnprintf.c
index 9c2af0e..fecaf27 100644
--- a/lib/vasnprintf.c
+++ b/lib/vasnprintf.c
@@ -4869,7 +4869,11 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
#endif
*fbp = dp->conversion;
#if USE_SNPRINTF
-# if !(((__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) && !defined __UCLIBC__) || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
+# if ! (((__GLIBC__ > 2 \
+ || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 3)) \
+ && !defined __UCLIBC__) \
+ || (defined __APPLE__ && defined __MACH__) \
+ || ((defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__))
fbp[1] = '%';
fbp[2] = 'n';
fbp[3] = '\0';
@@ -4883,6 +4887,9 @@ VASNPRINTF (DCHAR_T *resultbuf, size_t *lengthp,
in format strings in writable memory may crash the program
(if compiled with _FORTIFY_SOURCE=2), so we should avoid it
in this situation. */
+ /* macOS 10.13 High Sierra behaves like glibc with
+ _FORTIFY_SOURCE=2, and older macOS releases
+ presumably do not need %n. */
/* On native Windows systems (such as mingw), we can avoid using
%n because:
- Although the gl_SNPRINTF_TRUNCATION_C99 test fails,
--
cgit v1.0-41-gc330

2
extras/tools/packages.mak

@ -39,7 +39,7 @@ SED_URL=$(GNU)/sed/sed-$(SED_VERSION).tar.bz2
ANT_VERSION=1.9.7
ANT_URL=$(APACHE)/ant/binaries/apache-ant-$(ANT_VERSION)-bin.tar.bz2
BISON_VERSION=3.0.4
BISON_VERSION=3.8.2
BISON_URL=$(GNU)/bison/bison-$(BISON_VERSION).tar.xz
FLEX_VERSION=2.6.4

2
extras/tools/tools.mak

@ -297,8 +297,6 @@ bison-$(BISON_VERSION).tar.xz:
bison: bison-$(BISON_VERSION).tar.xz
$(UNPACK)
$(APPLY) $(TOOLS)/bison-macOS-c41f233c.patch
$(APPLY) $(TOOLS)/bison-macOS-7df04f9.patch
$(MOVE)
.buildbison: bison

Loading…
Cancel
Save