diff options
author | Evgeny Zinoviev <me@ch1p.io> | 2020-12-20 00:40:01 +0300 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2022-06-23 12:19:52 +0000 |
commit | c3566b67f68f1552c0b16759a7e2fe2a1347d748 (patch) | |
tree | 10cd2977cac8dfbb0431f214a4a7a395f36e92ab /src/cpu/intel/model_6ex/Makefile.inc | |
parent | 58c063ebd099e94a45da8c0c6ba48b0128a59b03 (diff) |
nvramtool: Fix building on Linux systems with musl libc
Current implementation only supports glibc (by looking for __GLIBC__)
and fails to build on systems with alternative libc implementations,
such as musl; sys/io.h is never included, there are no outb/inb
functions which results in undefined references at linking stage.
Using __linux__ instead of __GLIBC__ to test whether the system is Linux
seems to be a more proper way to detect Linux and it also fixes
nvramtool compilation on musl systems.
Tested on Gentoo Linux with musl 1.2.2 (builds and works fine) and Void
Linux with glibc (still builds and works fine).
Change-Id: Idcdc3a033b40f16a6053209813f1e06209ee459a
Signed-off-by: Evgeny Zinoviev <me@ch1p.io>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48757
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/cpu/intel/model_6ex/Makefile.inc')
0 files changed, 0 insertions, 0 deletions