diff options
Diffstat (limited to 'meta/recipes-kernel/powertop/powertop/0002-configure.ac-ax_add_fortify_source.patch')
-rw-r--r-- | meta/recipes-kernel/powertop/powertop/0002-configure.ac-ax_add_fortify_source.patch | 70 |
1 files changed, 70 insertions, 0 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 | -]) | ||