I figured out the problem and solution. The problem was caused by a combination of a patch I wrote and a misunderstanding of MAME's build system. On Gentoo, everything is configurable, or at least that is the intention, so that the user can customize everything - including various compilation options. Makefiles should respect the user's settings, so I patched the makefile to use the system's LDFLAGS, compiler of choice, etc.
The problem was that I made sure the the Makefile gets the value of $(LD) from the user's environment, and that is typically the ld from binutils. However, MAME's build system expects $(LD) to be g++. So due to my initial patch, the build system was calling ld directly instead of the expected g++.
My solution was to change every instance of $(LD) in the makefiles to $(CXX) so that the user's custom settings can still be respected while also ensuring that MAME's build system requirements are met.
However, I know that an increasing number of people are migrating from GCC to Clang (and some may use Intel's compiler). I'm not sure how people who don't use GCC will be affected. Perhaps MAME's makefiles could be edited to be happy with a direct call to ld so as to be happy regardless of which compiler a user is running. Perhaps this is something that could take place upstream, but I'll make mention of it to the Gentoo devs as it may be something which will primarily or only be a Gentoo issue (if it's really an issue at all).
|