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:
parent
795f52d06c
commit
1f7f6a31b2
util
|
@ -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/^ +//;
|
||||
|
|
Loading…
Reference in New Issue