Skip to content

Commit

Permalink
emulators/mame: fix build on armv7
Browse files Browse the repository at this point in the history
Mame fails to link on armv7 due to an address space exhaustion in lld.
As a bandaid, tell lld to not generate symbols.  This frees up enough
address space to make mame link.

PR:		271374
MFH:		2023Q2
Approved by:	agh@riseup.net (maintainer)
  • Loading branch information
clausecker committed May 18, 2023
1 parent bc6e8c0 commit 9fb2d7b
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions emulators/mame/Makefile
Expand Up @@ -84,6 +84,9 @@ MAKE_ENV+= DEBUG="1" \
OPTIMIZE="0" \
PROFILER="1" \
SYMBOLS="1"
.else
# avoid address space exhaustion in linker on armv7
LDFLAGS+= -s
.endif

.if ${ARCH} == amd64 || ${ARCH:Mpowerpc64*}
Expand Down Expand Up @@ -160,11 +163,11 @@ post-patch:
s| .(ARCH)||g' \
${WRKSRC}/makefile \
${GENIE}/build/gmake.bsd/genie.make
@${REINPLACE_CMD} -e 's|gcc|cc|; s|g++|c++|' \
@${REINPLACE_CMD} -e 's|gcc|${CC}|; s|g++|${CXX}|' \
${GENIE}/src/tools/gcc.lua \
${GENIE}/src/tools/snc.lua \
${GENIE}/tests/test_gmake_cpp.lua
@${REINPLACE_CMD} -e 's|= \"gcc|= \"cc|; s|= \"g++|= \"c++|' \
@${REINPLACE_CMD} -e 's|= \"gcc|= \"${CC}|; s|= \"g++|= \"${CXX}|' \
-e "s|'CXX =|'#CXX =|; s|'CC =|'#CC =|; s| .(ARCH)| |g" \
${GENIE}/src/host/scripts.c
@${GREP} -rl '"png.h"' ${WRKSRC}/src | \
Expand Down

0 comments on commit 9fb2d7b

Please sign in to comment.