All the mail mirrored from lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1] valgrind: fix uclibc c99 support detection
@ 2018-10-28  9:39 Peter Seiderer
  2018-10-28  9:44 ` Thomas Petazzoni
  2018-10-28 16:32 ` Thomas Petazzoni
  0 siblings, 2 replies; 4+ messages in thread
From: Peter Seiderer @ 2018-10-28  9:39 UTC (permalink / raw
  To: buildroot

Fixes [1]:

  checking for /home/peko/autobuild/instance-0/output/host/bin/powerpc-linux-gcc option to accept ISO C99... unsupported
  configure: error: Valgrind relies on a C compiler supporting C99

with the following in the valgrind-3.14.0/config.log:

  configure:5517: checking for .../host/bin/powerpc-linux-gcc option to accept ISO C99
  configure:5666: .../host/bin/powerpc-linux-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -fno-stack-protector -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5
  conftest.c:55:9: error: unknown type name 'wchar_t'
     const wchar_t *name;
           ^~~~~~~

[1] http://autobuild.buildroot.net/results/b25013f785a11f07e8da3735741b96036712f42a

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
---
 package/valgrind/valgrind.mk | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/package/valgrind/valgrind.mk b/package/valgrind/valgrind.mk
index f097c7be1f..459de4907e 100644
--- a/package/valgrind/valgrind.mk
+++ b/package/valgrind/valgrind.mk
@@ -36,6 +36,9 @@ endif
 
 VALGRIND_CONF_ENV = CFLAGS="$(VALGRIND_CFLAGS)"
 
+# fix uclibc configure c99 support detection
+VALGRIND_CONF_ENV += ac_cv_prog_cc_c99='-std=gnu99'
+
 # On ARM, Valgrind only supports ARMv7, and uses the arch part of the
 # host tuple to determine whether it's being built for ARMv7 or
 # not. Therefore, we adjust the host tuple to specify we're on
-- 
2.19.1

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

* [Buildroot] [PATCH v1] valgrind: fix uclibc c99 support detection
  2018-10-28  9:39 [Buildroot] [PATCH v1] valgrind: fix uclibc c99 support detection Peter Seiderer
@ 2018-10-28  9:44 ` Thomas Petazzoni
  2018-10-28 11:16   ` Peter Seiderer
  2018-10-28 16:32 ` Thomas Petazzoni
  1 sibling, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2018-10-28  9:44 UTC (permalink / raw
  To: buildroot

Hello,

On Sun, 28 Oct 2018 10:39:57 +0100, Peter Seiderer wrote:
> Fixes [1]:
> 
>   checking for /home/peko/autobuild/instance-0/output/host/bin/powerpc-linux-gcc option to accept ISO C99... unsupported
>   configure: error: Valgrind relies on a C compiler supporting C99
> 
> with the following in the valgrind-3.14.0/config.log:
> 
>   configure:5517: checking for .../host/bin/powerpc-linux-gcc option to accept ISO C99
>   configure:5666: .../host/bin/powerpc-linux-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -fno-stack-protector -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5
>   conftest.c:55:9: error: unknown type name 'wchar_t'
>      const wchar_t *name;
>            ^~~~~~~
> 
> [1] http://autobuild.buildroot.net/results/b25013f785a11f07e8da3735741b96036712f42a

So the autoconf test verifies that WCHAR support is available, which is
not (the toolchain doesn't provide it), but in practice, Valgrind does
not need WCHAR support ?

Best regards,

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

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

* [Buildroot] [PATCH v1] valgrind: fix uclibc c99 support detection
  2018-10-28  9:44 ` Thomas Petazzoni
@ 2018-10-28 11:16   ` Peter Seiderer
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Seiderer @ 2018-10-28 11:16 UTC (permalink / raw
  To: buildroot

Hello Thomas,

On Sun, 28 Oct 2018 10:44:50 +0100, Thomas Petazzoni <thomas.petazzoni@bootlin.com> wrote:

> Hello,
> 
> On Sun, 28 Oct 2018 10:39:57 +0100, Peter Seiderer wrote:
> > Fixes [1]:
> > 
> >   checking for /home/peko/autobuild/instance-0/output/host/bin/powerpc-linux-gcc option to accept ISO C99... unsupported
> >   configure: error: Valgrind relies on a C compiler supporting C99
> > 
> > with the following in the valgrind-3.14.0/config.log:
> > 
> >   configure:5517: checking for .../host/bin/powerpc-linux-gcc option to accept ISO C99
> >   configure:5666: .../host/bin/powerpc-linux-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -fno-stack-protector -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5
> >   conftest.c:55:9: error: unknown type name 'wchar_t'
> >      const wchar_t *name;
> >            ^~~~~~~
> > 
> > [1] http://autobuild.buildroot.net/results/b25013f785a11f07e8da3735741b96036712f42a  
> 
> So the autoconf test verifies that WCHAR support is available, which is
> not (the toolchain doesn't provide it), but in practice, Valgrind does
> not need WCHAR support ?

The difference in the configure.ac files is:

	$ diff -u build/valgrind-3.13.0/configure.ac build/valgrind-3.14.0/configure.ac
[...]
@@ -100,6 +113,11 @@
 fi
 rm $tmpfile
 
+# Make sure we can compile in C99 mode.
+AC_PROG_CC_C99
+if test "$ac_cv_prog_cc_c99" == "no"; then
+    AC_MSG_ERROR([Valgrind relies on a C compiler supporting C99])
+fi
[...]

But the check seems to fail in case of uclibc without WCHAR support
(but valgrind compiles fine in case the check is circumvented),
maybe the same problem as for libv4l fixed with commit
'libv4l: fix uclibc-ng configure/compile' (see [2])...

Regards,
Peter

[2] https://git.buildroot.net/buildroot/commit/package/libv4l?id=f01396a158f14c53b781c35f7ff29da0bea8c8d6

> 
> Best regards,
> 
> Thomas

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

* [Buildroot] [PATCH v1] valgrind: fix uclibc c99 support detection
  2018-10-28  9:39 [Buildroot] [PATCH v1] valgrind: fix uclibc c99 support detection Peter Seiderer
  2018-10-28  9:44 ` Thomas Petazzoni
@ 2018-10-28 16:32 ` Thomas Petazzoni
  1 sibling, 0 replies; 4+ messages in thread
From: Thomas Petazzoni @ 2018-10-28 16:32 UTC (permalink / raw
  To: buildroot

Hello,

On Sun, 28 Oct 2018 10:39:57 +0100, Peter Seiderer wrote:
> Fixes [1]:
> 
>   checking for /home/peko/autobuild/instance-0/output/host/bin/powerpc-linux-gcc option to accept ISO C99... unsupported
>   configure: error: Valgrind relies on a C compiler supporting C99
> 
> with the following in the valgrind-3.14.0/config.log:
> 
>   configure:5517: checking for .../host/bin/powerpc-linux-gcc option to accept ISO C99
>   configure:5666: .../host/bin/powerpc-linux-gcc -c -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -fno-stack-protector -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 conftest.c >&5
>   conftest.c:55:9: error: unknown type name 'wchar_t'
>      const wchar_t *name;
>            ^~~~~~~
> 
> [1] http://autobuild.buildroot.net/results/b25013f785a11f07e8da3735741b96036712f42a
> 
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> ---
>  package/valgrind/valgrind.mk | 3 +++
>  1 file changed, 3 insertions(+)

Applied to master, thanks.

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

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

end of thread, other threads:[~2018-10-28 16:32 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-10-28  9:39 [Buildroot] [PATCH v1] valgrind: fix uclibc c99 support detection Peter Seiderer
2018-10-28  9:44 ` Thomas Petazzoni
2018-10-28 11:16   ` Peter Seiderer
2018-10-28 16:32 ` 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.