bugfix: LuaJIT compilation might fail when old gcc 4 compilers are used (like gcc 4.1.0). this regression had appeared in OpenResty 1.7.7.2. thanks aseiot for the report in #85.

This commit is contained in:
Yichun Zhang (agentzh) 2015-03-09 23:22:35 -07:00
parent 795f52d06c
commit 1f7f6a31b2
1 changed files with 11 additions and 0 deletions

11
util/configure vendored
View File

@ -549,6 +549,17 @@ _END_
my $extra_opts = ' TARGET_STRIP=@: CCDEBUG=-g';
{
my $comp = ($cc || 'cc');
my $ver = `$comp --version`;
if (defined $ver && $ver =~ /\(GCC\) (\d+\.\d+)/) {
my $v = $1;
if ($v < 4.5) {
$luajit_xcflags .= " -std=gnu99";
}
}
}
if ($opts->{debug}) {
$luajit_xcflags .= " -DLUA_USE_APICHECK -DLUA_USE_ASSERT";
$luajit_xcflags =~ s/^ +//;