summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/powertop
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/powertop')
-rw-r--r--meta/recipes-kernel/powertop/powertop/0002-configure.ac-ax_add_fortify_source.patch70
-rw-r--r--meta/recipes-kernel/powertop/powertop/0003-configure-Use-AX_REQUIRE_DEFINED.patch29
-rw-r--r--meta/recipes-kernel/powertop/powertop_2.10.bb8
3 files changed, 104 insertions, 3 deletions
diff --git a/meta/recipes-kernel/powertop/powertop/0002-configure.ac-ax_add_fortify_source.patch b/meta/recipes-kernel/powertop/powertop/0002-configure.ac-ax_add_fortify_source.patch
new file mode 100644
index 0000000000..4ccbdbfcd1
--- /dev/null
+++ b/meta/recipes-kernel/powertop/powertop/0002-configure.ac-ax_add_fortify_source.patch
@@ -0,0 +1,70 @@
1From 0d833743954ac1c58773cbf7a78fe0dc8105ae4a Mon Sep 17 00:00:00 2001
2From: Joe Konno <joe.konno@linux.intel.com>
3Date: Tue, 11 Feb 2020 14:15:42 -0800
4Subject: [PATCH] configure.ac: ax_add_fortify_source
5
6Use a maintained autoconf-archive macro to determine whether we need to
7add -D_FORTIFY_SOURCE=3D2, or if the underlying OS (or toolchain) has it
8baked in.
9
10Signed-off-by: Joe Konno <joe.konno@intel.com>
11
12Fixes:
13 aclocal: error: too many loops
14
15Upstream-Status: Backport from 2.12
16Signed-off-by: Tim Orling <timothy.t.orling@intel.com>
17---
18 configure.ac | 2 +-
19 m4/gcc_fortify_source_cc.m4 | 29 -----------------------------
20 2 files changed, 1 insertion(+), 30 deletions(-)
21 delete mode 100644 m4/gcc_fortify_source_cc.m4
22
23diff --git a/configure.ac b/configure.ac
24index d6a15e1..d68369c 100644
25--- a/configure.ac
26+++ b/configure.ac
27@@ -36,7 +36,7 @@ AC_PROG_LIBTOOL
28 AC_PROG_CC
29 AC_PROG_INSTALL
30 AM_PROG_CC_C_O
31-GCC_FORTIFY_SOURCE_CC
32+AX_ADD_FORTIFY_SOURCE
33 AX_CXX_COMPILE_STDCXX_11([noext], [mandatory])
34
35 # Checks for libraries.
36diff --git a/m4/gcc_fortify_source_cc.m4 b/m4/gcc_fortify_source_cc.m4
37deleted file mode 100644
38index 1206672..0000000
39--- a/m4/gcc_fortify_source_cc.m4
40+++ /dev/null
41@@ -1,29 +0,0 @@
42-dnl GCC_FORTIFY_SOURCE_CC
43-dnl checks -D_FORTIFY_SOURCE with the C++ compiler, if it exists then
44-dnl updates CXXCPP
45-AC_DEFUN([GCC_FORTIFY_SOURCE_CC],[
46- AC_LANG_ASSERT([C++])
47- AS_IF([test "X$CXX" != "X"], [
48- AC_MSG_CHECKING([for FORTIFY_SOURCE support])
49- fs_old_cxxcpp="$CXXCPP"
50- fs_old_cxxflags="$CXXFLAGS"
51- CXXCPP="$CXXCPP -D_FORTIFY_SOURCE=2"
52- CXXFLAGS="$CXXFLAGS -Werror"
53- AC_COMPILE_IFELSE([
54- AC_LANG_PROGRAM([[]], [[
55- int main(void) {
56- #if !(__GNUC_PREREQ (4, 1) )
57- #error No FORTIFY_SOURCE support
58- #endif
59- return 0;
60- }
61- ]], [
62- AC_MSG_RESULT([yes])
63- ], [
64- AC_MSG_RESULT([no])
65- CXXCPP="$fs_old_cxxcpp"
66- ])
67- ])
68- CXXFLAGS="$fs_old_cxxflags"
69- ])
70-])
diff --git a/meta/recipes-kernel/powertop/powertop/0003-configure-Use-AX_REQUIRE_DEFINED.patch b/meta/recipes-kernel/powertop/powertop/0003-configure-Use-AX_REQUIRE_DEFINED.patch
new file mode 100644
index 0000000000..ac728f4a39
--- /dev/null
+++ b/meta/recipes-kernel/powertop/powertop/0003-configure-Use-AX_REQUIRE_DEFINED.patch
@@ -0,0 +1,29 @@
1From fbf74492236676e844b021b0dbb45b1ca43a0410 Mon Sep 17 00:00:00 2001
2From: David King <amigadave@amigadave.com>
3Date: Thu, 15 Apr 2021 11:45:13 +0100
4Subject: [PATCH] configure: Use AX_REQUIRE_DEFINED
5
6Require additional macros to be defined early, to avoid an aclocal
7"too many loops" error when copying macros.
8
9Upstream-Status: Backport from tip
10
11Signed-off-by: Tim Orling <ticotimo@gmail.com>
12---
13 configure.ac | 3 +++
14 1 file changed, 3 insertions(+)
15
16diff --git a/configure.ac b/configure.ac
17index d68369c..b90831b 100644
18--- a/configure.ac
19+++ b/configure.ac
20@@ -29,6 +29,9 @@ AM_GNU_GETTEXT([external])
21 AM_GNU_GETTEXT_VERSION([0.18.2])
22
23 m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
24+AX_REQUIRE_DEFINED([AX_ADD_FORTIFY_SOURCE])
25+AX_REQUIRE_DEFINED([AX_CXX_COMPILE_STDCXX])
26+AX_REQUIRE_DEFINED([AX_PTHREAD])
27 # Checks for programs.
28 AC_PROG_CPP
29 AC_PROG_CXX
diff --git a/meta/recipes-kernel/powertop/powertop_2.10.bb b/meta/recipes-kernel/powertop/powertop_2.10.bb
index f1b0e92b2b..ffa3b4685c 100644
--- a/meta/recipes-kernel/powertop/powertop_2.10.bb
+++ b/meta/recipes-kernel/powertop/powertop_2.10.bb
@@ -2,13 +2,15 @@ SUMMARY = "Power usage tool"
2DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management." 2DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management."
3HOMEPAGE = "https://01.org/powertop/" 3HOMEPAGE = "https://01.org/powertop/"
4BUGTRACKER = "https://app.devzing.com/powertopbugs/bugzilla" 4BUGTRACKER = "https://app.devzing.com/powertopbugs/bugzilla"
5DEPENDS = "ncurses libnl pciutils" 5DEPENDS = "ncurses libnl pciutils autoconf-archive"
6LICENSE = "GPLv2" 6LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" 7LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e"
8 8
9SRC_URI = "git://github.com/fenrus75/powertop;protocol=https \ 9SRC_URI = "git://github.com/fenrus75/powertop;protocol=https \
10 file://0001-wakeup_xxx.h-include-limits.h.patch \ 10 file://0001-wakeup_xxx.h-include-limits.h.patch \
11" 11 file://0002-configure.ac-ax_add_fortify_source.patch \
12 file://0003-configure-Use-AX_REQUIRE_DEFINED.patch \
13 "
12SRCREV = "e8765b5475b22b7a2b6e9e8a031c68a268a0b0b3" 14SRCREV = "e8765b5475b22b7a2b6e9e8a031c68a268a0b0b3"
13 15
14S = "${WORKDIR}/git" 16S = "${WORKDIR}/git"