Re: Latest acpica

Andrew Grover
2005-10-12T17:37:59Z

[-- Attachment #1.1: Type: text/plain, Size: 3272 bytes --]

I am using GNU flex 2.5.31. I was able to get it to build (on x86_64 even)
with the attached patch. I have also attached the warnings, in case those
are of interest.

(Any Debian people want to package iasl?)

Regards -- Andy

On 9/8/05, Moore, Robert <robert.moore-ral2JQCrhuEAvxtiuMwx3w@public.gmane.org> wrote:
>
> And this seems like a fairly relevant quote as well:
>
> >Flex no longer conforms to the POSIX lex behaviour
>
>
>
> > -----Original Message-----
> > From: acpi-devel-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org [mailto:acpi-devel-
> > admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org] On Behalf Of Matthew Wilcox
> > Sent: Thursday, September 08, 2005 12:31 PM
> > To: Moore, Robert
> > Cc: Frank; acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > Subject: Re: [ACPI] Latest acpica
> >
> > On Thu, Sep 08, 2005 at 12:23:50PM -0700, Moore, Robert wrote:
> > > Tell me what needs to change in order to make it compatible.
> >
> > I've never looked into it in any detail. From the Debian description:
> >
> > The behaviour of Flex has undergone a major change since version
> > 2.5.4a; Flex scanners are now reenterant, you may have multiple
> > scanners in the same program with differing sets of defaults, and
> > they play nicer with modern C and C++ compilers. The Flip side is
> > that Flex no longer conforms to the POSIX lex behaviour, and the
> > scanners require conforming implementations when flex is used in ANSI
> > C mode. The package flex-old provides the older behaviour.
> >
> > The GNU web page has some more detail:
> >
> >
> http://www.gnu.org/software/flex/manual/html_chapter/flex_20.html#SEC20
> >
> > and there's a bug showing exactly this problem being encountered here:
> >
> > http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=191942
> >
> > The important bit is probably the quote:
> >
> > The relevant change in the new flex is that it's no longer valid
> > to call unput() from the section after %%, only in actions or
> > in the %{ ... %} section.
> >
> > HTH.
> >
> >
> > -------------------------------------------------------
> > SF.Net email is Sponsored by the Better Software Conference & EXPO
> > September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> > Practices
> > Agile & Plan-Driven Development * Managing Projects & Teams * Testing
> & QA
> > Security * Process Improvement & Measurement *
> http://www.sqe.com/bsce5sf
> > _______________________________________________
> > Acpi-devel mailing list
> > Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> > https://lists.sourceforge.net/lists/listinfo/acpi-devel
>
>
> -------------------------------------------------------
> SF.Net email is Sponsored by the Better Software Conference & EXPO
> September 19-22, 2005 * San Francisco, CA * Development Lifecycle
> Practices
> Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
> Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
> _______________________________________________
> Acpi-devel mailing list
> Acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
> https://lists.sourceforge.net/lists/listinfo/acpi-devel
>

[-- Attachment #1.2: Type: text/html, Size: 4771 bytes --]

[-- Attachment #2: iasl.diff --]
[-- Type: text/x-patch, Size: 983 bytes --]

diff -Naur acpica-unix-20050930-orig/compiler/aslglobal.h acpica-unix-20050930/compiler/aslglobal.h
--- acpica-unix-20050930-orig/compiler/aslglobal.h 2005-09-30 15:50:18.000000000 -0700
+++ acpica-unix-20050930/compiler/aslglobal.h 2005-10-12 10:26:33.000000000 -0700
@@ -143,7 +143,6 @@
extern FILE *AslCompilerin;
extern int AslCompilerdebug;
extern const ASL_MAPPING_ENTRY AslKeywordMapping[];
-extern char *AslCompilertext;
extern char hex[];

#define ASL_LINE_BUFFER_SIZE 512
diff -Naur acpica-unix-20050930-orig/compiler/Makefile acpica-unix-20050930/compiler/Makefile
--- acpica-unix-20050930-orig/compiler/Makefile 2005-09-30 15:50:19.000000000 -0700
+++ acpica-unix-20050930/compiler/Makefile 2005-10-12 10:09:39.000000000 -0700
@@ -85,7 +85,7 @@
#YACC= yacc
YACC= bison
YFLAGS+= -v -d
-LEX= flex
+LEX= flex -l
LFLAGS+= -i

#.if $(YACC) == "bison"

[-- Attachment #3: err.log --]
[-- Type: text/x-log, Size: 2250 bytes --]

conflicts: 61 shift/reduce, 18 reduce/reduce
aslcompiler.y:915.7-81: warning: rule never reduced because of conflicts: TermArg: Type2IntegerOpcode
aslcompiler.y:916.7-81: warning: rule never reduced because of conflicts: TermArg: Type2StringOpcode
aslcompiler.y:917.7-81: warning: rule never reduced because of conflicts: TermArg: Type2BufferOpcode
aslcompiler.y:918.7-81: warning: rule never reduced because of conflicts: TermArg: Type2BufferOrStringOpcode
aslcompiler.y:964.7-82: warning: rule never reduced because of conflicts: OptionalParameterTypePackage: ','
aslcompiler.y:983.37-48: warning: rule never reduced because of conflicts: ParameterTypesPackageList: /* empty */
aslcompiler.y:984.7-46: warning: rule never reduced because of conflicts: ParameterTypesPackageList: ObjectTypeKeyword
aslcompiler.y:988.7-989.69: warning: rule never reduced because of conflicts: ParameterTypesPackageList: ParameterTypesPackage ',' ParameterTypesPackage
aslcompiler.y:994.7-82: warning: rule never reduced because of conflicts: OptionalParameterTypesPackage: ','
aslcompiler.y:1585.7-38: warning: rule never reduced because of conflicts: CaseTermList: CaseTerm
aslcompiler.y:1594.7-38: warning: rule never reduced because of conflicts: DefaultTermList: CaseTerm
aslcompiler.y:3077.37-48: warning: rule never reduced because of conflicts: OptionalResourceType: /* empty */
aslcompilerlex.c: In function `AslCompilerlex':
aslcompilerlex.c:2125: warning: label `find_rule' defined but not used
aslcompiler.l: At top level:
aslcompilerlex.c:4395: warning: 'yy_flex_strlen' defined but not used
asllisting.c: In function `LsAmlListingWalk':
asllisting.c:322: warning: cast from pointer to integer of different size
aslopt.c: In function `OptBuildShortestPath':
aslopt.c:439: warning: int format, different type arg (arg 7)
aslopt.c:439: warning: int format, different type arg (arg 8)
aslopt.c: In function `OptOptimizeNamePath':
aslopt.c:755: warning: int format, different type arg (arg 8)
aslopt.c:755: warning: int format, different type arg (arg 10)
aslopt.c:815: warning: int format, different type arg (arg 7)
../osunixxf.c: In function `AcpiOsGetRootPointer':
../osunixxf.c:188: warning: implicit declaration of function `AeLocalGetRootPointer'