diff options
Diffstat (limited to 'tools/bison')
| -rw-r--r-- | tools/bison/Makefile | 18 | ||||
| -rw-r--r-- | tools/bison/patches/000-relocatable.patch | 20 | ||||
| -rw-r--r-- | tools/bison/patches/010-intl-stub-compat.patch | 8 | ||||
| -rw-r--r-- | tools/bison/patches/100-fix-gets-removal.patch | 19 | ||||
| -rwxr-xr-x | tools/bison/scripts/yacc | 2 |
5 files changed, 37 insertions, 30 deletions
diff --git a/tools/bison/Makefile b/tools/bison/Makefile index 01820e27550..68e06ae33b5 100644 --- a/tools/bison/Makefile +++ b/tools/bison/Makefile @@ -1,5 +1,5 @@ -# -# Copyright (C) 2008 OpenWrt.org +# +# Copyright (C) 2008-2015 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -7,12 +7,13 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bison -PKG_VERSION:=2.4.3 +PKG_VERSION:=3.0.5 -PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2 +PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz PKG_SOURCE_URL:=@GNU/$(PKG_NAME) -PKG_MD5SUM:=c1d3ea81bc370dbd43b6f0b2cd21287e -PKG_CAT:=bzcat +PKG_HASH:=075cef2e814642e30e10e8155e93022e4a91ca38a65aa1d5467d4e969f97f338 + +HOST_BUILD_PARALLEL:=1 include $(INCLUDE_DIR)/host-build.mk @@ -21,4 +22,9 @@ define Host/Clean $(call Host/Clean/Default) endef +define Host/Install + $(call Host/Install/Default) + $(INSTALL_BIN) ./scripts/yacc $(STAGING_DIR_HOST)/bin/yacc +endef + $(eval $(call HostBuild)) diff --git a/tools/bison/patches/000-relocatable.patch b/tools/bison/patches/000-relocatable.patch deleted file mode 100644 index f83bb1e7eea..00000000000 --- a/tools/bison/patches/000-relocatable.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- a/src/Makefile.am -+++ b/src/Makefile.am -@@ -77,6 +77,7 @@ MOSTLYCLEANFILES = yacc - - yacc: - echo '#! /bin/sh' >$@ -+ echo 'test -n "$$STAGING_DIR" && exec "$$STAGING_DIR/../host/bin/bison" -y "$$@"' >>$@ - echo "exec '$(bindir)/bison' -y "'"$$@"' >>$@ - chmod a+x $@ - ---- a/src/Makefile.in -+++ b/src/Makefile.in -@@ -1352,6 +1352,7 @@ uninstall-am: uninstall-binPROGRAMS unin - - yacc: - echo '#! /bin/sh' >$@ -+ echo 'test -n "$$STAGING_DIR" && exec "$$STAGING_DIR/../host/bin/bison" -y "$$@"' >>$@ - echo "exec '$(bindir)/bison' -y "'"$$@"' >>$@ - chmod a+x $@ - diff --git a/tools/bison/patches/010-intl-stub-compat.patch b/tools/bison/patches/010-intl-stub-compat.patch index 7690e10ed8b..98234209cdc 100644 --- a/tools/bison/patches/010-intl-stub-compat.patch +++ b/tools/bison/patches/010-intl-stub-compat.patch @@ -1,8 +1,8 @@ --- a/src/main.c +++ b/src/main.c -@@ -57,9 +57,9 @@ main (int argc, char *argv[]) +@@ -60,9 +60,9 @@ { - program_name = argv[0]; + set_program_name (argv[0]); setlocale (LC_ALL, ""); - (void) bindtextdomain (PACKAGE, LOCALEDIR); - (void) bindtextdomain ("bison-runtime", LOCALEDIR); @@ -11,5 +11,5 @@ + bindtextdomain ("bison-runtime", LOCALEDIR); + textdomain (PACKAGE); - uniqstrs_new (); - + { + char const *cp = getenv ("LC_CTYPE"); diff --git a/tools/bison/patches/100-fix-gets-removal.patch b/tools/bison/patches/100-fix-gets-removal.patch new file mode 100644 index 00000000000..563c12040c5 --- /dev/null +++ b/tools/bison/patches/100-fix-gets-removal.patch @@ -0,0 +1,19 @@ +diff --git a/lib/stdio.in.h b/lib/stdio.in.h +index ff7c9c8..f391832 100644 +--- a/lib/stdio.in.h ++++ b/lib/stdio.in.h +@@ -739,14 +739,6 @@ _GL_WARN_ON_USE (getline, "getline is unportable - " + # endif + #endif + +-/* It is very rare that the developer ever has full control of stdin, +- so any use of gets warrants an unconditional warning; besides, C11 +- removed it. */ +-#undef gets +-#if HAVE_RAW_DECL_GETS && !defined __cplusplus +-_GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); +-#endif +- + #if @GNULIB_OBSTACK_PRINTF@ || @GNULIB_OBSTACK_PRINTF_POSIX@ + struct obstack; + /* Grow an obstack with formatted output. Return the number of diff --git a/tools/bison/scripts/yacc b/tools/bison/scripts/yacc new file mode 100755 index 00000000000..8f73e26fb13 --- /dev/null +++ b/tools/bison/scripts/yacc @@ -0,0 +1,2 @@ +#!/bin/sh +exec bison -y "$@" |
