cross-compiling strace 4.20 for ARM

Dmitry V. Levin ldv at altlinux.org
Wed Nov 22 10:01:25 UTC 2017


On Wed, Nov 22, 2017 at 10:49:12AM +0100, Felix von Leitner wrote:
> > thanks for the quick help!
> 
> > > > So I add an
> > > > 
> > > >   #ifndef IOV_MAX
> > > >   #define IOV_MAX 1024
> > > >   #endif
> > > > 
> > > > Same issue in msghdr.c.
> 
> > > IOV_MAX *must* be provided by <limits.h>; if it isn't, then your cross-compiling
> > > environment is not quite functional.
> 
> > A-ha! That gets me somewhere. I'll investigate.
> 
> Interestingly enough, IOV_MAX is not even defined by limits.h on my
> non-cross-setup that compiled strace just fine:
> 
>   $ gcc -E -
>   #include <limits.h>
>   IOV_MAX
>   [Ctrl-D]
> 
>   ->
> 
>   [...]
>   # 2 "<stdin>" 2
> 
>   IOV_MAX
> 
> Most bizarre. It does appear if I define _GNU_SOURCE — both on ARM and
> on x86_64.
> 
> Are you sure about this?

It's _XOPEN_SOURCE, but as configure.ac contains AC_USE_SYSTEM_EXTENSIONS,
I suppose _GNU_SOURCE is defined anyway.

> > > All these constants are generated during build,
> > > their definitions should be in sen.h file.
> 
> > All right! Turns out you run
> 
> >   cat -- linux/xtensa/syscallent.h
> 
> > and the -- is a GNU extension that my cat does not understand. I'll
> > re-run the build with GNU cat now.
> 
> If I support "cat -- foo.c" in my cat, the build goes though (modulo the
> IOV_MAX issue).

We can get rid of "--" in this place, it's not needed that much.


-- 
ldv
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 801 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20171122/27c43f71/attachment.bin>


More information about the Strace-devel mailing list