[SeaBIOS] Compiling SeaBIOS for coreboot has problems with its ACPI code

Moore, Robert robert.moore at intel.com
Fri Aug 3 23:15:59 CEST 2012


Please try the attached patch.
Thanks,
Bob




diff --git a/source/common/adisasm.c b/source/common/adisasm.c
index 6cd67c7..bfd3756 100644
--- a/source/common/adisasm.c
+++ b/source/common/adisasm.c
@@ -132,9 +132,13 @@
 #define _COMPONENT          ACPI_TOOLS
         ACPI_MODULE_NAME    ("adisasm")
 
-
+/*
+ * Older versions of Bison won't emit this external in the generated header.
+ * Newer versions do emit the external, so we don't need to do it.
+ */
+#ifndef ASLCOMPILER_ASLCOMPILERPARSE_H
 extern int                  AslCompilerdebug;
-
+#endif
 
 ACPI_STATUS
 LsDisplayNamespace (



> -----Original Message-----
> From: Paolo Bonzini [mailto:paolo.bonzini at gmail.com] On Behalf Of Paolo
> Bonzini
> Sent: Friday, August 03, 2012 12:01 AM
> To: Moore, Robert
> Cc: 'Idwer Vollering'; Tang, Feng; 'seabios at seabios.org'; 'Michael S.
> Tsirkin'
> Subject: Re: Compiling SeaBIOS for coreboot has problems with its ACPI
> code
> 
> Il 03/08/2012 05:07, Moore, Robert ha scritto:
> > Perhaps there is a compatibility flag (or some other flag) to disable
> the code that is emitted below?
> 
> No, there isn't, but you can exploit the fact that only the new Bison
> will define a header guard (ASLCOMPILER_ASLCOMPILERPARSE_H).  So you
> can avoid redeclaring AslCompilerparse and AslCompilerdebug if that
> symbol is defined.
> 
> Paolo
> 
> >> >-----Original Message-----
> >> >From: Moore, Robert
> >> >Sent: Tuesday, July 31, 2012 2:31 PM
> >> >To: Idwer Vollering
> >> >Cc: Michael S. Tsirkin; Kevin O'Connor; seabios at seabios.org; Tang,
> >> >Feng
> >> >Subject: RE: [SeaBIOS] Compiling SeaBIOS for coreboot has problems
> >> >with its ACPI code
> >> >
> >> >Yes, for whatever reason, it is definitely an issue with the newer
> >> >version of bison. None of the code below is output with bison
> 2.4.2:
> >> >
> >> >
> >> >#if YYDEBUG
> >> >extern int AslCompilerdebug;
> >> >#endif
> >> >
> >> >#ifdef YYPARSE_PARAM
> >> >#if defined __STDC__ || defined __cplusplus int AslCompilerparse
> >> >(void *YYPARSE_PARAM); #else int AslCompilerparse (); #endif #else
> >> >/* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus
> >> >int AslCompilerparse (void); #else int AslCompilerparse (); #endif
> >> >#endif /* ! YYPARSE_PARAM */
> 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: bison_ext.patch
Type: application/octet-stream
Size: 548 bytes
Desc: bison_ext.patch
URL: <http://www.seabios.org/pipermail/seabios/attachments/20120803/0fe8b025/attachment-0001.obj>


More information about the SeaBIOS mailing list