* [Buildroot] [PATCH] zlog: Add patch to remove -Werror
@ 2014-10-26 19:34 Ezequiel Garcia
2014-10-26 20:52 ` Thomas Petazzoni
2014-10-26 21:08 ` Thomas Petazzoni
0 siblings, 2 replies; 6+ messages in thread
From: Ezequiel Garcia @ 2014-10-26 19:34 UTC (permalink / raw)
To: buildroot
Add patch to remove -Werror and avoid build errors because of warnings.
Fixes: http://autobuild.buildroot.net/results/6935e1107d832e5678c8742239eccd89d4abed47/
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
--
Sent upstream: https://github.com/HardySimpson/zlog/pull/68
---
...ove-Werror-and-avoid-build-failures-becau.patch | 38 ++++++++++++++++++++++
1 file changed, 38 insertions(+)
create mode 100644 package/zlog/zlog-02-compile-Remove-Werror-and-avoid-build-failures-becau.patch
diff --git a/package/zlog/zlog-02-compile-Remove-Werror-and-avoid-build-failures-becau.patch b/package/zlog/zlog-02-compile-Remove-Werror-and-avoid-build-failures-becau.patch
new file mode 100644
index 0000000..0f1b912
--- /dev/null
+++ b/package/zlog/zlog-02-compile-Remove-Werror-and-avoid-build-failures-becau.patch
@@ -0,0 +1,38 @@
+From 4a08c9e07fa8b7a1d6a76b927ea97e3eaa784845 Mon Sep 17 00:00:00 2001
+From: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
+Date: Sun, 26 Oct 2014 16:16:25 -0300
+Subject: [PATCH] compile: Remove -Werror and avoid build failures because of
+ warnings
+
+Using -Werror on production is a bad idea, as otherwise harmless warnings
+get treated as errors breaking builds. This is currently the case with
+Nios-II architecture toolchain, warning about a deprecated macro:
+
+../usr/nios2-buildroot-linux-gnu/sysroot/usr/include/features.h:148:3:
+error: #warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE" [-Werror=cpp]
+ # warning "_BSD_SOURCE and _SVID_SOURCE are deprecated, use _DEFAULT_SOURCE"
+
+Instead of trying to fix the macro, let's fix the real issue here,
+and remove -Werror.
+
+Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
+---
+ src/makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/makefile b/src/makefile
+index 294dc08..4ac4c43 100644
+--- a/src/makefile
++++ b/src/makefile
+@@ -32,7 +32,7 @@ ZLOG_MINOR=2
+ # Fallback to gcc when $CC is not in $PATH.
+ CC:=$(shell sh -c 'type $(CC) >/dev/null 2>/dev/null && echo $(CC) || echo gcc')
+ OPTIMIZATION?=-O2
+-WARNINGS=-Wall -Werror -Wstrict-prototypes -fwrapv
++WARNINGS=-Wall -Wstrict-prototypes -fwrapv
+ DEBUG?= -g -ggdb
+ REAL_CFLAGS=$(OPTIMIZATION) -fPIC -pthread $(CFLAGS) $(WARNINGS) $(DEBUG)
+ REAL_LDFLAGS=$(LDFLAGS) -pthread
+--
+2.1.0
+
--
2.1.0
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] zlog: Add patch to remove -Werror
2014-10-26 19:34 [Buildroot] [PATCH] zlog: Add patch to remove -Werror Ezequiel Garcia
@ 2014-10-26 20:52 ` Thomas Petazzoni
2014-10-27 2:44 ` Ezequiel Garcia
2014-10-26 21:08 ` Thomas Petazzoni
1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2014-10-26 20:52 UTC (permalink / raw)
To: buildroot
Dear Ezequiel Garcia,
On Sun, 26 Oct 2014 16:34:39 -0300, Ezequiel Garcia wrote:
> +Instead of trying to fix the macro, let's fix the real issue here,
> +and remove -Werror.
I actually think the real problem should also be fixed :)
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] zlog: Add patch to remove -Werror
2014-10-26 19:34 [Buildroot] [PATCH] zlog: Add patch to remove -Werror Ezequiel Garcia
2014-10-26 20:52 ` Thomas Petazzoni
@ 2014-10-26 21:08 ` Thomas Petazzoni
1 sibling, 0 replies; 6+ messages in thread
From: Thomas Petazzoni @ 2014-10-26 21:08 UTC (permalink / raw)
To: buildroot
Dear Ezequiel Garcia,
On Sun, 26 Oct 2014 16:34:39 -0300, Ezequiel Garcia wrote:
> Add patch to remove -Werror and avoid build errors because of warnings.
>
> Fixes: http://autobuild.buildroot.net/results/6935e1107d832e5678c8742239eccd89d4abed47/
> Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
> --
> Sent upstream: https://github.com/HardySimpson/zlog/pull/68
> ---
> ...ove-Werror-and-avoid-build-failures-becau.patch | 38 ++++++++++++++++++++++
> 1 file changed, 38 insertions(+)
> create mode 100644 package/zlog/zlog-02-compile-Remove-Werror-and-avoid-build-failures-becau.patch
Applied, thanks.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] zlog: Add patch to remove -Werror
2014-10-26 20:52 ` Thomas Petazzoni
@ 2014-10-27 2:44 ` Ezequiel Garcia
2014-10-27 7:02 ` Thomas Petazzoni
0 siblings, 1 reply; 6+ messages in thread
From: Ezequiel Garcia @ 2014-10-27 2:44 UTC (permalink / raw)
To: buildroot
On 10/26/2014 05:52 PM, Thomas Petazzoni wrote:
> Dear Ezequiel Garcia,
>
> On Sun, 26 Oct 2014 16:34:39 -0300, Ezequiel Garcia wrote:
>
>> +Instead of trying to fix the macro, let's fix the real issue here,
>> +and remove -Werror.
>
> I actually think the real problem should also be fixed :)
>
But which is the real problem: the BSD_SOURCE macro usage or the warning
in the toolchain?
Other architectures are not producing any warning, so this sounds like
yet another issue with the toolchain.
--
Ezequiel Garcia, VanguardiaSur
www.vanguardiasur.com.ar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141026/edfe55cd/attachment.asc>
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] zlog: Add patch to remove -Werror
2014-10-27 2:44 ` Ezequiel Garcia
@ 2014-10-27 7:02 ` Thomas Petazzoni
2014-10-27 10:59 ` Ezequiel Garcia
0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2014-10-27 7:02 UTC (permalink / raw)
To: buildroot
Dear Ezequiel Garcia,
On Sun, 26 Oct 2014 23:44:58 -0300, Ezequiel Garcia wrote:
> But which is the real problem: the BSD_SOURCE macro usage or the warning
> in the toolchain?
The BSD_SOURCE macro usage.
> Other architectures are not producing any warning, so this sounds like
> yet another issue with the toolchain.
That's because NIOS II is for now the only toolchain using glibc 2.20,
which has deprecated certain macros. Packages should be converted, as
such warnings will also appear with other toolchain as they start using
glibc 2.20.
See commit 116733c6c211f49d7ba5fff5883f682eb72106a3 for instance.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Buildroot] [PATCH] zlog: Add patch to remove -Werror
2014-10-27 7:02 ` Thomas Petazzoni
@ 2014-10-27 10:59 ` Ezequiel Garcia
0 siblings, 0 replies; 6+ messages in thread
From: Ezequiel Garcia @ 2014-10-27 10:59 UTC (permalink / raw)
To: buildroot
On 10/27/2014 04:02 AM, Thomas Petazzoni wrote:
> Dear Ezequiel Garcia,
>
> On Sun, 26 Oct 2014 23:44:58 -0300, Ezequiel Garcia wrote:
>
>> But which is the real problem: the BSD_SOURCE macro usage or the warning
>> in the toolchain?
>
> The BSD_SOURCE macro usage.
>
>> Other architectures are not producing any warning, so this sounds like
>> yet another issue with the toolchain.
>
> That's because NIOS II is for now the only toolchain using glibc 2.20,
> which has deprecated certain macros. Packages should be converted, as
> such warnings will also appear with other toolchain as they start using
> glibc 2.20.
>
> See commit 116733c6c211f49d7ba5fff5883f682eb72106a3 for instance.
>
Great, thanks. I hadn't noticed you fixed a similar thing before.
--
Ezequiel Garcia, VanguardiaSur
www.vanguardiasur.com.ar
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20141027/a610790e/attachment.asc>
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2014-10-27 10:59 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-26 19:34 [Buildroot] [PATCH] zlog: Add patch to remove -Werror Ezequiel Garcia
2014-10-26 20:52 ` Thomas Petazzoni
2014-10-27 2:44 ` Ezequiel Garcia
2014-10-27 7:02 ` Thomas Petazzoni
2014-10-27 10:59 ` Ezequiel Garcia
2014-10-26 21:08 ` Thomas Petazzoni
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.