Closed
Description
Those warnings (one per architecture) appear to happen with the new linker introduced with Xcode 15. The "platform load command" specifies the platform, minimum version, and generating SDK for an object file. The load commands can be seen with otool -l, and an object with a "platform load command" will have a load command that is similar to this:
Load command 1
cmd LC_VERSION_MIN_MACOSX
cmdsize 16
version 10.9
sdk 13.1
Two attempts to avoid the warning generated different warnings:
- Adding "-platform_version macos 10.9
xcrun --show-sdk-version
" to ld's options when linking angband.o caused angband.o to have the "platform load command" but with Xcode 14.2's linker it generated two warnings (one per architecture) for each object file. The warnings complained that the specified macOS version was older than that in the object file (the object files had load commands specifying 10.9, but evidently that was coerced internally in the linker to 11.0). I did not try it with Xcode 15's linker. - Using the compiler to invoke the linker, "$(DEPLOYMENT_TARGET)
$(CC) -Wl,-r -Wl,-arch,$ $A$(OSXVERSFLAGS) -o $ @.$$A $(OBJS)", worked with Xcode 14.2 but with Xcode 15 generated one warning per architecture about ignoring some input files (evidently libraries added by the compiler).
Another way to avoid the warning would be to use an archive library instead of angband.o. That change would not be limited to Makefile.osx: it would also affect the autoconf-based builds and src/tests/Makefile.
Metadata
Metadata
Assignees
Labels
No labels