With `#define NCOM 0' the following two unrelated errors currently occur: /usr/src/sys/arch/amd64/amd64/machdep.c:1946:21: error: unused variable 'cdp' [-Werror,-Wunused-variable] bios_consdev_t *cdp = ^
puc.o: In function `puc_pci_attach': /usr/src/sys/dev/pci/puc.c:178: undefined reference to `comconsiot' /usr/src/sys/dev/pci/puc.c:179: undefined reference to `comconsaddr' /usr/src/sys/dev/pci/puc.c:181: undefined reference to `comconsioh' Feedback? OK? Index: arch/amd64/amd64/machdep.c =================================================================== RCS file: /cvs/src/sys/arch/amd64/amd64/machdep.c,v retrieving revision 1.250 diff -u -p -r1.250 machdep.c --- arch/amd64/amd64/machdep.c 30 Jul 2018 09:04:52 -0000 1.250 +++ arch/amd64/amd64/machdep.c 4 Nov 2018 14:07:44 -0000 @@ -1941,11 +1941,11 @@ getbootinfo(char *bootinfo, int bootinfo /* generated by i386 boot loader */ break; case BOOTARG_CONSDEV: +#if NCOM > 0 if (q->ba_size >= sizeof(bios_consdev_t) + offsetof(struct _boot_args32, ba_arg)) { bios_consdev_t *cdp = (bios_consdev_t*)q->ba_arg; -#if NCOM > 0 static const int ports[] = { 0x3f8, 0x2f8, 0x3e8, 0x2e8 }; int unit = minor(cdp->consdev); @@ -1963,12 +1963,12 @@ getbootinfo(char *bootinfo, int bootinfo /* Probe the serial port this time. */ docninit++; } -#endif #ifdef BOOTINFO_DEBUG printf(" console 0x%x:%d", cdp->consdev, cdp->conspeed); #endif } +#endif break; case BOOTARG_BOOTMAC: bios_bootmac = (bios_bootmac_t *)q->ba_arg; Index: dev/pci/puc.c =================================================================== RCS file: /cvs/src/sys/dev/pci/puc.c,v retrieving revision 1.26 diff -u -p -r1.26 puc.c --- dev/pci/puc.c 2 May 2018 19:11:01 -0000 1.26 +++ dev/pci/puc.c 4 Nov 2018 15:13:58 -0000 @@ -164,6 +164,7 @@ puc_pci_attach(struct device *parent, st if (sc->sc_bar_mappings[i].mapped) continue; +#if NCOM > 0 /* * If a port on this card is used as serial console, * mapping the associated BAR will fail because the @@ -183,6 +184,7 @@ puc_pci_attach(struct device *parent, st sc->sc_bar_mappings[i].mapped = 1; continue; } +#endif printf("%s: couldn't map BAR at offset 0x%lx\n", sc->sc_dev.dv_xname, (long)bar);