gens-2.12 compiles fine using nasm-0.98.36 but does not with nasm-0.98.37. Reproducible: Always Steps to Reproduce: 1. emerge nasm-0.98.37 2. emerge gens Actual Results: nasm -D__GCC2 -f elf -O3 vdp_rend.asm -ovdp_rend.o nasm -D__GCC2 -f elf -O3 z80.asm -oz80.o vdp_rend.asm:1748: error: short jump is out of range vdp_rend.asm:1882: error: short jump is out of range ..... vdp_rend.asm:2233: error: short jump is out of range vdp_rend.asm:2260: error: phase error detected at end of assembly. make: *** [vdp_rend.o] Error 1 make: *** Waiting for unfinished jobs.... !!! ERROR: app-emulation/gens-2.12 failed. !!! Function games_src_compile, Line 110, Exitcode 2 !!! emake failed Expected Results: gens to compile ok Portage 2.0.49-r3 (default-x86-1.4, gcc-3.2.3, glibc-2.3.2-r1, 2.4.20-gentoo-r6) ================================================================= System uname: 2.4.20-gentoo-r6 i686 Intel(R) Pentium(R) 4 CPU 2.00GHz ccache version 2.2 [enabled] ACCEPT_KEYWORDS="x86 ~x86" AUTOCLEAN="yes" CFLAGS="-pipe" CHOST="i686-pc-linux-gnu" COMPILER="gcc3" CONFIG_PROTECT="/etc /var/qmail/control /usr/kde/2/share/config /usr/kde/3/share/config /usr/X11R6/lib/X11/xkb /usr/kde/3.1/share/config /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/config" CONFIG_PROTECT_MASK="/etc/afs/C /etc/afs/afsws /etc/gconf /etc/env.d" CXXFLAGS="-pipe" DISTDIR="/usr/portage/distfiles" FEATURES="sandbox autoaddcvs ccache" GENTOO_MIRRORS="http://gentoo.oregonstate.edu http://www.ibiblio.org/pub/Linux/distributions/gentoo" MAKEOPTS="-j2" PKGDIR="/usr/portage/packages" PORTAGE_TMPDIR="/var/tmp" PORTDIR="/usr/portage" PORTDIR_OVERLAY="" SYNC="rsync://rsync.gentoo.org/gentoo-portage" USE="x86 oss apm avi crypt cups encode foomaticdb gif gpm jpeg gnome libg++ mad mikmod mmx mpeg ncurses nls pdflib png quicktime spell truetype xml2 xmms xv zlib gtkhtml gdbm berkdb slang readline arts bonobo svga java X sdl tcpd pam libwww ssl perl python esd imlib oggvorbis gtk qt kde motif opengl 3dfx cdr doc dvd sse tcltk tetex -3dnow"
It looks like it's the -O3 flag causing the error in this particular case. Running nasm manually: # cd /var/tmp/portage/gens-2.12/work/gens_linux/gens # nasm -D__GCC2 -f elf -O3 vdp_rend.asm -ovdp_rend.o vdp_rend.asm:1748: error: short jump is out of range vdp_rend.asm:1882: error: short jump is out of range ..... vdp_rend.asm:2233: error: short jump is out of range vdp_rend.asm:2260: error: phase error detected at end of assembly. # nasm -D__GCC2 -f elf -O2 vdp_rend.asm -ovdp_rend.o vdp_rend.asm:1748: error: short jump is out of range vdp_rend.asm:1882: error: short jump is out of range ..... vdp_rend.asm:2233: error: short jump is out of range vdp_rend.asm:2260: error: phase error detected at end of assembly. # nasm -D__GCC2 -f elf -O1 vdp_rend.asm -ovdp_rend.o # Note that the -O3 flag used by nasm is not set via CFLAGS.
nasm-0.98.37's -f elf support is totally broken. I've masked this version of nasm in package.mask. I'm going to close this bug because it's not really a game bug and will hopefully be resolved with the next release of nasm.
nasm's problem
.38 fixes this
use nasm-0.98.38
oh, and you need gens-2.12a which is now in cvs ;)