[arch-commits] Commit in nsjail/trunk (2 files)
Evangelos Foutras
foutrelis at archlinux.org
Sun Mar 14 01:25:26 UTC 2021
Date: Sunday, March 14, 2021 @ 01:25:26
Author: foutrelis
Revision: 890761
Fix build with bison >= 3.7.5
Added:
nsjail/trunk/replace-YYUSE-with-attribute-unused-in-src-parser.y.patch
Modified:
nsjail/trunk/PKGBUILD
-----------------------------------------------------------+
PKGBUILD | 8 ++
replace-YYUSE-with-attribute-unused-in-src-parser.y.patch | 33 ++++++++++++
2 files changed, 39 insertions(+), 2 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2021-03-14 01:23:45 UTC (rev 890760)
+++ PKGBUILD 2021-03-14 01:25:26 UTC (rev 890761)
@@ -10,11 +10,15 @@
depends=(protobuf libnl)
makedepends=(git)
source=("https://github.com/google/nsjail/archive/${pkgver}/${pkgname}-${pkgver}.tar.gz"
- 'git+https://github.com/google/kafel.git#commit=8e69b8efae415cde3debffbb1e379d9e7a16835a')
+ 'git+https://github.com/google/kafel.git#commit=8e69b8efae415cde3debffbb1e379d9e7a16835a'
+ replace-YYUSE-with-attribute-unused-in-src-parser.y.patch)
sha256sums=('cfa66d3ed136b2e221752287b95e544915e8a6760aa866f023b604d14a374919'
- 'SKIP')
+ 'SKIP'
+ '9773c57a2eaa3460a0656a5fdc3603d141aac34ded53e18e29a890fd5b7a71f8')
prepare() {
+ # https://github.com/google/kafel/pull/28
+ patch -Np1 -d kafel <replace-YYUSE-with-attribute-unused-in-src-parser.y.patch
mv kafel ${pkgname}-${pkgver}
}
Added: replace-YYUSE-with-attribute-unused-in-src-parser.y.patch
===================================================================
--- replace-YYUSE-with-attribute-unused-in-src-parser.y.patch (rev 0)
+++ replace-YYUSE-with-attribute-unused-in-src-parser.y.patch 2021-03-14 01:25:26 UTC (rev 890761)
@@ -0,0 +1,33 @@
+From 521aab466e50f822298ae7bf817b14c1b9eaab74 Mon Sep 17 00:00:00 2001
+From: Evangelos Foutras <evangelos at foutrelis.com>
+Date: Sun, 14 Mar 2021 03:20:43 +0200
+Subject: [PATCH] Replace YYUSE with attribute unused in src/parser.y
+
+The YYUSE macro was renamed to YY_USE in bison 3.7.5; might as well
+avoid using it altogether, and instead mark the variable as unused.
+
+Fixes the following linker error:
+
+/usr/bin/ld: kafel/libkafel.a(libkafel.o): in function `kafel_yyerror':
+arm_syscalls.c:(.text+0x6984): undefined reference to `YYUSE'
+---
+ src/parser.y | 5 ++---
+ 1 file changed, 2 insertions(+), 3 deletions(-)
+
+diff --git a/src/parser.y b/src/parser.y
+index e0f109c..e5980c9 100644
+--- a/src/parser.y
++++ b/src/parser.y
+@@ -418,10 +418,9 @@ const_def
+
+ %%
+
+-void yyerror(YYLTYPE * loc, struct kafel_ctxt* ctxt, yyscan_t scanner,
+- const char *msg) {
++void yyerror(YYLTYPE * loc, struct kafel_ctxt* ctxt,
++ __attribute__((unused)) yyscan_t scanner, const char *msg) {
+ if (!ctxt->lexical_error) {
+- YYUSE(scanner);
+ if (loc->filename != NULL) {
+ append_error(ctxt, "%s:%d:%d: %s", loc->filename, loc->first_line, loc->first_column, msg);
+ } else {
More information about the arch-commits
mailing list