SHA256
1
0
forked from pool/acpica

- Update to latest version 20120913

- Add acpi_genl from http://www.lesswatts.org/projects/acpi/utilities.php
  Can be used to check for ACPI events via netlink (since /proc/acpi/events is
  is deprecated)
- Adjust to new Makefile layout

OBS-URL: https://build.opensuse.org/package/show/hardware/acpica?expand=0&rev=40
This commit is contained in:
2012-09-19 11:08:00 +00:00
committed by Git OBS Bridge
parent c5852475a4
commit 24c3252a57
11 changed files with 185 additions and 120 deletions

BIN
acpi_genl.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.

View File

@@ -1,14 +1,22 @@
From: <idoenmez@suse.de>
acpica: Do not compile in date or time into binaries
Otherwise the data/time compiled in may cause constant re-compilation
in build service environments
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
source/compiler/aslcompile.c | 9 ++-------
source/compiler/aslutils.c | 4 ++--
source/include/acapps.h | 8 ++++----
3 files changed, 8 insertions(+), 13 deletions(-)
Index: acpica-unix2-20120518/source/compiler/aslcompile.c
Index: acpica-unix2-20120913/source/compiler/aslcompile.c
===================================================================
--- acpica-unix2-20120518.orig/source/compiler/aslcompile.c
+++ acpica-unix2-20120518/source/compiler/aslcompile.c
@@ -157,8 +157,6 @@ void
--- acpica-unix2-20120913.orig/source/compiler/aslcompile.c
+++ acpica-unix2-20120913/source/compiler/aslcompile.c
@@ -161,8 +161,6 @@ void
AslCompilerFileHeader (
UINT32 FileId)
{
@@ -17,7 +25,7 @@ Index: acpica-unix2-20120518/source/compiler/aslcompile.c
char *Prefix = "";
@@ -198,12 +196,9 @@ AslCompilerFileHeader (
@@ -202,12 +200,9 @@ AslCompilerFileHeader (
/* Compilation header with timestamp */
@@ -32,11 +40,11 @@ Index: acpica-unix2-20120518/source/compiler/aslcompile.c
Prefix);
switch (FileId)
Index: acpica-unix2-20120518/source/compiler/aslutils.c
Index: acpica-unix2-20120913/source/compiler/aslutils.c
===================================================================
--- acpica-unix2-20120518.orig/source/compiler/aslutils.c
+++ acpica-unix2-20120518/source/compiler/aslutils.c
@@ -479,8 +479,8 @@ UtDisplaySummary (
--- acpica-unix2-20120913.orig/source/compiler/aslutils.c
+++ acpica-unix2-20120913/source/compiler/aslutils.c
@@ -456,8 +456,8 @@ UtDisplaySummary (
{
/* Compiler name and version number */
@@ -47,10 +55,10 @@ Index: acpica-unix2-20120518/source/compiler/aslutils.c
}
/* Summary of main input and output files */
Index: acpica-unix2-20120518/source/include/acapps.h
Index: acpica-unix2-20120913/source/include/acapps.h
===================================================================
--- acpica-unix2-20120518.orig/source/include/acapps.h
+++ acpica-unix2-20120518/source/include/acapps.h
--- acpica-unix2-20120913.orig/source/include/acapps.h
+++ acpica-unix2-20120913/source/include/acapps.h
@@ -69,15 +69,15 @@
/* Macros for signons and file headers */

View File

@@ -1,63 +0,0 @@
Make it possible to extend CFLAGS when invoking make
From: Thomas Renninger <trenn@suse.de>
---
source/compiler/Makefile | 2 +-
source/tools/acpiexec/Makefile | 2 +-
source/tools/acpisrc/Makefile | 2 +-
source/tools/acpixtract/Makefile | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
Index: acpica-unix2-20120518/source/compiler/Makefile
===================================================================
--- acpica-unix2-20120518.orig/source/compiler/Makefile
+++ acpica-unix2-20120518/source/compiler/Makefile
@@ -231,7 +231,7 @@ MISC = \
prparser.y.h \
prparserparse.output
-CFLAGS+= \
+override CFLAGS+= \
-D$(HOST) \
-D_GNU_SOURCE \
-DACPI_ASL_COMPILER \
Index: acpica-unix2-20120518/source/tools/acpiexec/Makefile
===================================================================
--- acpica-unix2-20120518.orig/source/tools/acpiexec/Makefile
+++ acpica-unix2-20120518/source/tools/acpiexec/Makefile
@@ -230,7 +230,7 @@ OBJECTS = \
utxface.o \
utxfmutex.o
-CFLAGS+= \
+override CFLAGS+= \
-D$(HOST) \
-D_GNU_SOURCE \
-DACPI_EXEC_APP \
Index: acpica-unix2-20120518/source/tools/acpixtract/Makefile
===================================================================
--- acpica-unix2-20120518.orig/source/tools/acpixtract/Makefile
+++ acpica-unix2-20120518/source/tools/acpixtract/Makefile
@@ -60,7 +60,7 @@ OBJECTS = \
axmain.o \
getopt.o
-CFLAGS+= \
+override CFLAGS+= \
-D$(HOST) \
-D_GNU_SOURCE \
-DACPI_XTRACT_APP \
Index: acpica-unix2-20120518/source/tools/acpisrc/Makefile
===================================================================
--- acpica-unix2-20120518.orig/source/tools/acpisrc/Makefile
+++ acpica-unix2-20120518/source/tools/acpisrc/Makefile
@@ -68,7 +68,7 @@ OBJECTS = \
osunixdir.o \
getopt.o
-CFLAGS+= \
+override CFLAGS+= \
-D$(HOST) \
-D_GNU_SOURCE \
-DACPI_SRC_APP \

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:77f083a8fcc08870bbd24579da6342816a32c71a2a156b26c61f22f692007da4
size 809031

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:bdd50252a66e9878f1250cdf589fcdf678f5250de9e5eeb841000ec766678d47
size 817298

View File

@@ -1,3 +1,12 @@
-------------------------------------------------------------------
Wed Sep 19 10:56:44 UTC 2012 - trenn@suse.de
- Update to latest version 20120913
- Add acpi_genl from http://www.lesswatts.org/projects/acpi/utilities.php
Can be used to check for ACPI events via netlink (since /proc/acpi/events is
is deprecated)
- Adjust to new Makefile layout
-------------------------------------------------------------------
Sun May 20 10:06:24 UTC 2012 - trenn@suse.de

View File

@@ -20,7 +20,7 @@
Name: acpica
Url: http://acpica.org
Version: 20120518
Version: 20120913
Release: 6
License: GPL-2.0
%define src_dir acpica-unix2-%{version}
@@ -28,13 +28,15 @@ License: GPL-2.0
Group: Development/Tools/Debuggers
Summary: This is a set of tools to display and debug your BIOS ACPI tables
Source: %{src_dir}.tar.bz2
Patch1: acpica-override-CFLAGS.diff
Patch1: acpica_make_CFLAGS_overridable
Patch2: acpidump-override-CFLAGS.patch
Patch3: acpica-no-compiletime.patch
Patch4: acpica_fix_link_order.patch
Patch5: acpica_fix_32bit_build.patch
Patch4: acpica_fix_32bit_build.patch
Patch5: acpica_acpisrc_fix_unused_result.patch
Patch6: acpica_makefile_whitespace_cleanup.patch
Source1: ec_access.c
Source2: acpidump-%{dmp_ver}.tar.bz2
Source3: acpi_genl.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-build
ExclusiveArch: %ix86 ia64 x86_64
BuildRequires: bison flex glibc-devel
@@ -62,49 +64,45 @@ Authors:
and other Intel people
%prep
%setup -n %{src_dir} -a 2
%setup -n %{src_dir} -a 2 -a 3
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
%patch6 -p1
%build
RPM_OPT_FLAGS="$RPM_OPT_FLAGS"
cc %{SOURCE1} $RPM_OPT_FLAGS -o ec_access
make -C acpidump CFLAGS="$RPM_OPT_FLAGS"
pushd source
make -C compiler CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-unused-result"
make -C tools/acpisrc CFLAGS="$RPM_OPT_FLAGS -Wno-unused-result"
make -C tools/acpixtract CFLAGS="$RPM_OPT_FLAGS"
# this needs total recompilation with other flags
cp compiler/iasl .
make clean -C compiler CFLAGS="$RPM_OPT_FLAGS"
make -C tools/acpiexec CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -Wno-unused-result"
popd
make -C acpi_genl CFLAGS="$RPM_OPT_FLAGS"
make OPT_CFLAGS="$RPM_OPT_FLAGS"
%install
install -Dm 755 ec_access %{buildroot}/usr/sbin/ec_access
install -Dm 755 acpidump/acpidump %{buildroot}/usr/sbin/acpidump
install -Dm 644 README %{buildroot}/%{_docdir}/%{name}/README
install -Dm 755 acpidump/acpidump %{buildroot}/usr/sbin/acpidump
install -Dm 755 acpi_genl/acpi_genl %{buildroot}/usr/sbin/acpi_genl
install -Dm 644 acpi_genl/README %{buildroot}/%{_docdir}/%{name}/README_acpi_genl
install -Dm 644 changes.txt %{buildroot}/%{_docdir}/%{name}/changes.txt
pushd source
install -Dm 755 iasl %{buildroot}/usr/bin/iasl
install -Dm 755 tools/acpisrc/acpisrc %{buildroot}/usr/sbin/acpisrc
install -Dm 755 tools/acpiexec/acpiexec %{buildroot}/usr/bin/acpiexec
install -Dm 755 tools/acpixtract/acpixtract %{buildroot}/usr/bin/acpixtract
popd
make install DESTDIR="%{buildroot}"
%files
%defattr(-,root,root)
#/usr/sbin/acpidump
/usr/bin/iasl
/usr/bin/acpiexec
/usr/bin/acpixtract
/usr/sbin/acpisrc
/usr/bin/acpisrc
/usr/sbin/acpidump
/usr/sbin/acpi_genl
/usr/sbin/ec_access
/usr/bin/acpibin
/usr/bin/acpihelp
/usr/bin/acpinames
%doc %{_docdir}/%{name}
%changelog

View File

@@ -0,0 +1,29 @@
acpica: Fix unused result warning
As this is the only place where this warning
happens:
'write', declared with attribute warn_unused_result [-Werror=unused-result]
it might be worth fixing instead of ignoring.
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
source/tools/acpisrc/asfile.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
Index: acpica-unix2-20120913/source/tools/acpisrc/asfile.c
===================================================================
--- acpica-unix2-20120913.orig/source/tools/acpisrc/asfile.c
+++ acpica-unix2-20120913/source/tools/acpisrc/asfile.c
@@ -805,7 +805,11 @@ AsPutFile (
/* Write the buffer to the file */
FileSize = strlen (FileBuffer);
- write (DestHandle, FileBuffer, FileSize);
+ if (write (DestHandle, FileBuffer, FileSize) < 0) {
+ perror ("Could not write to destination file");
+ close (DestHandle);
+ return -1;
+ }
close (DestHandle);

View File

@@ -1,17 +0,0 @@
---
source/tools/acpiexec/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Index: acpica-unix2-20120518/source/tools/acpiexec/Makefile
===================================================================
--- acpica-unix2-20120518.orig/source/tools/acpiexec/Makefile
+++ acpica-unix2-20120518/source/tools/acpiexec/Makefile
@@ -273,7 +273,7 @@ CWARNINGFLAGS += \
# Rules
#
$(PROG) : $(OBJECTS)
- $(CC) $(LDFLAGS) $(OBJECTS) -o $(PROG)
+ $(CC) $(OBJECTS) $(LDFLAGS) -o $(PROG)
$(COPYPROG)
%.o : %.c $(HEADERS) $(ACPICA_HEADERS)

View File

@@ -0,0 +1,56 @@
acpcia: Make it possible to pass additional CFLAGS when invoking make
-D_FORTIFY_SOURCE=2 without -O2 can cause:
--
/usr/include/features.h:314:4: error: #warning _FORTIFY_SOURCE requires
compiling with optimization (-O) [-Werror=cpp]
--
Such compiler flags must be able to get passed when invoking make.
OpenSUSE packages require to build binaries with CLFAGS="$RPM_OPT_FLAGS",
to make sure debuginfo can be obtained, security/optimization flags of
the compiler for the distribution built against are passed, etc.
This patch differs between:
1) Optional CFLAGS (OPT_CFLAGS) which have a sane default:
-D_FORTIFY_SOURCE=2 -O2 and warning flags
These will get replaced if OPT_CFLAGS= are passed via
make OPT_CFLAGS=".." invokation
2) Elementary CFLAGS (-I includes, -Dxy, ...) which are
mandatory for a successful compile run
Signed-off-by: Thomas Renninger <trenn@suse.de>
CC: arjan@linux.intel.com
---
generate/unix/Makefile.config | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
Index: acpica-unix2-20120913/generate/unix/Makefile.config
===================================================================
--- acpica-unix2-20120913.orig/generate/unix/Makefile.config
+++ acpica-unix2-20120913/generate/unix/Makefile.config
@@ -38,7 +38,7 @@ CC = gcc
OBJDIR = obj$(BITS)
BINDIR = bin$(BITS)
BITSFLAG = -m$(BITS)
-COMPILEOBJ = $(CC) -c $(CFLAGS) $(CWARNINGFLAGS) -o$@ $<
+COMPILEOBJ = $(CC) -c $(CFLAGS) -o$@ $<
LINKPROG = $(CC) $(OBJECTS) -o $(PROG) $(LDFLAGS)
INSTALLDIR = /usr/bin
INSTALLPROG = install -D ../$(BINDIR)/$(PROG) $(DESTDIR)$(INSTALLDIR)/$(PROG)
@@ -103,11 +103,15 @@ ACPICA_HEADERS = \
# Common compiler flags. The warning flags in addition to -Wall are not
# automatically included in -Wall.
#
+OPT_CFLAGS ?= \
+ -D_FORTIFY_SOURCE=2 -O2 \
+ $(CWARNINGFLAGS)
+
CFLAGS += \
+ $(OPT_CFLAGS) \
$(BITSFLAG) \
-D$(HOST) \
-D_GNU_SOURCE \
- -D_FORTIFY_SOURCE=2 \
-I$(ACPICA_INCLUDE)
LDFLAGS += $(BITSFLAG)

View File

@@ -0,0 +1,42 @@
acpcia: Fixes some minor Tab vs whitespace issues in Makefiles.
Signed-off-by: Thomas Renninger <trenn@suse.de>
---
generate/unix/acpibin/Makefile | 2 +-
generate/unix/iasl/Makefile | 6 +++---
2 files changed, 4 insertions(+), 4 deletions(-)
Index: acpica-unix2-20120913/generate/unix/acpibin/Makefile
===================================================================
--- acpica-unix2-20120913.orig/generate/unix/acpibin/Makefile
+++ acpica-unix2-20120913/generate/unix/acpibin/Makefile
@@ -27,7 +27,7 @@ HEADERS = \
$(wildcard $(ACPIBIN)/*.h)
OBJECTS = \
- $(OBJDIR)/abcompare.o \
+ $(OBJDIR)/abcompare.o \
$(OBJDIR)/abmain.o \
$(OBJDIR)/utalloc.o \
$(OBJDIR)/utcache.o \
Index: acpica-unix2-20120913/generate/unix/iasl/Makefile
===================================================================
--- acpica-unix2-20120913.orig/generate/unix/iasl/Makefile
+++ acpica-unix2-20120913/generate/unix/iasl/Makefile
@@ -192,13 +192,13 @@ INTERMEDIATES = \
$(OBJDIR)/prparserparse.c
MISC = \
- $(OBJDIR)/aslcompilerparse.h \
+ $(OBJDIR)/aslcompilerparse.h \
$(OBJDIR)/aslcompiler.y.h \
$(OBJDIR)/aslcompilerparse.output \
- $(OBJDIR)/dtparserparse.h \
+ $(OBJDIR)/dtparserparse.h \
$(OBJDIR)/dtparser.y.h \
$(OBJDIR)/dtparserparse.output \
- $(OBJDIR)/prparserparse.h \
+ $(OBJDIR)/prparserparse.h \
$(OBJDIR)/prparser.y.h \
$(OBJDIR)/prparserparse.output