[PATCH] xorg-macros: don’t use input redirection when invoking cpp
Submitted by Michael Stapelberg
Assigned to Xorg Project Team
Link to original bug (#108751)
Description
Created attachment 142471 patch v1
Quoting the commit message:
xorg-macros: don’t use input redirection when invoking cpp
When cross-compiling, the AC_PATH_PROGS call will not find “cpp” (it doesn’t look for e.g. i686-pc-linux-gnu-cpp). Instead, it will use the ${CPP} fallback, which autoconf’s AC_PROG_CPP sets to $CC -E by default, i.e. “i686-pc-linux-gnu-gcc -E” in our example.
$CC -E does not support reading files from stdin (whereas cpp does):
% i686-pc-linux-gnu-gcc -E < conftest.c
i686-pc-linux-gnu-gcc: fatal error: no input files
compilation terminated.
To fix this, we can either:
-
Pass the filename to conftest.$ac_ext (what this patch does). This seems like the simpler solution to me, unless it is desired that the filename does not end up in the output (why?).
-
Specify “-” as filename, which causes both cpp and $CC -E to read from stdin.
Patch 142471, "patch v1":
0001-xorg-macros-don-t-use-input-redirection-when-invokin.patch
Version: git