提交 30752dd7 编写于 作者: R Richard Levitte

Check gcc version to see if it supports -MM and friends

According to manuals found here: https://gcc.gnu.org/onlinedocs/, GNU
C version 3 and on support the dependency generation options.  We
therefore need to check the gcc version to see if we're going to use
it or makedepend for dependency generation.
Reviewed-by: NAndy Polyakov <appro@openssl.org>
上级 dca5c701
......@@ -1104,7 +1104,11 @@ if ($^O ne "VMS" && !$disabled{makedepend}) {
$config{makedepprog} = which('makedepend');
open(PIPE, "$ccpcc --version 2>&1 | head -2 |");
while ( <PIPE> ) {
$config{makedepprog} = $ccpcc if /clang|gcc/;
# Find the version number and save the major.
m|(?:.*)\b(\d+)\.\d+\.\d+\b(?:.*)|;
# We know that GNU C version 3 and up as well as all clang
# versions support dependency generation
$config{makedepprog} = $ccpcc if /clang/ || (/gcc/ && $1 > 3);
$ecc = "clang" if /clang/;
$ecc = "gcc" if /gcc/;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册