[Git][java-team/libjna-java][master] Fix FTBFS with gcc-10 due to warning that cannot be checked correctly (Closes: #966889)
Emmanuel Bourg
gitlab at salsa.debian.org
Thu Feb 4 07:14:19 GMT 2021
Emmanuel Bourg pushed to branch master at Debian Java Maintainers / libjna-java
Commits:
c09ec0d4 by Dimitri John Ledkov at 2021-02-04T01:15:01+01:00
Fix FTBFS with gcc-10 due to warning that cannot be checked correctly (Closes: #966889)
- - - - -
3 changed files:
- debian/changelog
- + debian/patches/96c5df1d4d5985b31ddd8d5953d849ab64002f1d.patch
- debian/patches/series
Changes:
=====================================
debian/changelog
=====================================
@@ -1,3 +1,11 @@
+libjna-java (5.5.0-1.1) unstable; urgency=medium
+
+ * Non-maintainer upload.
+ * Fix FTBFS with gcc-10 due to warning that cannot be checked
+ correctly. Closes: #966889
+
+ -- Dimitri John Ledkov <xnox at ubuntu.com> Mon, 24 Aug 2020 11:53:52 +0100
+
libjna-java (5.5.0-1) unstable; urgency=medium
* Team upload.
=====================================
debian/patches/96c5df1d4d5985b31ddd8d5953d849ab64002f1d.patch
=====================================
@@ -0,0 +1,48 @@
+From 96c5df1d4d5985b31ddd8d5953d849ab64002f1d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Matthias=20Bl=C3=A4sing?= <mblaesing at doppel-helix.eu>
+Date: Sun, 9 Aug 2020 13:08:06 +0200
+Subject: [PATCH] Fix build error on GCC 10 caused by alloca bound warnings
+
+Since GCC 10 warnings for unbounded alloca calls are turned on by
+default. The size of the allocation comes from the java side of the
+bindings and thus appears to be unchecked on the native side.
+---
+ CHANGES.md | 2 +-
+ native/Makefile | 10 ++++++++--
+ 2 files changed, 9 insertions(+), 3 deletions(-)
+
+Index: libjna-java-5.5.0/native/Makefile
+===================================================================
+--- libjna-java-5.5.0.orig/native/Makefile
++++ libjna-java-5.5.0/native/Makefile
+@@ -321,7 +321,7 @@ endif
+ endif
+
+ # CC_OPTS only applied to objects build for jnidispatch, not for libffi
+-# -Wno-unknown-warning-option
++# -Wno-unknown-warning-option
+ # => Suppress warning for unknown warnings
+ # -Werror => Treat warnings as errors
+ # -Wno-clobbered => Silence GCC warning about clobbered automatic variables.
+@@ -329,6 +329,12 @@ endif
+ # that implements "protected" mode. In that case an exception
+ # is raised and the value of the potentially clobbered
+ # variables is ignored.
++# -Wno-alloca-larger-than => Silence warnings about unbounded alloca calls in
++# the dispatch logic. GCC tries to assert, that the size of
++# the allocated memory is bounded and thus a check for the
++# variable needs to be inplace. For the JNA case, the size
++# comes from the Java side, so checks are not visible on the
++# C side and thus can't be checked there.
+ #
+ # Enable this only on GCC versions, that can work with it. It is assumed, that
+ # GCC version 4.X is the lower bound. That version is problematic, as it
+@@ -337,7 +343,7 @@ ifeq ($(CC),gcc)
+ GCC_MAJOR_VERSION = $(shell gcc -dumpversion | cut -f 1 -d '.')
+ ifneq ($(GCC_MAJOR_VERSION),4)
+ ifneq ($(GCC_MAJOR_VERSION),3)
+- LOC_CC_OPTS=-Wno-unknown-warning-option -Werror -Wno-clobbered -Wno-unused-variable
++ LOC_CC_OPTS=-Wno-unknown-warning-option -Werror -Wno-clobbered -Wno-unused-variable -Wno-alloca-larger-than
+ endif
+ endif
+ else
=====================================
debian/patches/series
=====================================
@@ -5,3 +5,4 @@
10-disable-full-jar.patch
14-rename-native-library.patch
18-build-directory-in-soname.patch
+96c5df1d4d5985b31ddd8d5953d849ab64002f1d.patch
View it on GitLab: https://salsa.debian.org/java-team/libjna-java/-/commit/c09ec0d4c929cdea3b6e995487d0b36d8bb5b26f
--
View it on GitLab: https://salsa.debian.org/java-team/libjna-java/-/commit/c09ec0d4c929cdea3b6e995487d0b36d8bb5b26f
You're receiving this email because of your account on salsa.debian.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-java-commits/attachments/20210204/fe6b0636/attachment.html>
More information about the pkg-java-commits
mailing list