diff options
Diffstat (limited to 'meta/recipes-kernel/powertop')
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 @@ | |||
1 | From 0d833743954ac1c58773cbf7a78fe0dc8105ae4a Mon Sep 17 00:00:00 2001 | ||
2 | From: Joe Konno <joe.konno@linux.intel.com> | ||
3 | Date: Tue, 11 Feb 2020 14:15:42 -0800 | ||
4 | Subject: [PATCH] configure.ac: ax_add_fortify_source | ||
5 | |||
6 | Use a maintained autoconf-archive macro to determine whether we need to | ||
7 | add -D_FORTIFY_SOURCE=3D2, or if the underlying OS (or toolchain) has it | ||
8 | baked in. | ||
9 | |||
10 | Signed-off-by: Joe Konno <joe.konno@intel.com> | ||
11 | |||
12 | Fixes: | ||
13 | aclocal: error: too many loops | ||
14 | |||
15 | Upstream-Status: Backport from 2.12 | ||
16 | Signed-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 | |||
23 | diff --git a/configure.ac b/configure.ac | ||
24 | index 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. | ||
36 | diff --git a/m4/gcc_fortify_source_cc.m4 b/m4/gcc_fortify_source_cc.m4 | ||
37 | deleted file mode 100644 | ||
38 | index 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 @@ | |||
1 | From fbf74492236676e844b021b0dbb45b1ca43a0410 Mon Sep 17 00:00:00 2001 | ||
2 | From: David King <amigadave@amigadave.com> | ||
3 | Date: Thu, 15 Apr 2021 11:45:13 +0100 | ||
4 | Subject: [PATCH] configure: Use AX_REQUIRE_DEFINED | ||
5 | |||
6 | Require additional macros to be defined early, to avoid an aclocal | ||
7 | "too many loops" error when copying macros. | ||
8 | |||
9 | Upstream-Status: Backport from tip | ||
10 | |||
11 | Signed-off-by: Tim Orling <ticotimo@gmail.com> | ||
12 | --- | ||
13 | configure.ac | 3 +++ | ||
14 | 1 file changed, 3 insertions(+) | ||
15 | |||
16 | diff --git a/configure.ac b/configure.ac | ||
17 | index 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" | |||
2 | DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management." | 2 | DESCRIPTION = "Linux tool to diagnose issues with power consumption and power management." |
3 | HOMEPAGE = "https://01.org/powertop/" | 3 | HOMEPAGE = "https://01.org/powertop/" |
4 | BUGTRACKER = "https://app.devzing.com/powertopbugs/bugzilla" | 4 | BUGTRACKER = "https://app.devzing.com/powertopbugs/bugzilla" |
5 | DEPENDS = "ncurses libnl pciutils" | 5 | DEPENDS = "ncurses libnl pciutils autoconf-archive" |
6 | LICENSE = "GPLv2" | 6 | LICENSE = "GPLv2" |
7 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" | 7 | LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" |
8 | 8 | ||
9 | SRC_URI = "git://github.com/fenrus75/powertop;protocol=https \ | 9 | SRC_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 | " | ||
12 | SRCREV = "e8765b5475b22b7a2b6e9e8a031c68a268a0b0b3" | 14 | SRCREV = "e8765b5475b22b7a2b6e9e8a031c68a268a0b0b3" |
13 | 15 | ||
14 | S = "${WORKDIR}/git" | 16 | S = "${WORKDIR}/git" |