diff options
author | Tom Rini <trini@konsulko.com> | 2019-11-26 20:40:59 -0500 |
---|---|---|
committer | Tom Rini <trini@konsulko.com> | 2019-12-03 08:43:24 -0500 |
commit | 923e211f8d92d67caa93125f1aff2ae123c6b9d5 (patch) | |
tree | 25c7270df6afee201a2ee5347f1e5edcbdce66fa | |
parent | e78f16b751c86de8d20222083b1d14fd4e1c0f59 (diff) |
pci: Only link pci_rom.o in some cases
The content of pci_rom.c is only used in a few cases. Only build and
link in these cases to avoid a global variable as gcc doesn't always
discard those when they are unused.
Signed-off-by: Tom Rini <trini@konsulko.com>
-rw-r--r-- | drivers/pci/Makefile | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/pci/Makefile b/drivers/pci/Makefile index 219473aa79..da8b826d69 100644 --- a/drivers/pci/Makefile +++ b/drivers/pci/Makefile @@ -4,12 +4,12 @@ # Wolfgang Denk, DENX Software Engineering, wd@denx.de. ifneq ($(CONFIG_DM_PCI),) -obj-y += pci_rom.o +obj-$(CONFIG_DM_VIDEO) += pci_rom.o obj-$(CONFIG_PCI) += pci-uclass.o pci_auto.o obj-$(CONFIG_DM_PCI_COMPAT) += pci_compat.o obj-$(CONFIG_PCI_SANDBOX) += pci_sandbox.o obj-$(CONFIG_SANDBOX) += pci-emul-uclass.o -obj-$(CONFIG_X86) += pci_x86.o +obj-$(CONFIG_X86) += pci_x86.o pci_rom.o else obj-$(CONFIG_PCI) += pci.o pci_auto_old.o endif |