[PATCH] libXt: util: don't link makestrs with target cflags

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Wed Nov 21 06:28:59 PST 2012

Dear Jon TURNEY,

On Wed, 21 Nov 2012 14:19:53 +0000, Jon TURNEY wrote:

> It was useful in including string.h, and hence preventing a load of warnings
> :-), so perhaps you could include that instead.
> I'm not sure I totally buy your reasoning, as X11/Xos.h might be doing
> something necessary on some obscure platform.

The reasoning is that XT_CFLAGS adds a -I path that points to the
target headers, which creates build failures because makestrs is built
for the build machine (and not the machine targeted by the cross

See the end of
for details.

You see that we're building makestrs (for the build machine, with the
native gcc), but it includes things
from /home/test/test/output/host/usr/arm-buildroot-linux-gnueabi/sysroot/usr/include/stdio.h
which is the sysroot of the cross-compilation toolchain.

This is incorrect. If X11/Xos.h is really needed, then those XT_CFLAGS
should be modified to point to the build machine headers. But since
X11/Xos.h is really not needed to build makestrs, I'm not sure there's
a point.

Though, adding <string.h> would indeed be good, as you suggested.

Best regards,

Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.

More information about the xorg-devel mailing list