Skip to content

Commit

Permalink
configure: do not try yasm on x32
Browse files Browse the repository at this point in the history
Signed-off-by: Sage Weil <[email protected]>
  • Loading branch information
liewegas committed Sep 8, 2014
1 parent 9ab46dc commit 6307536
Showing 1 changed file with 21 additions and 9 deletions.
30 changes: 21 additions & 9 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -87,18 +87,30 @@ AM_CXXFLAGS="${AM_CXXFLAGS}"
# Check for yasm
if yasm -f elf64 src/common/crc32c_intel_fast_asm.S -o /dev/null; then
echo 'we have a modern and working yasm'
if test `arch` = "x86_64"; then
if test `arch` = "x86_64" ; then
echo 'we are x86_64'
AC_DEFINE([HAVE_GOOD_YASM_ELF64], [1], [we have a recent yasm and are x86_64])
with_good_yasm=yes

if yasm -f elf64 -i src/ceph/src/ceph/src/erasure-code/isa/isa-l/include/ src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s -o /dev/null 2> /dev/null ; then
echo 'yasm can also build the isa-l stuff'
AC_DEFINE([HAVE_BETTER_YASM_ELF64], [1], [yasm can also build the isa-l])
with_better_yasm=yes
arch_x32=0
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([], [[
#if defined(__x86_64__) && defined(__ILP32__)
#error x32
#endif]])], [], [arch_x32=1])
if test $arch_x32 -eq 0 ; then
echo 'we are not x32'
AC_DEFINE([HAVE_GOOD_YASM_ELF64], [1], [we have a recent yasm and are x86_64])
with_good_yasm=yes

if yasm -f elf64 -i src/ceph/src/ceph/src/erasure-code/isa/isa-l/include/ src/erasure-code/isa/isa-l/erasure_code/gf_vect_dot_prod_avx2.asm.s -o /dev/null 2> /dev/null ; then
echo 'yasm can also build the isa-l stuff'
AC_DEFINE([HAVE_BETTER_YASM_ELF64], [1], [yasm can also build the isa-l])
with_better_yasm=yes
else
echo "yasm doesn't build the isa-l stuff"
fi
else
echo "yasm doesn't build the isa-l stuff"
echo 'we are x32; no yasm for you'
fi
else
echo 'we are not x86_64 && !x32'
fi
else
echo 'we do not have a modern/working yasm'
Expand Down

0 comments on commit 6307536

Please sign in to comment.