File tree Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Expand file tree Collapse file tree 2 files changed +19
-2
lines changed Original file line number Diff line number Diff line change @@ -59,5 +59,5 @@ EXTRA_DIST = nasm_lt.sh
5959# x86_64 only
6060if USE_ASM
6161.asm.lo :
62- $(LIBTOOL ) --mode=compile --tag YASM $(srcdir ) /nasm_lt.sh $(YASM ) -f elf64 $(YAFLAGS ) -I$(srcdir ) -I. $< -o $@
62+ $(LIBTOOL ) --mode=compile --tag YASM $(srcdir ) /nasm_lt.sh $(YASM ) -f $( YASM_BINFMT ) $(YAFLAGS ) -I$(srcdir ) -I. $< -o $@
6363endif
Original file line number Diff line number Diff line change @@ -73,7 +73,23 @@ if test x$YASM = x; then
7373 fi
7474 has_64bit_asm=no
7575else
76- has_64bit_asm=yes
76+ case x"$host_os" in
77+ x*-gnux32)
78+ YASM_BINFMT=elfx32
79+ ;;
80+ *)
81+ YASM_BINFMT=elf64
82+ ;;
83+ esac
84+ if $YASM -f help | grep -q $YASM_BINFMT; then
85+ has_64bit_asm=yes
86+ else
87+ if test x"$set_field" = x"64bit_asm"; then
88+ AC_MSG_ERROR ( [ $set_field field support explicitly requested but yasm doesn't support $YASM_BINFMT format] )
89+ fi
90+ AC_MSG_WARN ( [ yasm too old for $YASM_BINFMT format] )
91+ has_64bit_asm=no
92+ fi
7793fi
7894] )
7995
@@ -273,6 +289,7 @@ AC_SUBST(SECP_INCLUDES)
273289AC_SUBST ( SECP_LIBS )
274290AC_SUBST ( SECP_TEST_LIBS )
275291AC_SUBST ( SECP_TEST_INCLUDES )
292+ AC_SUBST ( YASM_BINFMT )
276293AM_CONDITIONAL([ USE_ASM] , [ test x"$set_field" == x"64bit_asm"] )
277294AM_CONDITIONAL([ USE_TESTS] , [ test x"$use_tests" != x"no"] )
278295AM_CONDITIONAL([ USE_BENCHMARK] , [ test x"$use_benchmark" != x"no"] )
You can’t perform that action at this time.
0 commit comments