[Bug 274947] devel/genie: update to 20230921

From: <bugzilla-noreply_at_freebsd.org>
Date: Tue, 07 Nov 2023 01:08:55 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=274947

            Bug ID: 274947
           Summary: devel/genie: update to 20230921
           Product: Ports & Packages
           Version: Latest
          Hardware: Any
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: Individual Port(s)
          Assignee: bofh@freebsd.org
          Reporter: agh@riseup.net
             Flags: maintainer-feedback?(bofh@freebsd.org)
          Assignee: bofh@freebsd.org

Created attachment 246169
  --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=246169&action=edit
Update to 20230921; some Makefile maintenance; patches for FreeBSD use

Hello,

Working on unbundling GENie from emulators/mame, I noticed that devel/genie did
not have the same patches that were required in MAME for GENie to correctly
produce GMake projects/files.

When stock GENie from devel/genie runs, it hardcodes the use of ${ARCH} into
all the GNU Makefiles that it generates, I am not sure what for, and I have
noticed that both NetBSD and OpenBSD are able to use GENie like that. I thought
the initial problem may have been because of FreeBSD's historic preference to
use amd64 over x86_64, however, the GENie build system looks like it
compensates for this.

If I use stock devel/genie for MAME, the build fails with Clang not being able
to find ${ARCH}, if I modify the build to create a directory ${ARCH}, the
linker fails with finding no input, or not liking finding a directory. I am not
sure what exactly is the solution, however, I think FreeBSD automagically
incantates the correct ISA bit width spell, so I suspect that is why the MAME
port removed all references to ${ARCH} in the GENie related build configs.

So included with this update, is the following patches:
* files/patch-build_gmake.freebsd_genie.make (already part of devel/genie)
Have commented out AR, CC, and CXX in the makefile so the Ports values are
inherited. Also removed the offending $(ARCH), and some -Os optimisations so
not to poison the compiler environment inherited from the Ports.

* files/patch-src_host_scripts.c
This file has a mega sized const char* containing loads of predefined build-fu
for all GENie supporting platforms (most of which are lumped together), here is
where ${ARCH} is littered. This file eventually contributes to building the
custom GNU Makefile for the Project (in this case, MAME) for the supporting
platform.

* files/patch-src_tools_gcc.lua
Attempt to use compiler environment inherited from Ports again.

Thanks.

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