[coreboot] [RFC] Error out on implicit declarations

Corey Osgood corey.osgood at gmail.com
Fri Dec 19 10:31:09 CET 2008


On Fri, Dec 19, 2008 at 4:12 AM, Bao, Zheng <Zheng.Bao at amd.com> wrote:

>  Signed-off-by: Maggie Li Maggie.li at amd.com
>
> Reviewed-by: Zheng bao <Zheng.bao at amd.com>
>
>
>  ------------------------------
>
> *From:* coreboot-bounces at coreboot.org [mailto:
> coreboot-bounces at coreboot.org] *On Behalf Of *Li, Maggie
> *Sent:* Friday, December 19, 2008 4:56 PM
> *To:* Coreboot
> *Subject:* Re: [coreboot] [RFC] Error out on implicit declarations
>
>
>
> Hi,
>
>
>
> Here are the patches for fixing implicit declarations in amdk8, dbm690t and
> pistachio.
>
> Please help me check it. Thanks.
>

Thanks for the patches, but I think they've broken other boards, and I'd
rather not check in a patch that breaks what currently builds. The main ones
I'm at are the agami aruma:

In file included from
/home/corey/coreboot/coreboot-v2/src/southbridge/amd/amd8111/../../../northbridge/amd/amdk8/reset_test.c:3,
                 from
/home/corey/coreboot/coreboot-v2/src/southbridge/amd/amd8111/amd8111_reset.c:54:
/home/corey/coreboot/coreboot-v2/src/arch/i386/include/arch/romcc_io.h:74:1:
warning: "PCI_DEV" redefined
/home/corey/coreboot/coreboot-v2/src/southbridge/amd/amd8111/amd8111_reset.c:4:1:
warning: this is the location of the previous definition
In file included from
/home/corey/coreboot/coreboot-v2/src/southbridge/amd/amd8111/../../../northbridge/amd/amdk8/reset_test.c:3,
                 from
/home/corey/coreboot/coreboot-v2/src/southbridge/amd/amd8111/amd8111_reset.c:54:
/home/corey/coreboot/coreboot-v2/src/arch/i386/include/arch/romcc_io.h:85:
error: redefinition of typedef 'device_t'
/home/corey/coreboot/coreboot-v2/src/southbridge/amd/amd8111/amd8111_reset.c:12:
error: previous declaration of 'device_t' was here
/home/corey/coreboot/coreboot-v2/src/arch/i386/include/arch/romcc_io.h:174:
error: redefinition of 'pci_read_config32'
/home/corey/coreboot/coreboot-v2/src/southbridge/amd/amd8111/amd8111_reset.c:31:
error: previous definition of 'pci_read_config32' was here
/home/corey/coreboot/coreboot-v2/src/arch/i386/include/arch/romcc_io.h:204:
error: redefinition of 'pci_write_config8'
/home/corey/coreboot/coreboot-v2/src/southbridge/amd/amd8111/amd8111_reset.c:15:
error: previous definition of 'pci_write_config8' was here
/home/corey/coreboot/coreboot-v2/src/arch/i386/include/arch/romcc_io.h:266:
error: redefinition of 'pci_write_config32'
/home/corey/coreboot/coreboot-v2/src/southbridge/amd/amd8111/amd8111_reset.c:23:
error: previous definition of 'pci_write_config32' was here
/home/corey/coreboot/coreboot-v2/src/arch/i386/include/arch/romcc_io.h:300:
error: redefinition of 'pci_locate_device_on_bus'
/home/corey/coreboot/coreboot-v2/src/southbridge/amd/amd8111/amd8111_reset.c:40:
error: previous definition of 'pci_locate_device_on_bus' was here
make[1]: *** [amd8111_reset.o] Error 1

and asus a8n_e:

/home/corey/coreboot/coreboot-v2/src/arch/i386/include/arch/romcc_io.h:174:
error: redefinition of 'pci_read_config32'
/home/corey/coreboot/coreboot-v2/src/southbridge/nvidia/ck804/ck804_reset.c:24:
error: previous definition of 'pci_read_config32' was here
/home/corey/coreboot/coreboot-v2/src/arch/i386/include/arch/romcc_io.h:266:
error: redefinition of 'pci_write_config32'
/home/corey/coreboot/coreboot-v2/src/southbridge/nvidia/ck804/ck804_reset.c:16:
error: previous definition of 'pci_write_config32' was here

The fix is probably as simple as multiple inclusion guards in the header
files. I'd do it, but it's 4:30am here, I'm headed to bed. I'm also
attaching the log of an abuild run with your patches and Carl-Daniel's
applied, so everyone can see where we stand. Perhaps we should create a
temporary wiki page with the list of broken targets in it, and check them
off as they're fixed? Only downside being not everyone has wiki access...

-Corey
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20081219/dee4d4a6/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: abuild_build_log
Type: application/octet-stream
Size: 74549 bytes
Desc: not available
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20081219/dee4d4a6/attachment.obj>


More information about the coreboot mailing list