Initial commit
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
Some checks failed
Build Kernel / Build all affected Kernels (push) Has been cancelled
Build all core packages / Build all core packages for selected target (push) Has been cancelled
Build and Push prebuilt tools container / Build and Push all prebuilt containers (push) Has been cancelled
Build Toolchains / Build Toolchains for each target (push) Has been cancelled
Build host tools / Build host tools for linux and macos based systems (push) Has been cancelled
Coverity scan build / Coverity x86/64 build (push) Has been cancelled
This commit is contained in:
33
tools/bison/Makefile
Normal file
33
tools/bison/Makefile
Normal file
@@ -0,0 +1,33 @@
|
||||
#
|
||||
# Copyright (C) 2008-2015 OpenWrt.org
|
||||
#
|
||||
# This is free software, licensed under the GNU General Public License v2.
|
||||
# See /LICENSE for more information.
|
||||
#
|
||||
include $(TOPDIR)/rules.mk
|
||||
|
||||
PKG_NAME:=bison
|
||||
PKG_VERSION:=3.8.2
|
||||
|
||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||
PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
|
||||
PKG_HASH:=06c9e13bdf7eb24d4ceb6b59205a4f67c2c7e7213119644430fe82fbd14a0abb
|
||||
PKG_CPE_ID:=cpe:/a:gnu:bison
|
||||
|
||||
HOST_BUILD_PARALLEL:=1
|
||||
|
||||
include $(INCLUDE_DIR)/host-build.mk
|
||||
|
||||
HOST_CONFIGURE_ARGS += --enable-threads=posix --disable-nls
|
||||
|
||||
define Host/Install
|
||||
$(call Host/Install/Default)
|
||||
$(INSTALL_BIN) ./scripts/yacc $(STAGING_DIR_HOST)/bin/yacc
|
||||
endef
|
||||
|
||||
define Host/Uninstall
|
||||
rm -f $(STAGING_DIR_HOST)/bin/yacc
|
||||
-$(call Host/Compile/Default,uninstall)
|
||||
endef
|
||||
|
||||
$(eval $(call HostBuild))
|
||||
43
tools/bison/patches/000-relocatable.patch
Normal file
43
tools/bison/patches/000-relocatable.patch
Normal file
@@ -0,0 +1,43 @@
|
||||
--- a/src/files.c
|
||||
+++ b/src/files.c
|
||||
@@ -560,9 +560,9 @@ pkgdatadir (void)
|
||||
char const *
|
||||
m4path (void)
|
||||
{
|
||||
- char const *m4 = getenv ("M4");
|
||||
+ char const *m4 = getenv ("STAGING_DIR_HOST");
|
||||
if (m4)
|
||||
- return m4;
|
||||
+ return strcat(getenv ("STAGING_DIR_HOST"), "/bin/m4");
|
||||
|
||||
/* We don't use relocate2() to store the temporary buffer and re-use
|
||||
it, because m4path() is only called once. */
|
||||
--- a/src/getargs.c
|
||||
+++ b/src/getargs.c
|
||||
@@ -373,11 +373,13 @@ usage (int status)
|
||||
A --long option is required.
|
||||
Otherwise, add exceptions to ../build-aux/cross-options.pl. */
|
||||
|
||||
- printf (_("Usage: %s [OPTION]... FILE\n"), program_name);
|
||||
+ printf (_("Usage: STAGING_DIR_HOST=... %s [OPTION]... FILE\n"), program_name);
|
||||
fputs (_("\
|
||||
Generate a deterministic LR or generalized LR (GLR) parser employing\n\
|
||||
LALR(1), IELR(1), or canonical LR(1) parser tables.\n\
|
||||
\n\
|
||||
+Environment Variable STAGING_DIR_HOST controls path to m4\n\
|
||||
+\n\
|
||||
"), stdout);
|
||||
|
||||
fputs (_("\
|
||||
@@ -450,6 +452,11 @@ Output Files:\n\
|
||||
-M, --file-prefix-map=OLD=NEW replace prefix OLD with NEW when writing file paths\n\
|
||||
in output files\n\
|
||||
"), stdout);
|
||||
+
|
||||
+ fputs (_("\
|
||||
+Environment Variables:\n\
|
||||
+ STAGING_DIR_HOST Path to m4 is [STAGING_DIR_HOST]/bin/m4\n\
|
||||
+"), stdout);
|
||||
putc ('\n', stdout);
|
||||
|
||||
argmatch_report_usage (stdout);
|
||||
2
tools/bison/scripts/yacc
Executable file
2
tools/bison/scripts/yacc
Executable file
@@ -0,0 +1,2 @@
|
||||
#!/bin/sh
|
||||
exec bison -y "$@"
|
||||
Reference in New Issue
Block a user