[arch-commits] Commit in acpica/trunk (PKGBUILD fix-gcc8-compilation.patch)

Bruno Pagani archange at archlinux.org
Tue Jun 5 22:20:06 UTC 2018


    Date: Tuesday, June 5, 2018 @ 22:20:05
  Author: archange
Revision: 340654

upgpkg: acpica 20180531-2

Proper fix for the build failure with GCC8.

Added:
  acpica/trunk/fix-gcc8-compilation.patch
Modified:
  acpica/trunk/PKGBUILD

----------------------------+
 PKGBUILD                   |   15 ++++++---
 fix-gcc8-compilation.patch |   71 +++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 81 insertions(+), 5 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2018-06-05 22:15:53 UTC (rev 340653)
+++ PKGBUILD	2018-06-05 22:20:05 UTC (rev 340654)
@@ -5,7 +5,7 @@
 
 pkgname=acpica
 pkgver=20180531
-pkgrel=1
+pkgrel=2
 pkgdesc="ACPI tools, including Intel ACPI Source Language compiler"
 arch=('x86_64')
 url="https://acpica.org"
@@ -16,13 +16,18 @@
 conflicts=('iasl')
 replaces=('iasl')
 options=('!makeflags')
-source=("https://acpica.org/sites/acpica/files/acpica-unix-${pkgver}.tar.gz")
-sha256sums=('8f6cdcaa4039c2b3db141117ec8223f0e1297684b8ab47839e211bddad027665')
+source=("https://acpica.org/sites/acpica/files/acpica-unix-${pkgver}.tar.gz"
+        'fix-gcc8-compilation.patch')
+sha256sums=('8f6cdcaa4039c2b3db141117ec8223f0e1297684b8ab47839e211bddad027665'
+            '8f1dac990ca7a05855ac34d90ac76e77434481f7c6e4679de1337e3621a88a53')
 
+prepare() {
+  cd acpica-unix-${pkgver}
+  patch -p1 -i ../fix-gcc8-compilation.patch
+}
+
 build() {
   cd acpica-unix-${pkgver}
-  # https://github.com/acpica/acpica/issues/387
-  export CFLAGS="${CFLAGS} -Wno-error=format-overflow"
   make
 }
 

Added: fix-gcc8-compilation.patch
===================================================================
--- fix-gcc8-compilation.patch	                        (rev 0)
+++ fix-gcc8-compilation.patch	2018-06-05 22:20:05 UTC (rev 340654)
@@ -0,0 +1,71 @@
+From 935ca65f7806a3ef9bd02a947e50f3a1f586ac67 Mon Sep 17 00:00:00 2001
+From: Erik Schmauss <erik.schmauss at intel.com>
+Date: Fri, 1 Jun 2018 16:05:52 -0700
+Subject: [PATCH] iASL: increase the length of MsgBuffer to avoid overflow
+
+There are some functions that attempt to store 2 String buffers in
+MsgBuffer. This causes compiler warnings due to potential overflow
+of MsgBuffer.
+
+By increasing the MsgBuffer, we retain current behavior for functions
+using StringBuffer. This also results in separating the size between
+MsgBuffer and StringBuffer.
+
+Signed-off-by: Erik Schmauss <erik.schmauss at intel.com>
+---
+ source/common/dmextern.c     | 2 +-
+ source/compiler/aslglobal.h  | 7 ++++---
+ source/compiler/asloptions.c | 2 +-
+ 3 files changed, 6 insertions(+), 5 deletions(-)
+
+diff --git a/source/common/dmextern.c b/source/common/dmextern.c
+index 8aab4807e2..df0e1b97e0 100644
+--- a/source/common/dmextern.c
++++ b/source/common/dmextern.c
+@@ -538,7 +538,7 @@ AcpiDmGetExternalsFromFile (
+ 
+     /* Each line defines a method */
+ 
+-    while (fgets (StringBuffer, ASL_MSG_BUFFER_SIZE, ExternalRefFile))
++    while (fgets (StringBuffer, ASL_STRING_BUFFER_SIZE, ExternalRefFile))
+     {
+         Token = strtok (StringBuffer, METHOD_SEPARATORS);   /* "External" */
+         if (!Token)
+diff --git a/source/compiler/aslglobal.h b/source/compiler/aslglobal.h
+index 93c51fae56..e22f476fc0 100644
+--- a/source/compiler/aslglobal.h
++++ b/source/compiler/aslglobal.h
+@@ -251,7 +251,8 @@ extern int                  AslCompilerdebug;
+ 
+ 
+ #define ASL_DEFAULT_LINE_BUFFER_SIZE    (1024 * 32) /* 32K */
+-#define ASL_MSG_BUFFER_SIZE             (1024 * 32) /* 32k */
++#define ASL_MSG_BUFFER_SIZE             (1024 * 128) /* 128k */
++#define ASL_STRING_BUFFER_SIZE          (1024 * 32) /* 32k */
+ #define ASL_MAX_DISABLED_MESSAGES       32
+ #define ASL_MAX_EXPECTED_MESSAGES       32
+ #define HEX_TABLE_LINE_SIZE             8
+@@ -438,8 +439,8 @@ ASL_EXTERN UINT8                    AslGbl_NamespaceEvent;
+ 
+ ASL_EXTERN UINT8                    Gbl_AmlBuffer[HEX_LISTING_LINE_SIZE];
+ ASL_EXTERN char                     MsgBuffer[ASL_MSG_BUFFER_SIZE];
+-ASL_EXTERN char                     StringBuffer[ASL_MSG_BUFFER_SIZE];
+-ASL_EXTERN char                     StringBuffer2[ASL_MSG_BUFFER_SIZE];
++ASL_EXTERN char                     StringBuffer[ASL_STRING_BUFFER_SIZE];
++ASL_EXTERN char                     StringBuffer2[ASL_STRING_BUFFER_SIZE];
+ ASL_EXTERN UINT32                   Gbl_DisabledMessages[ASL_MAX_DISABLED_MESSAGES];
+ ASL_EXTERN ASL_EXPECTED_MESSAGE     Gbl_ExpectedMessages[ASL_MAX_EXPECTED_MESSAGES];
+ 
+diff --git a/source/compiler/asloptions.c b/source/compiler/asloptions.c
+index 2b1e6027fd..0f575c8ab6 100644
+--- a/source/compiler/asloptions.c
++++ b/source/compiler/asloptions.c
+@@ -1080,7 +1080,7 @@ AslDoResponseFile (
+      * Process all lines in the response file. There must be one complete
+      * option per line
+      */
+-    while (fgets (StringBuffer, ASL_MSG_BUFFER_SIZE, ResponseFile))
++    while (fgets (StringBuffer, ASL_STRING_BUFFER_SIZE, ResponseFile))
+     {
+         /* Compress all tokens, allowing us to use a single argv entry */
+ 



More information about the arch-commits mailing list