CC_FOR_BUILD 宏定义问题
admin
2023-02-19 21:20:42
0

说明

        编译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脚本没有搜索到任何的信息


文件夹目录下config/config.guess中对CC_FOR_BUILD进行了详细的说明

# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
# compiler to aid in system detection is discouraged as it requires
# temporary files to be created and, as you can see below, it is a
# headache to deal with in a portable fashion.

# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
# use `HOST_CC' if defined, but it is deprecated.


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

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).



config.guess这里对宏定义进行了赋值

set_cc_for_build='
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
: ${TMPDIR=/tmp} ;
 { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
 { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
 { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
 { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
dummy=$tmp/dummy ;
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
case $CC_FOR_BUILD,$HOST_CC,$CC in
 ,,)    echo "int x;" > $dummy.c ;
 for c in cc gcc c89 c99 ; do
   if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
      CC_FOR_BUILD="$c"; break ;
   fi ;
 done ;
 if test x"$CC_FOR_BUILD" = x ; then
   CC_FOR_BUILD=no_compiler_found ;
 fi
 ;;
 ,,*)   CC_FOR_BUILD=$CC ;;
 ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
esac ; set_cc_for_build= ;'




相关内容

热门资讯

最新引进“十胡卡.真的有挂吗?... 最新引进“十胡卡.真的有挂吗?”确实真的有挂您好,十胡卡这个游戏其实有挂的,确实是有挂的,需要了解加...
终于懂了“同城游跑胡子.怎么开... 网上科普关于“同城游跑胡子有没有挂”话题很是火热,小编也是针对同城游跑胡子作*弊开挂的方法以及开挂对...
【第一消息】“微乐海南麻将.辅... 家人们!今天小编来为大家解答微乐海南麻将透视挂怎么安装这个问题咨询软件客服徽9784099的挂在哪里...
降低家庭养育成本,中国拟对托育... 12月22日,托育服务法草案提请十四届全国人大常委会第十九次会议首次审议。草案共8章76条,包括总则...
我来教教您“哪吒重生.开挂器?... 有 亲,根据资深记者爆料哪吒重生是可以开挂的,确实有挂(咨询软件无需打开...
俄称普京愿与马克龙展开对话,法... 【环球网报道】据美国政治新闻网站(Politico)等外媒报道,俄总统新闻秘书、克宫发言人佩斯科夫当...
【第一资讯】“丽水都莱.怎么开... 您好:丽水都莱这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款游戏...
【第一资讯】“人海牛牛.可以开... 网上科普关于“人海牛牛有没有挂”话题很是火热,小编也是针对人海牛牛作*弊开挂的方法以及开挂对应的知识...
终于懂了“乐暴延边麻将.开挂器... 家人们!今天小编来为大家解答乐暴延边麻将透视挂怎么安装这个问题咨询软件客服徽4282891的挂在哪里...
今日重大发现“白金岛红拐弯.开... 您好:白金岛红拐弯这款游戏可以开挂,确实是有挂的,需要了解加客服微信【9752949】很多玩家在这款...