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

pull/670/head
Yichun Zhang (agentzh) 4 years ago
parent fcee0d36da
commit 29b901d4cd

File diff suppressed because it is too large Load Diff

45
util/configure vendored

@ -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

Loading…
Cancel
Save