linux/scripts/mod
Masahiro Yamada cda5f94e88 modpost: avoid using the alias attribute
Aiden Leong reported modpost fails to build on macOS since commit
16a473f60e ("modpost: inform compilers that fatal() never returns"):

  scripts/mod/modpost.c:93:21: error: aliases are not supported on darwin

Nathan's research indicates that Darwin seems to support weak aliases
at least [1]. Although the situation might be improved in future Clang
versions, we can achieve a similar outcome without relying on it.

This commit makes fatal() a macro of error() + exit(1) in modpost.h, as
compilers recognize that exit() never returns.

[1]: https://github.com/llvm/llvm-project/issues/71001

Fixes: 16a473f60e ("modpost: inform compilers that fatal() never returns")
Reported-by: Aiden Leong <aiden.leong@aibsd.com>
Closes: https://lore.kernel.org/all/d9ac2960-6644-4a87-b5e4-4bfb6e0364a8@aibsd.com/
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
2024-01-31 23:24:27 +09:00
..
.gitignore .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
devicetable-offsets.c Staging driver updates for 6.7-rc1 2023-11-03 15:31:04 -10:00
empty.c
file2alias.c Kbuild updates for v6.7 2023-11-04 08:07:19 -10:00
list.h modpost: import include/linux/list.h 2022-05-08 03:17:00 +09:00
Makefile modpost: Optimize symbol search from linear to binary search 2023-10-03 20:25:59 +09:00
mk_elfconfig.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
modpost.c modpost: avoid using the alias attribute 2024-01-31 23:24:27 +09:00
modpost.h modpost: avoid using the alias attribute 2024-01-31 23:24:27 +09:00
sumversion.c modpost: fix array_size.cocci warning 2022-11-21 10:18:39 +09:00
symsearch.c modpost: Optimize symbol search from linear to binary search 2023-10-03 20:25:59 +09:00