[parted-devel] [PATCH 1/3] configure.ac: Check ABI against ABI version 2

Shin'ichiro Kawasaki kawasaki at juno.dti.ne.jp
Sat Jun 15 08:00:53 BST 2019


GCC 8 fails to compile libparted/labels/aix.c with an error:

  CC       aix.lo
cc1: error: -Wabi won't warn about anything [-Werror=abi]
cc1: note: -Wabi warns about differences from the most up-to-date ABI, which is
also used by default
cc1: note: use e.g. -Wabi=11 to warn about changes from GCC 7
cc1: all warnings being treated as errors
make[4]: *** [Makefile:1250: aix.lo] Error 1

To avoid the build failure, specify ABI version 2 to check ABI change
from GCC 4.9.

Signed-off-by: Shin'ichiro Kawasaki <kawasaki at juno.dti.ne.jp>
---
 configure.ac | 1 +
 1 file changed, 1 insertion(+)

diff --git a/configure.ac b/configure.ac
index 8413e06..6f38c95 100644
--- a/configure.ac
+++ b/configure.ac
@@ -234,6 +234,7 @@ if test "$gl_gcc_warnings" = yes; then
   gl_WARN_ADD([-Wno-unused-parameter]) # Too many warnings for now
   gl_WARN_ADD([-Wno-unused-macros]) # Too many warnings for now
   gl_WARN_ADD([-Wno-format-nonliteral])
+  gl_WARN_ADD([-Wabi=2])               # Avoid compile failure with GCC8
 
   # FIXME: investigate these
   gl_WARN_ADD([-Wno-jump-misses-init])
-- 
2.22.0




More information about the parted-devel mailing list