Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] libssh: workaround -Werror=strict-overflow build failures
@ 2018-12-11 13:19 Baruch Siach
  2018-12-14 21:52 ` Thomas Petazzoni
  0 siblings, 1 reply; 3+ messages in thread
From: Baruch Siach @ 2018-12-11 13:19 UTC (permalink / raw)
  To: buildroot

Add a patch that disables -Werror=strict-overflow to fix the build with
some versions of gcc.

Fixes:
http://autobuild.buildroot.net/results/414/41490ebb181762d14c565effb0155db7ac1e0db0/
http://autobuild.buildroot.net/results/3a6/3a6395fd85f434ff855d602949166d5cec725c7e/
http://autobuild.buildroot.net/results/224/22422145e7fc9a8ab4e766b174a916e599845f1c/

Cc: Scott Fan <fancp2007@gmail.com>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
 .../0001-Disable-Werror-strict-overflow.patch | 34 +++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 package/libssh/0001-Disable-Werror-strict-overflow.patch

diff --git a/package/libssh/0001-Disable-Werror-strict-overflow.patch b/package/libssh/0001-Disable-Werror-strict-overflow.patch
new file mode 100644
index 000000000000..8870fbf6d12c
--- /dev/null
+++ b/package/libssh/0001-Disable-Werror-strict-overflow.patch
@@ -0,0 +1,34 @@
+From 0ab36988ff211eac2559546f87585ef5a3a14527 Mon Sep 17 00:00:00 2001
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Tue, 11 Dec 2018 15:04:29 +0200
+Subject: [PATCH] Disable -Werror=strict-overflow
+
+This options causes build failures with gcc 5 and 6.
+
+The issue reported upstream:
+
+  https://www.libssh.org/archive/libssh/2018-12/0000004.html
+
+Patch CompilerChecks.cmake for that, since there is no way to override
+the C flags in the cmake or make commands.
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+Upstream status: not upstreamable; issue reported upstream
+---
+ CompilerChecks.cmake | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/CompilerChecks.cmake b/CompilerChecks.cmake
+index 4d5ef0279c26..da70f4f38d37 100644
+--- a/CompilerChecks.cmake
++++ b/CompilerChecks.cmake
+@@ -99,4 +99,5 @@ if (OSX)
+     add_c_compiler_flag("-Wno-deprecated-declarations" SUPPORTED_COMPILER_FLAGS)
+ endif()
+ 
++add_c_compiler_flag("-Wno-error=strict-overflow" SUPPORTED_COMPILER_FLAGS)
+ set(DEFAULT_C_COMPILE_FLAGS ${SUPPORTED_COMPILER_FLAGS} CACHE INTERNAL "Default C Compiler Flags" FORCE)
+-- 
+2.19.2
+
-- 
2.19.2

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] libssh: workaround -Werror=strict-overflow build failures
  2018-12-11 13:19 [Buildroot] [PATCH] libssh: workaround -Werror=strict-overflow build failures Baruch Siach
@ 2018-12-14 21:52 ` Thomas Petazzoni
  2018-12-15 19:51   ` Baruch Siach
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2018-12-14 21:52 UTC (permalink / raw)
  To: buildroot

Hello,

On Tue, 11 Dec 2018 15:19:39 +0200, Baruch Siach wrote:
> Add a patch that disables -Werror=strict-overflow to fix the build with
> some versions of gcc.
> 
> Fixes:
> http://autobuild.buildroot.net/results/414/41490ebb181762d14c565effb0155db7ac1e0db0/
> http://autobuild.buildroot.net/results/3a6/3a6395fd85f434ff855d602949166d5cec725c7e/
> http://autobuild.buildroot.net/results/224/22422145e7fc9a8ab4e766b174a916e599845f1c/
> 
> Cc: Scott Fan <fancp2007@gmail.com>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>

What about not using -Werror instead?

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Buildroot] [PATCH] libssh: workaround -Werror=strict-overflow build failures
  2018-12-14 21:52 ` Thomas Petazzoni
@ 2018-12-15 19:51   ` Baruch Siach
  0 siblings, 0 replies; 3+ messages in thread
From: Baruch Siach @ 2018-12-15 19:51 UTC (permalink / raw)
  To: buildroot

Hi Thomas,

Thomas Petazzoni writes:
> On Tue, 11 Dec 2018 15:19:39 +0200, Baruch Siach wrote:
>> Add a patch that disables -Werror=strict-overflow to fix the build with
>> some versions of gcc.
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/414/41490ebb181762d14c565effb0155db7ac1e0db0/
>> http://autobuild.buildroot.net/results/3a6/3a6395fd85f434ff855d602949166d5cec725c7e/
>> http://autobuild.buildroot.net/results/224/22422145e7fc9a8ab4e766b174a916e599845f1c/
>>
>> Cc: Scott Fan <fancp2007@gmail.com>
>> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
>
> What about not using -Werror instead?

The CompilerChecks.cmake files adds a long list of specific -Werror=xxx
options. A removal of -Werror would not be enough.

baruch

--
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2018-12-15 19:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-11 13:19 [Buildroot] [PATCH] libssh: workaround -Werror=strict-overflow build failures Baruch Siach
2018-12-14 21:52 ` Thomas Petazzoni
2018-12-15 19:51   ` Baruch Siach

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox