New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
please add support for darwin-xtools linkers on macOS #10805
Comments
possible patch could be:
|
Is |
xtools is meant to be compatible, it doesn't require changes to the compilers. |
Could you submit this as a proper PR please? The patch doesn't apply to 1.2.0_rc1 and it's going to bitrot otherwise |
@thesamesam it would probably be a pretty simple rebase if you're interested in authoring a PR. |
Some tools like (or just?) meson explicitly query the version string and pattern to establish what kind of linker they are dealing with. So return a compatible string, such that those tools believe this is just an Apple linker, which is for most intents and purposes exactly what we want. This is an alternative to getting meson to recognise xtools. mesonbuild/meson#10805 See for the original problem: https://bugs.gentoo.org/868516 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
I decided to fix the problem from out custom version of xtools's end. |
fixing xtools is not possible without changing its API/contract, so that's not really a preferred solution |
If it's a drop-in compatible replacement and users aren't meant to distinguish between ld64 and xtools ld64, e.g. by using the meson code: cc = meson.get_compiler('c')
linker_name = cc.get_linker_id()
if linker_name == 'ld64'
...
elif linker_name == 'xtools'
...
endif then we don't need a distinct class for it. |
I can confirm that I don't see anything at this point which would make it necessary to make that distinction between ld64 and xtools. |
For context, as discussed on bugs.gentoo.org, the reason for this seems to be:
And in meson, we handle Apple ld64 like this: o, e = run_compiler_with('-Wl,--version')
elif e.endswith('(use -v to see invocation)\n') or 'macosx_version' in e or 'ld: unknown option' in e: which means we cannot e.g. have xtools match Apple's output with: if 'PROJECT:ld' in line or 'PROJECT:dyld' in line: because we never re-run with |
@grobian can you open a PR with the proposed fix |
done in PR #12747 |
xtools is in use on Gentoo Prefix x86_64 and ppc based Darwin installs. Pick it up as a valid linker. Since xtools is answering with a version to --version, as opposed to ld64, detection of xtools in the ld64 handling block is not possible, since --version already succeeded. Bug: https://bugs.gentoo.org/868516 Bug: mesonbuild#10805 Signed-off-by: Fabian Groffen <grobian@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
xtools is in use on Gentoo Prefix x86_64 and ppc based Darwin installs. Pick it up as a valid linker. Since xtools is answering with a version to --version, as opposed to ld64, detection of xtools in the ld64 handling block is not possible, since --version already succeeded. Bug: https://bugs.gentoo.org/868516 Bug: #10805 Signed-off-by: Fabian Groffen <grobian@gentoo.org> Signed-off-by: Eli Schwartz <eschwartz93@gmail.com>
Describe the bug
meson fails immediately when darwin-xtools is in use, see https://github.com/iains/darwin-xtools and derivatives.
To Reproduce
https://bugs.gentoo.org/show_bug.cgi?id=868516
Expected behavior
Detect xtools as an ld64-based linker
system parameters
native
macOS
3.10
meson --version
0.63.2
ninja --version
if it's a Ninja build1.11.1
The text was updated successfully, but these errors were encountered: