CC_FOR_BUILD 宏定义问题

说明

        编译indent-2.2.12出错

/indent-2.2.12/man'
o texinfo2man ./texinfo2man.c
make[2]: o: Command not found
make[2]: [Makefile:546: texinfo2man] Error 127 (ignored)
./texinfo2man ./indent.1.in ./../doc/indent.texi > indent.1
/bin/sh: ./texinfo2man: No such file or directory
make[2]: *** [Makefile:549: indent.1] Error 127
make[2]: Leaving directory '/3thrdparty/indent-2.2.12/man'
make[1]: *** [Makefile:455: all-recursive] Error 1
make[1]: Leaving directory '/3thrdparty/indent-2.2.12'
make: *** [Makefile:393: all] Error 2

排查man/Makefile编译文件

$(CC_FOR_BUILD) -o $@ ${srcdir}/texinfo2man.c

无法识别CC_FOR_BUILD

解决该问题,可以通过修改宏定义

$(CC) -o $@ ${srcdir}/texinfo2man.c


引申

autoconf cached variables (CC_FOR_BUILD),搜索autoconf脚本没有搜索到任何的信息


在其他的开源中定义了该宏定义

secp256k1/build-aux/m4/ax_prog_cc_for_build.m4

This macro searches for a C compiler that generates native executables,
#   that is a C compiler that surely is not a cross-compiler. This can be
#   useful if you have to generate source code at compile-time like for
#   example GCC does.
#
#   The macro sets the CC_FOR_BUILD and CPP_FOR_BUILD macros to anything
#   needed to compile or link (CC_FOR_BUILD) and preprocess (CPP_FOR_BUILD).
#   The value of these variables can be overridden by the user by specifying
#   a compiler with an environment variable (like you do for standard CC).




上一篇:linux – 用于32位LSB MIPS MIPS32架构的编译器


下一篇:Java——java.lang.NullPointerException