[PATCH] Re: cross-compiling strace on non-Linux build

Alexey Neyman stilor at att.net
Thu Jan 12 21:20:33 UTC 2017


On 01/12/2017 05:37 AM, Dmitry V. Levin wrote:
> 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>.
... which is one of the solutions I suggested in the portion of the 
email you snipped.

Please find the patch attached.

Regards,
Alexey.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Get-ioctl-definitions-from-host-not-build.patch
Type: text/x-patch
Size: 5251 bytes
Desc: not available
URL: <http://lists.strace.io/pipermail/strace-devel/attachments/20170112/bf37ebb7/attachment.bin>


More information about the Strace-devel mailing list