On Monday 14 August 2006 5:06 pm, Matthias Kilian wrote:
> Linking xmame.x11 ...
> [...]
> /usr/lib/crt0.o(.text+0x58): In function `_start':
> : relocation truncated to fit: R_PPC_REL24 exit
> /usr/lib/crtbegin.o(.text+0x134): In function `__register_frame_info':
> : relocation truncated to fit: R_PPC_REL24 atexit
> xmame.obj/artwork.o(.text+0x4d0): In function `artwork_create_display':
> : relocation truncated to fit: R_PPC_REL24 memset
> xmame.obj/artwork.o(.text+0x1668): In function `artwork_show':
> : relocation truncated to fit: R_PPC_REL24 strcmp
> xmame.obj/artwork.o(.text+0x4dac): In function `artwork_load_artwork_file':
> : relocation truncated to fit: R_PPC_REL24 __stack_smash_handler
> xmame.obj/artwork.o(.text+0x4dd0): In function `artwork_load_artwork_file':
> : relocation truncated to fit: R_PPC_REL24 sprintf
> xmame.obj/artwork.o(.text+0x5120): In function `open_and_read_png':
> : relocation truncated to fit: R_PPC_REL24 free
> xmame.obj/artwork.o(.text+0x5280): In function `load_bitmap':
> : relocation truncated to fit: R_PPC_REL24 free
> xmame.obj/artwork.o(.text+0x54f0): In function `load_bitmap':
> : relocation truncated to fit: R_PPC_REL24 free
> xmame.obj/artwork.o(.text+0x55f0): In function `load_alpha_bitmap':
> : relocation truncated to fit: R_PPC_REL24 free
> xmame.obj/artwork.o(.text+0x5838): In function `load_alpha_bitmap':
> : additional relocation overflows omitted from the output
> gmake[1]: *** [xmame.x11] Error 1

This is because the resulting executable is too large for
the 24bit offsets in the branch instruction on macppc.
Using -Wl,--relax will fix this.

> Wasn't there something similar some weeks ago?

Yea that was sane-backends - it was the same problem but
in that case it was caused by a bug in the code instead
of it actually being too big.

Here's the update to get xmame to build on macppc:

Index: Makefile
===================================================================
RCS file: /cvs/ports/emulators/xmame/Makefile,v
retrieving revision 1.23
diff -u -r1.23 Makefile
--- Makefile    6 Jun 2006 09:23:16 -0000       1.23
+++ Makefile    15 Aug 2006 22:48:39 -0000
@@ -7,9 +7,9 @@
 VERSION=       0.104
 DISTNAME=      xmame-${VERSION}
 
-PKGNAME=       xmame+xmess-${VERSION}
-PKGNAME-mame=  xmame-${VERSION}
-PKGNAME-mess=  xmess-${VERSION}
+PKGNAME=       xmame+xmess-${VERSION}p0
+PKGNAME-mame=  xmame-${VERSION}p0
+PKGNAME-mess=  xmess-${VERSION}p0
 
 CATEGORIES=    emulators games
 MASTER_SITES=  ${HOMEPAGE}/download/ \
@@ -100,6 +100,10 @@
 .elif ${MACHINE_ARCH} == "hppa" || ${MACHINE_ARCH} == "powerpc" || \
       ${MACHINE_ARCH} == "sparc"
 MAKE_FLAGS+=   MY_CPU=risc
+.endif
+
+.if ${MACHINE_ARCH} == "powerpc"
+MAKE_FLAGS+=   LD="${CC} -Wl,-s,--relax"
 .endif
 
 LIB_DEPENDS+=  expat::textproc/expat

Reply via email to