Skip to contentSkip to conversation

ACPI ASL test suite compilation fix for 32bit ARM architecture

PATCH In review Naresh Bhat 2 participants 9 messages May 8, 2013 – Jul 3, 2013 ACPI component architecture (acpica)

lore
Share & tools
lore

Naresh Bhat

author
#0 lore raw

cover ACPI ASL test suite compilation fix for 32bit ARM architecture

The following patches do compilation errors fix for 32bit ARM architecture

Naresh Bhat (2):
Fix config so it will compile with GCC versions that do not have

    -m32/-m64

Resolve problem where -Werror fails to build when compiling iasl

 generate/unix/Makefile.config |    1 -
 source/compiler/dtio.c        |    4 ++--
 2 files changed, 2 insertions(+), 3 deletions(-)
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 1/2 Fix config so it will compile with GCC versions that do not have -m32/-m64

Signed-off-by Naresh Bhat <naresh.bhat(a)linaro.org>
Signed-off-by Al Stone <ahs3(a)redhat.com>

While compiling the ACPI test suite on ARM architecture got the following compilation error
.
...
....
Copy intermediate file:
obj32/prparserparse.h' -> obj32/prparser.y.h'
gcc -c -m32 -D_CYGWIN -D_GNU_SOURCE -I../../../source/include -DACPI_ASL_COMPILER -I../../../source/compiler -Iobj32 -Wall -Werror -oobj32/as
gcc: error: unrecognized command line option '-m32'
make[1]: *** [obj32/aslcompilerlex.o] Error 1
....
.....

This patch fix config so it will compile with GCC versions that do not have -m32/-m64

---
 generate/unix/Makefile.config |    1 -
 1 file changed, 1 deletion(-)
generate/unix/Makefile.config +0 -1
index 65242e0..fcda7a6 100644
@@ -41,7 +41,6 @@ CC =    gcc
 #
 OBJDIR =     obj$(BITS)
 BINDIR =     bin$(BITS)
-BITSFLAG =   -m$(BITS)
 COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CFLAGS) -o $@ $<
 LINKPROG =   $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS)
 INSTALLDIR = /usr/bin
Signature · 1 line
1.7.9.5
#2 lore raw

Re: [Devel] [PATCH 1/2] Fix config so it will compile with GCC versions that do not have -m32/-m64

We just removed the cross-compilation support from the ACPICA application makefiles, so this should cease to be a problem.

See the acpica git tree for the commit.
Bob

Quoted 50 lines

-----Original Message-----
From: devel-bounces(a)acpica.org [mailto:devel-bounces(a)acpica.org] On Behalf Of Naresh Bhat
Sent: Wednesday, May 08, 2013 6:54 AM
To: devel(a)acpica.org
Cc: al.stone(a)linaro.org
Subject: [Devel] [PATCH 1/2] Fix config so it will compile with GCC versions that do not have -m32/-m64

Signed-off-by Naresh Bhat <naresh.bhat(a)linaro.org>
Signed-off-by Al Stone <ahs3(a)redhat.com>

While compiling the ACPI test suite on ARM architecture got the following compilation error .
...
....
Copy intermediate file:
obj32/prparserparse.h' -> obj32/prparser.y.h'
gcc -c -m32 -D_CYGWIN -D_GNU_SOURCE -I../../../source/include - DACPI_ASL_COMPILER -I../../../source/compiler -Iobj32 -Wall -Werror - oobj32/as
gcc: error: unrecognized command line option '-m32'
make[1]: *** [obj32/aslcompilerlex.o] Error 1 ....
.....

This patch fix config so it will compile with GCC versions that do not have -m32/-m64

---
 generate/unix/Makefile.config |    1 -
 1 file changed, 1 deletion(-)
generate/unix/Makefile.config +0 -2
index 65242e0..fcda7a6 100644
@@ -41,7 +41,6 @@ CC =    gcc
 #
 OBJDIR =     obj$(BITS)
 BINDIR =     bin$(BITS)
-BITSFLAG =   -m$(BITS)
 COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CFLAGS) -o $@ $<
 LINKPROG =   $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS)
 INSTALLDIR = /usr/bin
--

1.7.9.5

_______________________________________________
Devel mailing list
Devel(a)acpica.org
https://lists.acpica.org/mailman/listinfo/devel

author
#3 lore raw

Re: [Devel] [PATCH 1/2] Fix config so it will compile with GCC versions that do not have -m32/-m64

Thanks the issue is solved.

Quoted 59 lines · Robert

We just removed the cross-compilation support from the ACPICA application makefiles, so this should cease to be a problem.

See the acpica git tree for the commit.
Bob

Quoted 2 lines

-----Original Message-----
From: devel-bounces(a)acpica.org [mailto:devel-bounces(a)acpica.org] On

Behalf

Quoted 23 lines

Of Naresh Bhat
Sent: Wednesday, May 08, 2013 6:54 AM
To: devel(a)acpica.org
Cc: al.stone(a)linaro.org
Subject: [Devel] [PATCH 1/2] Fix config so it will compile with GCC versions that do not have -m32/-m64

Signed-off-by Naresh Bhat <naresh.bhat(a)linaro.org>
Signed-off-by Al Stone <ahs3(a)redhat.com>

While compiling the ACPI test suite on ARM architecture got the following compilation error .
...
....
Copy intermediate file:
obj32/prparserparse.h' -> obj32/prparser.y.h'
gcc -c -m32 -D_CYGWIN -D_GNU_SOURCE -I../../../source/include - DACPI_ASL_COMPILER -I../../../source/compiler -Iobj32 -Wall -Werror - oobj32/as
gcc: error: unrecognized command line option '-m32'
make[1]: *** [obj32/aslcompilerlex.o] Error 1 ....
.....

Review

Quoted 7 lines

This patch fix config so it will compile with GCC versions that do not have -m32/-m64

---
 generate/unix/Makefile.config |    1 -
 1 file changed, 1 deletion(-)
(quoted diff) +0 -0

b/generate/unix/Makefile.config

Quoted 18 lines

index 65242e0..fcda7a6 100644

generate/unix/Makefile.config +0 -2
@@ -41,7 +41,6 @@ CC =    gcc
 #
 OBJDIR =     obj$(BITS)
 BINDIR =     bin$(BITS)
-BITSFLAG =   -m$(BITS)
 COMPILEOBJ = $(CC) -c $(CFLAGS) $(OPT_CFLAGS) -o $@ $<
 LINKPROG =   $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS)
 INSTALLDIR = /usr/bin
--

1.7.9.5

_______________________________________________
Devel mailing list
Devel(a)acpica.org
https://lists.acpica.org/mailman/listinfo/devel

author
#4 lore raw

PATCH 2/2 Resolve problem where -Werror fails to build when compiling iasl

In reply to Naresh Bhat
Signed-off-by Naresh Bhat <naresh.bhat(a)linaro.org>
Signed-off-by Al Stone <ahs3(a)redhat.com>

While compiling ACPI test suite on ARM architecture got the following error
.
..
...
mits -o obj32/dtio.o ../../../source/compiler/dtio.c
../../../source/compiler/dtio.c: In function 'DtGetNextLine':
../../../source/compiler/dtio.c:516:9: error: comparison is always false due to limited range of data type [-Werror=type-limits]
cc1: all warnings being treated as errors
make[1]: *** [obj32/dtio.o] Error 1
...
....
This patch will resolve problem where -Werror fails to build when compiling iasl

---
 source/compiler/dtio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
source/compiler/dtio.c +2 -2
index 724115c..1593afb 100644
@@ -498,7 +498,7 @@ DtGetNextLine (
     UINT32                  State = DT_NORMAL_TEXT;
     UINT32                  CurrentLineOffset;
     UINT32                  i;
-    char                    c;
+    int                     c;
 
 
     for (i = 0; ;)
@@ -512,7 +512,7 @@ DtGetNextLine (
             UtExpandLineBuffers ();
         }
 
-        c = (char) getc (Handle);
+        c = getc (Handle);
         if (c == EOF)
         {
             switch (State)
Signature · 1 line
1.7.9.5
#5 lore raw

Re: [Devel] [PATCH 2/2] Resolve problem where -Werror fails to build when compiling iasl

What version of gcc is this?

Anyway, this is not quite the final patch, but I think we have it correct. See the git commit.

Thanks,
Bob

Quoted 59 lines

-----Original Message-----
From: devel-bounces(a)acpica.org [mailto:devel-bounces(a)acpica.org] On Behalf Of Naresh Bhat
Sent: Wednesday, May 08, 2013 6:54 AM
To: devel(a)acpica.org
Cc: al.stone(a)linaro.org
Subject: [Devel] [PATCH 2/2] Resolve problem where -Werror fails to build when compiling iasl

Signed-off-by Naresh Bhat <naresh.bhat(a)linaro.org>
Signed-off-by Al Stone <ahs3(a)redhat.com>

While compiling ACPI test suite on ARM architecture got the following error .
..
...
mits -o obj32/dtio.o ../../../source/compiler/dtio.c ../../../source/compiler/dtio.c: In function 'DtGetNextLine':
../../../source/compiler/dtio.c:516:9: error: comparison is always false due to limited range of data type [-Werror=type-limits]
cc1: all warnings being treated as errors
make[1]: *** [obj32/dtio.o] Error 1
...
....
This patch will resolve problem where -Werror fails to build when compiling iasl

---
 source/compiler/dtio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
source/compiler/dtio.c index renamed from source/compiler/dtio.c +0 -0

724115c..1593afb 100644

source/compiler/dtio.c +2 -3
@@ -498,7 +498,7 @@ DtGetNextLine (
     UINT32                  State = DT_NORMAL_TEXT;
     UINT32                  CurrentLineOffset;
     UINT32                  i;
-    char                    c;
+    int                     c;
 
 
     for (i = 0; ;)
@@ -512,7 +512,7 @@ DtGetNextLine (
             UtExpandLineBuffers ();
         }
 
-        c = (char) getc (Handle);
+        c = getc (Handle);
         if (c == EOF)
         {
             switch (State)
--

1.7.9.5

_______________________________________________
Devel mailing list
Devel(a)acpica.org
https://lists.acpica.org/mailman/listinfo/devel

author
#6 lore raw

Re: [Devel] [PATCH 2/2] Resolve problem where -Werror fails to build when compiling iasl

Hi Bob,

I am using following GCC version

linaro(a)localhost:~/opensource/acpica$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.7/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro
4.7.2-2ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs
--enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.7 --enable-shared --enable-linker-build-id
--with-system-zlib --libexecdir=/usr/lib --without-included-gettext
--enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7
--libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--enable-gnu-unique-object --disable-libitm --enable-plugin
--enable-objc-gc --enable-multilib --disable-sjlj-exceptions
--with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard
--with-mode=thumb --disable-werror --enable-checking=release
--build=arm-linux-gnueabihf --host=arm-linux-gnueabihf
--target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1)
linaro(a)localhost:~/opensource/acpica$

yes I can see the commit 87bda94f5754477da3d11a3f7fb7f5dc6630e681

But looks like is not solved the issue. I am still getting the following message after running the test suite

linaro(a)localhost:~/opensource/acpica/tests$ ./aslts.sh
...
......

Copied obj/acpiexec to ../bin/acpiexec
make[1]: Leaving directory `/home/linaro/opensource/acpica/generate/unix/acpiexec' 32-bit version of acpiexec:
-rwxrwxr-x 1 linaro linaro 494206 May 9 04:53 ../bin/acpiexec

Could not find iASL/acpiexec tools
linaro(a)localhost:~/opensource/acpica/tests$

Thanks and Regards
-Naresh Bhat

Quoted 70 lines · Robert

What version of gcc is this?

Anyway, this is not quite the final patch, but I think we have it correct. See the git commit.

Thanks,
Bob

Quoted 2 lines

-----Original Message-----
From: devel-bounces(a)acpica.org [mailto:devel-bounces(a)acpica.org] On

Behalf

Quoted 57 lines

Of Naresh Bhat
Sent: Wednesday, May 08, 2013 6:54 AM
To: devel(a)acpica.org
Cc: al.stone(a)linaro.org
Subject: [Devel] [PATCH 2/2] Resolve problem where -Werror fails to build when compiling iasl

Signed-off-by Naresh Bhat <naresh.bhat(a)linaro.org>
Signed-off-by Al Stone <ahs3(a)redhat.com>

While compiling ACPI test suite on ARM architecture got the following error .
..
...
mits -o obj32/dtio.o ../../../source/compiler/dtio.c ../../../source/compiler/dtio.c: In function 'DtGetNextLine':
../../../source/compiler/dtio.c:516:9: error: comparison is always false due to limited range of data type [-Werror=type-limits]
cc1: all warnings being treated as errors
make[1]: *** [obj32/dtio.o] Error 1
...
....
This patch will resolve problem where -Werror fails to build when compiling iasl

---
 source/compiler/dtio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
source/compiler/dtio.c index renamed from source/compiler/dtio.c +0 -0

724115c..1593afb 100644

source/compiler/dtio.c +2 -3
@@ -498,7 +498,7 @@ DtGetNextLine (
     UINT32                  State = DT_NORMAL_TEXT;
     UINT32                  CurrentLineOffset;
     UINT32                  i;
-    char                    c;
+    int                     c;
 
 
     for (i = 0; ;)
@@ -512,7 +512,7 @@ DtGetNextLine (
             UtExpandLineBuffers ();
         }
 
-        c = (char) getc (Handle);
+        c = getc (Handle);
         if (c == EOF)
         {
             switch (State)
--

1.7.9.5

_______________________________________________
Devel mailing list
Devel(a)acpica.org
https://lists.acpica.org/mailman/listinfo/devel

#7 lore raw

Re: [Devel] [PATCH 2/2] Resolve problem where -Werror fails to build when compiling iasl

Copied obj/acpiexec to ../bin/acpiexec
make[1]: Leaving directory `/home/linaro/opensource/acpica/generate/unix/acpiexec' 32-bit version of acpiexec:
-rwxrwxr-x 1 linaro linaro 494206 May 9 04:53 ../bin/acpiexec

Could not find iASL/acpiexec tools
linaro(a)localhost:~/opensource/acpica/tests$

Thanks and Regards
-Naresh Bhat

The script needs to look in generate/unix/bin instead of generate/unix/bin32 (or bin64). I'll need to update this.

From: Naresh Bhat [mailto:naresh.bhat(a)linaro.org]
Sent: Wednesday, May 08, 2013 9:56 PM
To: Moore, Robert
Cc: devel(a)acpica.org; al.stone(a)linaro.org
Subject: Re: [Devel] [PATCH 2/2] Resolve problem where -Werror fails to build when compiling iasl

Hi Bob,

I am using following GCC version

linaro(a)localhost:~/opensource/acpica$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.7/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.2-2ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1)
linaro(a)localhost:~/opensource/acpica$

yes I can see the commit 87bda94f5754477da3d11a3f7fb7f5dc6630e681

But looks like is not solved the issue. I am still getting the following message after running the test suite

linaro(a)localhost:~/opensource/acpica/tests$ ./aslts.sh
...
......

Copied obj/acpiexec to ../bin/acpiexec
make[1]: Leaving directory `/home/linaro/opensource/acpica/generate/unix/acpiexec' 32-bit version of acpiexec:
-rwxrwxr-x 1 linaro linaro 494206 May 9 04:53 ../bin/acpiexec

Could not find iASL/acpiexec tools
linaro(a)localhost:~/opensource/acpica/tests$

Thanks and Regards
-Naresh Bhat

On 9 May 2013 01:26, Moore, Robert <robert.moore(a)intel.com<mailto:robert.moore(a)intel.com>> wrote:
What version of gcc is this?

Anyway, this is not quite the final patch, but I think we have it correct. See the git commit.

Thanks,
Bob

Quoted 59 lines

-----Original Message-----
From: devel-bounces(a)acpica.org<mailto:devel-bounces(a)acpica.org> [mailto:devel-bounces(a)acpica.org<mailto:devel-bounces(a)acpica.org>] On Behalf Of Naresh Bhat
Sent: Wednesday, May 08, 2013 6:54 AM
To: devel(a)acpica.org<mailto:devel(a)acpica.org>
Cc: al.stone(a)linaro.org<mailto:al.stone(a)linaro.org>
Subject: [Devel] [PATCH 2/2] Resolve problem where -Werror fails to build
when compiling iasl

Signed-off-by Naresh Bhat <naresh.bhat(a)linaro.org<mailto:naresh.bhat(a)linaro.org>>
Signed-off-by Al Stone <ahs3(a)redhat.com<mailto:ahs3(a)redhat.com>>

While compiling ACPI test suite on ARM architecture got the following error .
..
...
mits -o obj32/dtio.o ../../../source/compiler/dtio.c ../../../source/compiler/dtio.c: In function 'DtGetNextLine':
../../../source/compiler/dtio.c:516:9: error: comparison is always false due to limited range of data type [-Werror=type-limits]
cc1: all warnings being treated as errors
make[1]: *** [obj32/dtio.o] Error 1
...
....
This patch will resolve problem where -Werror fails to build when compiling iasl

---
 source/compiler/dtio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
source/compiler/dtio.c index renamed from source/compiler/dtio.c +0 -0

724115c..1593afb 100644

source/compiler/dtio.c +2 -3
@@ -498,7 +498,7 @@ DtGetNextLine (
     UINT32                  State = DT_NORMAL_TEXT;
     UINT32                  CurrentLineOffset;
     UINT32                  i;
-    char                    c;
+    int                     c;
 
 
     for (i = 0; ;)
@@ -512,7 +512,7 @@ DtGetNextLine (
             UtExpandLineBuffers ();
         }
 
-        c = (char) getc (Handle);
+        c = getc (Handle);
         if (c == EOF)
         {
             switch (State)
--

1.7.9.5

_______________________________________________
Devel mailing list
Devel(a)acpica.org<mailto:Devel(a)acpica.org>
https://lists.acpica.org/mailman/listinfo/devel

#8 lore raw

Re: [Devel] [PATCH 2/2] Resolve problem where -Werror fails to build when compiling iasl

This should be fixed now.

From: devel-bounces(a)acpica.org [mailto:devel-bounces(a)acpica.org] On Behalf Of Moore, Robert
Sent: Wednesday, May 08, 2013 10:11 PM
To: Naresh Bhat
Cc: al.stone(a)linaro.org; devel(a)acpica.org
Subject: Re: [Devel] [PATCH 2/2] Resolve problem where -Werror fails to build when compiling iasl

Copied obj/acpiexec to ../bin/acpiexec
make[1]: Leaving directory `/home/linaro/opensource/acpica/generate/unix/acpiexec' 32-bit version of acpiexec:
-rwxrwxr-x 1 linaro linaro 494206 May 9 04:53 ../bin/acpiexec

Could not find iASL/acpiexec tools
linaro(a)localhost:~/opensource/acpica/tests$

Thanks and Regards
-Naresh Bhat

The script needs to look in generate/unix/bin instead of generate/unix/bin32 (or bin64). I'll need to update this.

From: Naresh Bhat [mailto:naresh.bhat(a)linaro.org]
Sent: Wednesday, May 08, 2013 9:56 PM
To: Moore, Robert
Cc: devel(a)acpica.org<mailto:devel(a)acpica.org>; al.stone(a)linaro.org<mailto:al.stone(a)linaro.org>
Subject: Re: [Devel] [PATCH 2/2] Resolve problem where -Werror fails to build when compiling iasl

Hi Bob,

I am using following GCC version

linaro(a)localhost:~/opensource/acpica$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/arm-linux-gnueabihf/4.7/lto-wrapper
Target: arm-linux-gnueabihf
Configured with: ../src/configure -v --with-pkgversion='Ubuntu/Linaro 4.7.2-2ubuntu1' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libitm --enable-plugin --enable-objc-gc --enable-multilib --disable-sjlj-exceptions --with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard --with-mode=thumb --disable-werror --enable-checking=release --build=arm-linux-gnueabihf --host=arm-linux-gnueabihf --target=arm-linux-gnueabihf
Thread model: posix
gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1)
linaro(a)localhost:~/opensource/acpica$

yes I can see the commit 87bda94f5754477da3d11a3f7fb7f5dc6630e681

But looks like is not solved the issue. I am still getting the following message after running the test suite

linaro(a)localhost:~/opensource/acpica/tests$ ./aslts.sh
...
......

Copied obj/acpiexec to ../bin/acpiexec
make[1]: Leaving directory `/home/linaro/opensource/acpica/generate/unix/acpiexec' 32-bit version of acpiexec:
-rwxrwxr-x 1 linaro linaro 494206 May 9 04:53 ../bin/acpiexec

Could not find iASL/acpiexec tools
linaro(a)localhost:~/opensource/acpica/tests$

Thanks and Regards
-Naresh Bhat

On 9 May 2013 01:26, Moore, Robert <robert.moore(a)intel.com<mailto:robert.moore(a)intel.com>> wrote:
What version of gcc is this?

Anyway, this is not quite the final patch, but I think we have it correct. See the git commit.

Thanks,
Bob

Quoted 59 lines

-----Original Message-----
From: devel-bounces(a)acpica.org<mailto:devel-bounces(a)acpica.org> [mailto:devel-bounces(a)acpica.org<mailto:devel-bounces(a)acpica.org>] On Behalf Of Naresh Bhat
Sent: Wednesday, May 08, 2013 6:54 AM
To: devel(a)acpica.org<mailto:devel(a)acpica.org>
Cc: al.stone(a)linaro.org<mailto:al.stone(a)linaro.org>
Subject: [Devel] [PATCH 2/2] Resolve problem where -Werror fails to build
when compiling iasl

Signed-off-by Naresh Bhat <naresh.bhat(a)linaro.org<mailto:naresh.bhat(a)linaro.org>>
Signed-off-by Al Stone <ahs3(a)redhat.com<mailto:ahs3(a)redhat.com>>

While compiling ACPI test suite on ARM architecture got the following error .
..
...
mits -o obj32/dtio.o ../../../source/compiler/dtio.c ../../../source/compiler/dtio.c: In function 'DtGetNextLine':
../../../source/compiler/dtio.c:516:9: error: comparison is always false due to limited range of data type [-Werror=type-limits]
cc1: all warnings being treated as errors
make[1]: *** [obj32/dtio.o] Error 1
...
....
This patch will resolve problem where -Werror fails to build when compiling iasl

---
 source/compiler/dtio.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
source/compiler/dtio.c index renamed from source/compiler/dtio.c +0 -0

724115c..1593afb 100644

source/compiler/dtio.c +2 -3
@@ -498,7 +498,7 @@ DtGetNextLine (
     UINT32                  State = DT_NORMAL_TEXT;
     UINT32                  CurrentLineOffset;
     UINT32                  i;
-    char                    c;
+    int                     c;
 
 
     for (i = 0; ;)
@@ -512,7 +512,7 @@ DtGetNextLine (
             UtExpandLineBuffers ();
         }
 
-        c = (char) getc (Handle);
+        c = getc (Handle);
         if (c == EOF)
         {
             switch (State)
--

1.7.9.5

_______________________________________________
Devel mailing list
Devel(a)acpica.org<mailto:Devel(a)acpica.org>
https://lists.acpica.org/mailman/listinfo/devel