Created attachment 242233 [details] emulators/mame: add arm64 support With the attached trivial patch mame builds on arm64.
Oh fsck yeah! arm64 support, very awesome. > @@ -52,7 +52,8 @@ MAKE_ENV= FULLNAME="mame" \ > SDL_NETWORK="pcap" \ > SUBTARGET="${MSUBTARGET}" \ > TARGET="${MTARGET}" \ > - USE_NETWORK=1 > + USE_NETWORK=1 \ > + SYMBOLS=1 SYMBOLS is also defined in the ${PORT_OPTIONS:MDEBUG} conditional, does it need to be defined here also? > + freebsd_x64_clang: generate $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang/Makefile > ++ $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64 precompile > ++ $(SILENT) $(MAKE) -C $(PROJECTDIR)/$(MAKETYPE)-freebsd-clang config=$(CONFIG)64 Instead of patching the makefile, does passing PRECOMPILE=1 to ${MAKE_ENV} achieve the same? I am finding that I need to disable PRECOMPILE at the moment, I noted that pkgsrc does the same.
Sorry, the bit about SYMBOLS was a local experiment to see why stripping made the build work on armv7. Will remove that from the final patch. > Instead of patching the makefile, does passing PRECOMPILE=1 to ${MAKE_ENV} achieve the same? I am finding that I need to disable PRECOMPILE at the moment, I noted that pkgsrc does the same. This change adds a new make rule freebsd_arm64_clang doing the same thing as freebsd_x64_clang. It does not add a precompile target where there previously was none. The problem that prevented a build on arm64 was this error: ===> Building for mame-0.254 gmake[2]: Entering directory '/usr/home/ports/main.ports/emulators/mame/work/mame-mame0254' Clang 14.0.5 detected gmake[2]: *** No rule to make target 'freebsd_arm64_clang', needed by 'all'. Stop. gmake[2]: Leaving directory '/usr/home/ports/main.ports/emulators/mame/work/mame-mame0254' ===> Compilation failed unexpectedly. My patch fixes this error by adding the missing rule.
(In reply to Robert Clausecker from comment #2) Wow this is great. Thanks for the explanations.
Do you approve of the patch? If yes, set maintainer-approval to +.
(In reply to Robert Clausecker from comment #4) Sorry, done.
I meant "maintainer-approval" which is a flag on the patch (click "details" on the patch). But I'll take that as a yes.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=16f071acbac17780d645ac05e734bc49d7b443c6 commit 16f071acbac17780d645ac05e734bc49d7b443c6 Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2023-05-17 11:44:21 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2023-05-18 08:19:49 +0000 emulators/mame: enable on arm64 Add a missing make target, permitting compilation on arm64. PR: 271468 MFH: 2023Q2 Approved by: agh@riseup.net (maintainer) emulators/mame/Makefile | 4 ++-- emulators/mame/files/patch-makefile (new) | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-)
A commit in branch 2023Q2 references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=0adc48d735fed7434332a53247176cfe0141b543 commit 0adc48d735fed7434332a53247176cfe0141b543 Author: Robert Clausecker <fuz@FreeBSD.org> AuthorDate: 2023-05-17 11:44:21 +0000 Commit: Robert Clausecker <fuz@FreeBSD.org> CommitDate: 2023-05-18 08:22:19 +0000 emulators/mame: enable on arm64 Add a missing make target, permitting compilation on arm64. PR: 271468 MFH: 2023Q2 Approved by: agh@riseup.net (maintainer) (cherry picked from commit 16f071acbac17780d645ac05e734bc49d7b443c6) emulators/mame/Makefile | 4 ++-- emulators/mame/files/patch-makefile (new) | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 2 deletions(-)
Committed!