Skip to contentSkip to conversation

libtasn1: add upstream build fix patch

PATCH New Gustavo Zacarias 3 participants 3 messages Aug 9, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 libtasn1: add upstream build fix patch

Under certain circumstances the build will fail because some warnings are treated as errors, such as:

./parser_aux.h:97:1: error: inlining failed in call to '_asn1_set_down':
call is unlikely and code size would grow [-Werror=inline] ASN1.y:437:59: error: called from here [-Werror=inline]
cc1: all warnings being treated as errors

Add upstream patch to address this.

---
 ...configure-don-t-add-Werror-to-build-flags.patch | 28 ++++++++++++++++++++++
 package/libtasn1/libtasn1.mk                       |  2 ++
 2 files changed, 30 insertions(+)
 create mode 100644 package/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch
package/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch new file +28 -0
new file mode 100644
index 0000000..387ba7a
@@ -0,0 +1,28 @@
+From dd091c8af163213e12aa92f61bc4916e0f102633 Mon Sep 17 00:00:00 2001
+From: Nikos Mavrogiannopoulos <[email protected]>
+Date: Tue, 26 Jul 2016 08:45:33 +0200
+Subject: [PATCH] configure: don't add -Werror to build flags
+
+Signed-off-by: Gustavo Zacarias <[email protected]>
+---
+Patch status: upstream
+
+ configure.ac | 2 --
+ 1 file changed, 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 7a14e04..066f5fe 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -70,8 +70,6 @@ AC_ARG_ENABLE([gcc-warnings],
+ )
+ 
+ if test "$gl_gcc_warnings" = yes; then
+-  gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
+-
+   nw="$nw -Wsystem-headers"         # Don't let system headers trigger warnings
+   nw="$nw -Wc++-compat"             # We don't care strongly about C++ compilers
+   nw="$nw -Wtraditional"            # Warns on #elif which we use often
+-- 
+2.7.3
+
package/libtasn1/libtasn1.mk +2 -0
index c51d8c0..2987fb2 100644
@@ -12,5 +12,7 @@ LIBTASN1_LICENSE_FILES = COPYING COPYING.LIB
 LIBTASN1_INSTALL_STAGING = YES
 # 'missing' fallback logic botched so disable it completely
 LIBTASN1_CONF_ENV = MAKEINFO="true"
+# For 0001-configure-don-t-add-Werror-to-build-flags.patch
+LIBTASN1_AUTORECONF = YES
 
 $(eval $(autotools-package))
Signature · 1 line
2.7.3
#1 lore raw

PATCH 1/1 libtasn1: add upstream build fix patch

Hello,

Quoted 11 lines · Gustavo Zacarias

Under certain circumstances the build will fail because some warnings are treated as errors, such as:

./parser_aux.h:97:1: error: inlining failed in call to '_asn1_set_down':
call is unlikely and code size would grow [-Werror=inline] ASN1.y:437:59: error: called from here [-Werror=inline]
cc1: all warnings being treated as errors

Add upstream patch to address this.

After discussing on IRC, this patch is not needed: the current version of libtasn1, 4.8, has the gcc-warnings option disabled by default, so it does not add -Werror.

Apparently, the problem starts with version 4.9, which Gustavo was about to submit as a security fix. In this case --disable-gcc-warnings should be used.

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 libtasn1: add upstream build fix patch

Quoted 18 lines · Thomas Petazzoni

Hello,

Quoted 11 lines · Gustavo Zacarias

Under certain circumstances the build will fail because some warnings are treated as errors, such as:

./parser_aux.h:97:1: error: inlining failed in call to '_asn1_set_down':
call is unlikely and code size would grow [-Werror=inline] ASN1.y:437:59: error: called from here [-Werror=inline]
cc1: all warnings being treated as errors

Add upstream patch to address this.

Quoted 7 lines

After discussing on IRC, this patch is not needed: the current version of libtasn1, 4.8, has the gcc-warnings option disabled by default, so it does not add -Werror.

Apparently, the problem starts with version 4.9, which Gustavo was about to submit as a security fix. In this case --disable-gcc-warnings should be used.

I guess you are using -Os in that case
-Wno-error=inline in CFLAGS should suffice if version of compiler in use supports it. --disable-gcc-warnings is a broader brush might suppress
more important warnings.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 204 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160809/90f1fcb1/attachment.asc>