From 09a54d765f96c1d6eed8fdbbc42aa3b47fa8f331 Mon Sep 17 00:00:00 2001 From: Andre Heider Date: Sun, 9 May 2010 13:31:34 +0000 Subject: Fallback to the nasm compatible yasm. svn-id: r48980 --- Makefile.common | 2 +- configure | 21 +++++++++++++++++---- 2 files changed, 18 insertions(+), 5 deletions(-) diff --git a/Makefile.common b/Makefile.common index 1aa61b1709..419090a705 100644 --- a/Makefile.common +++ b/Makefile.common @@ -132,7 +132,7 @@ ifdef USE_NASM # Build rule for NASM assembler files %.o: %.asm $(QUIET)$(MKDIR) $(*D) - $(QUIET_NASM)$(NASM) -O1 $(NASMFLAGS) -g -o $*.o $(<) + $(QUIET_NASM)$(NASM) $(NASMFLAGS) -o $*.o $(<) endif # Include the dependency tracking files. diff --git a/configure b/configure index a5377dbee6..9801288bc3 100755 --- a/configure +++ b/configure @@ -2191,11 +2191,24 @@ if test "$_have_x86" = yes ; then for path_dir in $_nasmpath; do if test -x "$path_dir/nasm$NATIVEEXEEXT" ; then NASM="$path_dir/nasm$NATIVEEXEEXT" + NASMFLAGS="-O1 -g" echo $NASM break fi done + # fallback to the nasm compatible yasm + if test x$NASM = x -o x$NASM = x'"$NASM"'; then + for path_dir in $_nasmpath; do + if test -x "$path_dir/yasm$NATIVEEXEEXT" ; then + NASM="$path_dir/yasm$NATIVEEXEEXT" + NASMFLAGS="-a x86 -m x86" + echo $NASM + break + fi + done + fi + IFS="$ac_save_ifs" if test x$NASM = x -o x$NASM = x'"$NASM"'; then @@ -2204,16 +2217,16 @@ if test "$_have_x86" = yes ; then else case $_host_os in os2-emx*) - NASMFLAGS="-f aout" + NASMFLAGS="$NASMFLAGS -f aout" ;; mingw*) - NASMFLAGS="-f win32" + NASMFLAGS="$NASMFLAGS -f win32" ;; darwin*) - NASMFLAGS="-f macho" + NASMFLAGS="$NASMFLAGS -f macho" ;; *) - NASMFLAGS="-f elf" + NASMFLAGS="$NASMFLAGS -f elf" ;; esac _nasm=yes -- cgit v1.2.3