diff options
| author | Martin Jansa <martin.jansa@gmail.com> | 2026-04-10 15:49:38 +0200 |
|---|---|---|
| committer | Khem Raj <khem.raj@oss.qualcomm.com> | 2026-04-10 17:25:50 -0700 |
| commit | a8e0bd4d84898dabccded7e189acab553240e5b8 (patch) | |
| tree | 6f61fa66e1f2d70ad80557da6892c0a0268db6e4 /meta-oe | |
| parent | da03a64bd7bcd15ebf2930950095de7c8965377c (diff) | |
| download | meta-openembedded-a8e0bd4d84898dabccded7e189acab553240e5b8.tar.gz | |
audit: fix build with autoconf-2.73
On hosts with gcc-13 it was trying to use -std=gnu23 and failing
with unrecognized command-line option (gnu23 needs gcc-14 and newer)
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
Diffstat (limited to 'meta-oe')
| -rw-r--r-- | meta-oe/recipes-security/audit/audit/0001-m4-update-ax_prog_cc_for_build.m4-to-latest.patch | 196 | ||||
| -rw-r--r-- | meta-oe/recipes-security/audit/audit_4.1.4.bb | 1 |
2 files changed, 197 insertions, 0 deletions
diff --git a/meta-oe/recipes-security/audit/audit/0001-m4-update-ax_prog_cc_for_build.m4-to-latest.patch b/meta-oe/recipes-security/audit/audit/0001-m4-update-ax_prog_cc_for_build.m4-to-latest.patch new file mode 100644 index 0000000000..cf322b8e1a --- /dev/null +++ b/meta-oe/recipes-security/audit/audit/0001-m4-update-ax_prog_cc_for_build.m4-to-latest.patch | |||
| @@ -0,0 +1,196 @@ | |||
| 1 | From 3da79b330527b5f9d6e6243c8ba12968810965a3 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Martin Jansa <martin.jansa@gmail.com> | ||
| 3 | Date: Fri, 10 Apr 2026 14:53:41 +0200 | ||
| 4 | Subject: [PATCH] m4: update ax_prog_cc_for_build.m4 to latest | ||
| 5 | MIME-Version: 1.0 | ||
| 6 | Content-Type: text/plain; charset=UTF-8 | ||
| 7 | Content-Transfer-Encoding: 8bit | ||
| 8 | |||
| 9 | After the autoconf update to 2.73 this was using -std=gnu23 | ||
| 10 | even on hosts with gcc-13 which doesn't support it: | ||
| 11 | |||
| 12 | ac_cv_prog_ac_ct_CC_FOR_BUILD='gcc ' | ||
| 13 | ac_cv_prog_cc_c23=-std=gnu23 | ||
| 14 | ac_cv_prog_cc_g=yes | ||
| 15 | ac_cv_prog_cc_stdc=-std=gnu23 | ||
| 16 | |||
| 17 | Leading to: | ||
| 18 | gcc -std=gnu23 -DHAVE_CONFIG_H -I. -I../../sources/audit-4.1.4/lib -I.. -I. -I../../sources/audit-4.1.4 -I../../sources/audit-4.1.4/auparse -I../../sources/audit-4.1.4/common -isystem/audit/4.1.4/recipe-sysroot-native/usr/include '-DTABLE_H="fieldtab.h"' -isystem/audit/4.1.4/recipe-sysroot-native/usr/include -O2 -pipe -c -o gen_fieldtabs_h-gen_tables.o `test -f 'gen_tables.c' || echo '../../sources/audit-4.1.4/lib/'`gen_tables.c | ||
| 19 | gcc: error: unrecognized command-line option â-std=gnu23â; did you mean â-std=gnu2xâ? | ||
| 20 | |||
| 21 | Needs the updated ac_cv_prog_cc_c23 from: | ||
| 22 | https://github.com/autoconf-archive/autoconf-archive/commit/8a970ce96721f516fef4226e5eca8da341159765 | ||
| 23 | |||
| 24 | Upstream-Status: Submitted [https://github.com/linux-audit/audit-userspace/pull/524] | ||
| 25 | Signed-off-by: Martin Jansa <martin.jansa@gmail.com> | ||
| 26 | --- | ||
| 27 | m4/ax_prog_cc_for_build.m4 | 100 +++++++++++++++++++++++++++---------- | ||
| 28 | 1 file changed, 75 insertions(+), 25 deletions(-) | ||
| 29 | |||
| 30 | diff --git a/m4/ax_prog_cc_for_build.m4 b/m4/ax_prog_cc_for_build.m4 | ||
| 31 | index 77fd346a..4d1de993 100644 | ||
| 32 | --- a/m4/ax_prog_cc_for_build.m4 | ||
| 33 | +++ b/m4/ax_prog_cc_for_build.m4 | ||
| 34 | @@ -1,5 +1,5 @@ | ||
| 35 | # =========================================================================== | ||
| 36 | -# http://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html | ||
| 37 | +# https://www.gnu.org/software/autoconf-archive/ax_prog_cc_for_build.html | ||
| 38 | # =========================================================================== | ||
| 39 | # | ||
| 40 | # SYNOPSIS | ||
| 41 | @@ -32,28 +32,32 @@ | ||
| 42 | # and this notice are preserved. This file is offered as-is, without any | ||
| 43 | # warranty. | ||
| 44 | |||
| 45 | -#serial 8 | ||
| 46 | +#serial 26 | ||
| 47 | |||
| 48 | AU_ALIAS([AC_PROG_CC_FOR_BUILD], [AX_PROG_CC_FOR_BUILD]) | ||
| 49 | AC_DEFUN([AX_PROG_CC_FOR_BUILD], [dnl | ||
| 50 | AC_REQUIRE([AC_PROG_CC])dnl | ||
| 51 | AC_REQUIRE([AC_PROG_CPP])dnl | ||
| 52 | -AC_REQUIRE([AC_EXEEXT])dnl | ||
| 53 | -AC_REQUIRE([AC_CANONICAL_HOST])dnl | ||
| 54 | +AC_REQUIRE([AC_CANONICAL_BUILD])dnl | ||
| 55 | |||
| 56 | dnl Use the standard macros, but make them use other variable names | ||
| 57 | dnl | ||
| 58 | pushdef([ac_cv_prog_CPP], ac_cv_build_prog_CPP)dnl | ||
| 59 | pushdef([ac_cv_prog_gcc], ac_cv_build_prog_gcc)dnl | ||
| 60 | +pushdef([ac_cv_prog_cc_c89], ac_cv_build_prog_cc_c89)dnl | ||
| 61 | +pushdef([ac_cv_prog_cc_c99], ac_cv_build_prog_cc_c99)dnl | ||
| 62 | +pushdef([ac_cv_prog_cc_c11], ac_cv_build_prog_cc_c11)dnl | ||
| 63 | +pushdef([ac_cv_prog_cc_c23], ac_cv_build_prog_cc_c23)dnl | ||
| 64 | +pushdef([ac_cv_prog_cc_stdc], ac_cv_build_prog_cc_stdc)dnl | ||
| 65 | pushdef([ac_cv_prog_cc_works], ac_cv_build_prog_cc_works)dnl | ||
| 66 | pushdef([ac_cv_prog_cc_cross], ac_cv_build_prog_cc_cross)dnl | ||
| 67 | pushdef([ac_cv_prog_cc_g], ac_cv_build_prog_cc_g)dnl | ||
| 68 | -pushdef([ac_cv_exeext], ac_cv_build_exeext)dnl | ||
| 69 | -pushdef([ac_cv_objext], ac_cv_build_objext)dnl | ||
| 70 | +pushdef([ac_prog_cc_stdc], ac_build_prog_cc_stdc)dnl | ||
| 71 | pushdef([ac_exeext], ac_build_exeext)dnl | ||
| 72 | pushdef([ac_objext], ac_build_objext)dnl | ||
| 73 | pushdef([CC], CC_FOR_BUILD)dnl | ||
| 74 | pushdef([CPP], CPP_FOR_BUILD)dnl | ||
| 75 | +pushdef([GCC], GCC_FOR_BUILD)dnl | ||
| 76 | pushdef([CFLAGS], CFLAGS_FOR_BUILD)dnl | ||
| 77 | pushdef([CPPFLAGS], CPPFLAGS_FOR_BUILD)dnl | ||
| 78 | pushdef([LDFLAGS], LDFLAGS_FOR_BUILD)dnl | ||
| 79 | @@ -67,27 +71,58 @@ pushdef([ac_cv_host_alias], ac_cv_build_alias)dnl | ||
| 80 | pushdef([ac_cv_host_cpu], ac_cv_build_cpu)dnl | ||
| 81 | pushdef([ac_cv_host_vendor], ac_cv_build_vendor)dnl | ||
| 82 | pushdef([ac_cv_host_os], ac_cv_build_os)dnl | ||
| 83 | -pushdef([ac_cpp], ac_build_cpp)dnl | ||
| 84 | -pushdef([ac_compile], ac_build_compile)dnl | ||
| 85 | -pushdef([ac_link], ac_build_link)dnl | ||
| 86 | +pushdef([ac_tool_prefix], ac_build_tool_prefix)dnl | ||
| 87 | +pushdef([am_cv_CC_dependencies_compiler_type], am_cv_build_CC_dependencies_compiler_type)dnl | ||
| 88 | +pushdef([am_cv_prog_cc_c_o], am_cv_build_prog_cc_c_o)dnl | ||
| 89 | +pushdef([cross_compiling], cross_compiling_build)dnl | ||
| 90 | +dnl | ||
| 91 | +dnl These variables are problematic to rename by M4 macros, so we save | ||
| 92 | +dnl their values in alternative names, and restore the values later. | ||
| 93 | +dnl | ||
| 94 | +dnl _AC_COMPILER_EXEEXT and _AC_COMPILER_OBJEXT internally call | ||
| 95 | +dnl AC_SUBST which prevents the renaming of EXEEXT and OBJEXT | ||
| 96 | +dnl variables. It's not a good idea to rename ac_cv_exeext and | ||
| 97 | +dnl ac_cv_objext either as they're related. | ||
| 98 | +dnl Renaming ac_exeext and ac_objext is safe though. | ||
| 99 | +dnl | ||
| 100 | +ac_cv_host_exeext=$ac_cv_exeext | ||
| 101 | +AS_VAR_SET_IF([ac_cv_build_exeext], | ||
| 102 | + [ac_cv_exeext=$ac_cv_build_exeext], | ||
| 103 | + [AS_UNSET([ac_cv_exeext])]) | ||
| 104 | +ac_cv_host_objext=$ac_cv_objext | ||
| 105 | +AS_VAR_SET_IF([ac_cv_build_objext], | ||
| 106 | + [ac_cv_objext=$ac_cv_build_objext], | ||
| 107 | + [AS_UNSET([ac_cv_objext])]) | ||
| 108 | +dnl | ||
| 109 | +dnl ac_cv_c_compiler_gnu is used in _AC_LANG_COMPILER_GNU (called by | ||
| 110 | +dnl AC_PROG_CC) indirectly. | ||
| 111 | +dnl | ||
| 112 | +ac_cv_host_c_compiler_gnu=$ac_cv_c_compiler_gnu | ||
| 113 | +AS_VAR_SET_IF([ac_cv_build_c_compiler_gnu], | ||
| 114 | + [ac_cv_c_compiler_gnu=$ac_cv_build_c_compiler_gnu], | ||
| 115 | + [AS_UNSET([ac_cv_c_compiler_gnu])]) | ||
| 116 | + | ||
| 117 | +cross_compiling_build=no | ||
| 118 | |||
| 119 | -save_cross_compiling=$cross_compiling | ||
| 120 | -save_ac_tool_prefix=$ac_tool_prefix | ||
| 121 | -cross_compiling=no | ||
| 122 | -ac_tool_prefix= | ||
| 123 | +ac_build_tool_prefix= | ||
| 124 | +AS_IF([test -n "$build"], [ac_build_tool_prefix="$build-"], | ||
| 125 | + [test -n "$build_alias"],[ac_build_tool_prefix="$build_alias-"]) | ||
| 126 | |||
| 127 | +AC_LANG_PUSH([C]) | ||
| 128 | AC_PROG_CC | ||
| 129 | +_AC_COMPILER_EXEEXT | ||
| 130 | +_AC_COMPILER_OBJEXT | ||
| 131 | AC_PROG_CPP | ||
| 132 | -AC_EXEEXT | ||
| 133 | |||
| 134 | -ac_tool_prefix=$save_ac_tool_prefix | ||
| 135 | -cross_compiling=$save_cross_compiling | ||
| 136 | +BUILD_EXEEXT=$ac_cv_exeext | ||
| 137 | +BUILD_OBJEXT=$ac_cv_objext | ||
| 138 | |||
| 139 | dnl Restore the old definitions | ||
| 140 | dnl | ||
| 141 | -popdef([ac_link])dnl | ||
| 142 | -popdef([ac_compile])dnl | ||
| 143 | -popdef([ac_cpp])dnl | ||
| 144 | +popdef([cross_compiling])dnl | ||
| 145 | +popdef([am_cv_prog_cc_c_o])dnl | ||
| 146 | +popdef([am_cv_CC_dependencies_compiler_type])dnl | ||
| 147 | +popdef([ac_tool_prefix])dnl | ||
| 148 | popdef([ac_cv_host_os])dnl | ||
| 149 | popdef([ac_cv_host_vendor])dnl | ||
| 150 | popdef([ac_cv_host_cpu])dnl | ||
| 151 | @@ -101,24 +136,39 @@ popdef([host])dnl | ||
| 152 | popdef([LDFLAGS])dnl | ||
| 153 | popdef([CPPFLAGS])dnl | ||
| 154 | popdef([CFLAGS])dnl | ||
| 155 | +popdef([GCC])dnl | ||
| 156 | popdef([CPP])dnl | ||
| 157 | popdef([CC])dnl | ||
| 158 | popdef([ac_objext])dnl | ||
| 159 | popdef([ac_exeext])dnl | ||
| 160 | -popdef([ac_cv_objext])dnl | ||
| 161 | -popdef([ac_cv_exeext])dnl | ||
| 162 | +popdef([ac_prog_cc_stdc])dnl | ||
| 163 | popdef([ac_cv_prog_cc_g])dnl | ||
| 164 | popdef([ac_cv_prog_cc_cross])dnl | ||
| 165 | popdef([ac_cv_prog_cc_works])dnl | ||
| 166 | +popdef([ac_cv_prog_cc_stdc])dnl | ||
| 167 | +popdef([ac_cv_prog_cc_c23])dnl | ||
| 168 | +popdef([ac_cv_prog_cc_c11])dnl | ||
| 169 | +popdef([ac_cv_prog_cc_c99])dnl | ||
| 170 | +popdef([ac_cv_prog_cc_c89])dnl | ||
| 171 | popdef([ac_cv_prog_gcc])dnl | ||
| 172 | popdef([ac_cv_prog_CPP])dnl | ||
| 173 | +dnl | ||
| 174 | +ac_cv_exeext=$ac_cv_host_exeext | ||
| 175 | +EXEEXT=$ac_cv_host_exeext | ||
| 176 | +ac_cv_objext=$ac_cv_host_objext | ||
| 177 | +OBJEXT=$ac_cv_host_objext | ||
| 178 | +ac_cv_c_compiler_gnu=$ac_cv_host_c_compiler_gnu | ||
| 179 | +ac_compiler_gnu=$ac_cv_host_c_compiler_gnu | ||
| 180 | + | ||
| 181 | +dnl restore global variables ac_ext, ac_cpp, ac_compile, | ||
| 182 | +dnl ac_link, ac_compiler_gnu (dependent on the current | ||
| 183 | +dnl language after popping): | ||
| 184 | +AC_LANG_POP([C]) | ||
| 185 | |||
| 186 | dnl Finally, set Makefile variables | ||
| 187 | dnl | ||
| 188 | -BUILD_EXEEXT=$ac_build_exeext | ||
| 189 | -BUILD_OBJEXT=$ac_build_objext | ||
| 190 | -AC_SUBST(BUILD_EXEEXT)dnl | ||
| 191 | -AC_SUBST(BUILD_OBJEXT)dnl | ||
| 192 | +AC_SUBST([BUILD_EXEEXT])dnl | ||
| 193 | +AC_SUBST([BUILD_OBJEXT])dnl | ||
| 194 | AC_SUBST([CFLAGS_FOR_BUILD])dnl | ||
| 195 | AC_SUBST([CPPFLAGS_FOR_BUILD])dnl | ||
| 196 | AC_SUBST([LDFLAGS_FOR_BUILD])dnl | ||
diff --git a/meta-oe/recipes-security/audit/audit_4.1.4.bb b/meta-oe/recipes-security/audit/audit_4.1.4.bb index 05d6f1d277..e349ee76d0 100644 --- a/meta-oe/recipes-security/audit/audit_4.1.4.bb +++ b/meta-oe/recipes-security/audit/audit_4.1.4.bb | |||
| @@ -9,6 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | |||
| 9 | 9 | ||
| 10 | SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=master;protocol=https;tag=v${PV} \ | 10 | SRC_URI = "git://github.com/linux-audit/${BPN}-userspace.git;branch=master;protocol=https;tag=v${PV} \ |
| 11 | file://0001-Fixed-swig-host-contamination-issue.patch \ | 11 | file://0001-Fixed-swig-host-contamination-issue.patch \ |
| 12 | file://0001-m4-update-ax_prog_cc_for_build.m4-to-latest.patch \ | ||
| 12 | file://auditd \ | 13 | file://auditd \ |
| 13 | " | 14 | " |
| 14 | 15 | ||
