cross-compiling strace on non-Linux build

Dmitry V. Levin ldv at altlinux.org
Thu Jan 12 13:37:18 UTC 2017


Hi,

On Wed, Jan 11, 2017 at 10:58:26PM -0800, Alexey Neyman wrote:
> Hi,
> 
> I've encountered a problem with cross-compiling strace - as a part of 
> crosstool-ng on MacOS [1]. While compiling ioctlsort.c, strace uses 
> CC_FOR_BUILD, so it wants to include <linux/ioctl.h> header from the 
> host - which is obviously missing on MacOS.

This is a problem since ioctlsort.c needs <linux/ioctl.h>
from the target system, not from the host system.

One probably can take necessary definitions from the target
<linux/ioctl.h> using a cross-preprocessor and use them
in ioctlsort.c instead of <linux/ioctl.h>.


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


More information about the Strace-devel mailing list