change: ./configure: we no longer need to pass in -msse4.2 with the latest LuaJIT.

This commit is contained in:
Yichun Zhang (agentzh) 2020-10-27 01:00:42 -07:00
parent fcee0d36da
commit 29b901d4cd
2 changed files with 224 additions and 421 deletions

File diff suppressed because it is too large Load Diff

45
util/configure vendored
View File

@ -739,51 +739,6 @@ _END_
$luajit_xcflags .= " -DLUAJIT_DISABLE_GC64";
}
if (!$user_luajit_xcflags
|| $user_luajit_xcflags !~ /-msse4\.2\b/)
{
# check -msse4.2
my ($out, $cfile) = tempfile("resty-config-XXXXXX",
SUFFIX => '.c', TMPDIR => 1,
UNLINK => 1);
print $out "
int main(void) {
#ifndef __SSE4_2__
# error SSE 4.2 not found
#endif
return 0;
}
";
close $out;
my $ofile = tmpnam();
my $comp = ($cc || 'cc');
my $found;
if (system("$comp -o $ofile -msse4.2 -c $cfile") == 0
&& -s $ofile)
{
unlink $ofile;
if (system("$comp -o $ofile -march=native -c $cfile") == 0
&& -s $ofile)
{
print "INFO: found -msse4.2 in $comp.\n";
$found = 1;
$luajit_xcflags .= " -msse4.2";
}
}
if (-f $ofile) {
unlink $ofile;
}
if (!$found) {
print "WARNING: -msse4.2 not supported in $comp.\n";
}
}
if ($platform eq 'macosx') {
# to work around a bug in the Xcode toolchain in macOS 11.15:
# https://github.com/openresty/homebrew-brew/issues/10