diff options
author | Thomas Heijligen <thomas.heijligen@secunet.com> | 2021-11-05 12:28:06 +0100 |
---|---|---|
committer | Nico Huber <nico.h@gmx.de> | 2022-01-20 17:10:55 +0000 |
commit | 462a6159ab8bcebd4ef5c16e9e436ee10ec0cf48 (patch) | |
tree | 0bf7cc504c5e01381c027a31d124b34638961bc4 /Makefile.d | |
parent | 980cf7d31f7b18a3da38a8fd954998b9a74dde33 (diff) | |
download | flashrom-462a6159ab8bcebd4ef5c16e9e436ee10ec0cf48.tar.gz flashrom-462a6159ab8bcebd4ef5c16e9e436ee10ec0cf48.tar.bz2 flashrom-462a6159ab8bcebd4ef5c16e9e436ee10ec0cf48.zip |
Makefile: Make pkg-config mandatory to find libpci
Use `make HAS_LIBPCI=yes/no` to override the pkg-config detection and
`CONFIG_LIBPCI_CFLAGS` and `CONFIG_LIBPCI_LDFLAGS` to set cflags and
ldflags manually. The optional dependency of libpci libz, is
automatically handled by pkg-config.
Change-Id: I21b4a261b34b7e688635fc6e20b7beebfa64c7ed
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/59050
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Diffstat (limited to 'Makefile.d')
-rw-r--r-- | Makefile.d/pci_old_get_dev_test.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/Makefile.d/pci_old_get_dev_test.c b/Makefile.d/pci_old_get_dev_test.c new file mode 100644 index 00000000..32236515 --- /dev/null +++ b/Makefile.d/pci_old_get_dev_test.c @@ -0,0 +1,17 @@ +/* Avoid a failing test due to libpci header symbol shadowing breakage */ +#define index shadow_workaround_index +#if !defined __NetBSD__ +#include <pci/pci.h> +#else +#include <pciutils/pci.h> +#endif +struct pci_access *pacc; +struct pci_dev *dev = {0}; +int main(int argc, char **argv) +{ + (void) argc; + (void) argv; + pacc = pci_alloc(); + dev = pci_get_dev(pacc, dev->bus, dev->dev, 1); + return 0; +} |