diff options
author | Tobias Burnus <tburnus@baylibre.com> | 2025-02-10 18:24:34 +0100 |
---|---|---|
committer | Tobias Burnus <tburnus@baylibre.com> | 2025-02-10 18:24:34 +0100 |
commit | 4ce8ad684b90606a74f0cccfd9455184046c6c4e (patch) | |
tree | 525f5a4fb6b5f965d7d29da0931716c09a5cc44c /gcc/c/c-parser.cc | |
parent | 7037fdf6bd0a4eea4a436b432265d6b7cc481737 (diff) | |
download | gcc-4ce8ad684b90606a74f0cccfd9455184046c6c4e.zip gcc-4ce8ad684b90606a74f0cccfd9455184046c6c4e.tar.gz gcc-4ce8ad684b90606a74f0cccfd9455184046c6c4e.tar.bz2 |
[gcn] mkoffload.cc: Print fatal error if -march has no multilib but generic has
Assume that a distro has configured, e.g., a gfx9-generic multilib but not
for gfx902. In that case, mkoffload would fail to link with "error:
incompatible mach". With this commit, an error is printed suggesting to try
the associated generic architecture instead. The behavior is unchanged if
there is a multilib available for the specific ISA or when there is also no
multilib for the generic ICA.
Note: The build of generic multilibs are currently not enabled by default;
they also require the linker/assembler of LLVM 19 or newer and, in particular,
for the execution a future ROCm release. (The next one? In any case, 6.3.2
does not support generic ISAs, yet.)
gcc/ChangeLog:
* config/gcn/mkoffload.cc (enum elf_arch_code): Add
EF_AMDGPU_MACH_AMDGCN_NONE.
(elf_arch): Use enum elf_arch_code as type.
(tool_cleanup): Silence warning by removing tailing '.' from error.
(get_arch_name): Return enum elf_arch_code.
(check_for_missing_lib): New; print fatal error if the multilib
is not available but it is for the associate generic ISA.
(main): Call it.
Diffstat (limited to 'gcc/c/c-parser.cc')
0 files changed, 0 insertions, 0 deletions