[Bug 271374] emulators/mame-0.254 fails to build on {amd64,i386}-14-CURRENT

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 16 May 2023 23:38:14 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=271374

--- Comment #8 from Robert Clausecker <fuz@FreeBSD.org> ---
Took a crack at fixing the linking problem on armv7 today.  I tried to use the
bfd and gold linkers, but neither reduced memory usage, even with all memory
saving options enabled.  Even compiling with -Os didn't help.

Weirdly enough, lld crashes at 2 GB of memory usage.  I thought armv7 programs
can use 4 GB of virtual address space on arm64 hosts, but it seems like I'm
wrong.

What finally did the trick was passing LDFLAGS=-s to the makefile, stripping
the binary as it was linked.

Another solution I had so far not checked might be to unbundle bundled
dependencies, reducing the total amount of text and data involved in the link.

Note also that as of now, mame ignores CC and CXX passed in from the host and
instead hard codes to cc and c++.  This is wrong.  I've a patch ready that
should address this.

-- 
You are receiving this mail because:
You are the assignee for the bug.