configure flags: --prefix=/nix/store/l06rvwfzdvpabvgzzad4d3zy0pk8rd45-gcc-4.4.7 --disable-multilib --with-ppl=/nix/store/qkydvl67jamj9k2538a7b7467gqx073i-ppl-1.2 --with-cloog=/nix/store/zbn4xs136ccagbjvl7ka8br3f3w9w1gj-cloog-ppl-0.15.11 --with-gmp=/nix/store/7mrq5v4nnqfkv1ka7a0kdw9mzvqs5w3c-gmp-6.1.2 --with-mpfr=/nix/store/9429azblcx1y9apas3azxxd38imcmsy0-mpfr-4.0.2 --disable-libstdcxx-pch --without-included-gettext --with-system-zlib --enable-languages=c\,c++
日志的一部分:
../../gcc-4.4.7/libcpp/macro.c:1730:8: error: format not a string literal and no format arguments [-Werror=format-security]
cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
^~~~~~~~~
../../gcc-4.4.7/libcpp/macro.c:1743:8: error: format not a string literal and no format arguments [-Werror=format-security]
cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
^~~~~~~~~
我试图添加CFLAGS=-Wno-error
,但没有影响它。我也使用sed替换Werror=format-security
,它也失败了。
我的猜测是你正在使用更新版本的编译器(在4.4.7发布时不存在),带有新的和加强的警告。
编写的语言GCC在某些时候已经从C变为C ++。如果那是在4.4之前(不确定;将要检查),那么CFLAGS
没有效果的原因很明显 - 尝试设置CXXFLAGS
。
(为了保留一些历史:我最初发布的答案建议使用CFLAGS_FOR_TARGET
,这是错误的,因为libcpp不是目标库,因此使用系统编译器构建,而不是刚构建的那个)