* [Buildroot] [PATCH] package/janus-gateway: fix compilation with older gcc versions
@ 2015-01-04 9:59 Yann E. MORIN
2015-01-04 17:07 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Yann E. MORIN @ 2015-01-04 9:59 UTC (permalink / raw)
To: buildroot
janus-gateway forcibly uses -Wunused-but-set-variable, which is not
available for all gcc versions. For example, gcc-4.5, as used in
Sourcery CodeBench PowerPC 2011.03, does not have it.
Fixes:
http://autobuild.buildroot.org/results/6d8/6d8e15ac5d592a51b6a8d2ceb9fc1ca954428ed7/
http://autobuild.buildroot.org/results/abe/abe25b588bf6de0d76cce0135841d65dc66d5cca/
[...]
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gregory Dymarek <gregd72002@gmail.com>
---
package/janus-gateway/0002-no-unused-but-set.patch | 20 ++++++++++++++++++++
package/janus-gateway/janus-gateway.mk | 1 +
2 files changed, 21 insertions(+)
create mode 100644 package/janus-gateway/0002-no-unused-but-set.patch
diff --git a/package/janus-gateway/0002-no-unused-but-set.patch b/package/janus-gateway/0002-no-unused-but-set.patch
new file mode 100644
index 0000000..652a73f
--- /dev/null
+++ b/package/janus-gateway/0002-no-unused-but-set.patch
@@ -0,0 +1,20 @@
+Makefile: do not forcibly pass -Wunused-but-set-variable
+
+Not all versions of gcc support that warning; for example, gcc 4.5
+does not, but is still widely used.
+
+Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
+Cc: Gregory Dymarek <gregd72002@gmail.com>
+
+diff -durN a/Makefile.am b/Makefile.am
+--- a/Makefile.am
++++ b/Makefile.am
+@@ -6,7 +6,7 @@
+ -Wnested-externs -Wstrict-prototypes -Wunsafe-loop-optimizations \
+ -Wwrite-strings -Wno-missing-field-initializers -Wno-unused-parameter \
+ -Wcast-align -Wformat-nonliteral -Wformat-security -Wswitch-default \
+- -Wmissing-include-dirs -Waggregate-return -Wunused-but-set-variable \
++ -Wmissing-include-dirs -Waggregate-return \
+ -Warray-bounds -Wold-style-definition -Wsign-compare -Wlarger-than=65537
+ AM_CFLAGS += -Wno-undef # sophiasip is not -Wundef--safe
+ AM_CFLAGS += -Wredundant-decls # sophiasip also contains redundant declarations
diff --git a/package/janus-gateway/janus-gateway.mk b/package/janus-gateway/janus-gateway.mk
index 6c89e9a..47cf499 100644
--- a/package/janus-gateway/janus-gateway.mk
+++ b/package/janus-gateway/janus-gateway.mk
@@ -14,6 +14,7 @@ JANUS_GATEWAY_DEPENDENCIES = host-pkgconf libmicrohttpd jansson \
libnice sofia-sip libsrtp host-gengetopt openssl ding-libs
# Straight out of the repository, no ./configure
+# We also touch Makefile.am anyway.
JANUS_GATEWAY_AUTORECONF = YES
define JANUS_GATEWAY_M4
--
1.9.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* [Buildroot] [PATCH] package/janus-gateway: fix compilation with older gcc versions
2015-01-04 9:59 [Buildroot] [PATCH] package/janus-gateway: fix compilation with older gcc versions Yann E. MORIN
@ 2015-01-04 17:07 ` Thomas Petazzoni
2015-01-04 17:18 ` Yann E. MORIN
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2015-01-04 17:07 UTC (permalink / raw)
To: buildroot
Dear Yann E. MORIN,
On Sun, 4 Jan 2015 10:59:35 +0100, Yann E. MORIN wrote:
> janus-gateway forcibly uses -Wunused-but-set-variable, which is not
> available for all gcc versions. For example, gcc-4.5, as used in
> Sourcery CodeBench PowerPC 2011.03, does not have it.
>
> Fixes:
> http://autobuild.buildroot.org/results/6d8/6d8e15ac5d592a51b6a8d2ceb9fc1ca954428ed7/
> http://autobuild.buildroot.org/results/abe/abe25b588bf6de0d76cce0135841d65dc66d5cca/
> [...]
>
> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> Cc: Gregory Dymarek <gregd72002@gmail.com>
I have an alternate version of this patch that does detect if
-Wunused-but-set-variable is supported by gcc or not, and uses it only
when available. I believe such a patch has a higher chance of being
accepted upstream, no?
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] [PATCH] package/janus-gateway: fix compilation with older gcc versions
2015-01-04 17:07 ` Thomas Petazzoni
@ 2015-01-04 17:18 ` Yann E. MORIN
0 siblings, 0 replies; 3+ messages in thread
From: Yann E. MORIN @ 2015-01-04 17:18 UTC (permalink / raw)
To: buildroot
Thomas, All,
On 2015-01-04 18:07 +0100, Thomas Petazzoni spake thusly:
> Dear Yann E. MORIN,
>
> On Sun, 4 Jan 2015 10:59:35 +0100, Yann E. MORIN wrote:
> > janus-gateway forcibly uses -Wunused-but-set-variable, which is not
> > available for all gcc versions. For example, gcc-4.5, as used in
> > Sourcery CodeBench PowerPC 2011.03, does not have it.
> >
> > Fixes:
> > http://autobuild.buildroot.org/results/6d8/6d8e15ac5d592a51b6a8d2ceb9fc1ca954428ed7/
> > http://autobuild.buildroot.org/results/abe/abe25b588bf6de0d76cce0135841d65dc66d5cca/
> > [...]
> >
> > Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
> > Cc: Gregory Dymarek <gregd72002@gmail.com>
>
> I have an alternate version of this patch that does detect if
> -Wunused-but-set-variable is supported by gcc or not, and uses it only
> when available. I believe such a patch has a higher chance of being
> accepted upstream, no?
Yes, obviously. I'll mark my patch rejected in Patchwork, then.
Thanks!
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2015-01-04 17:18 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-01-04 9:59 [Buildroot] [PATCH] package/janus-gateway: fix compilation with older gcc versions Yann E. MORIN
2015-01-04 17:07 ` Thomas Petazzoni
2015-01-04 17:18 ` Yann E. MORIN
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox