diff options
author | Michael Pratt <mcpratt@pm.me> | 2022-08-25 14:56:08 -0400 |
---|---|---|
committer | Rosen Penev <rosenp@gmail.com> | 2022-09-09 15:20:58 -0700 |
commit | baf45303bf6bd1385e64e6efbb2c7672b11e2891 (patch) | |
tree | fa7c6b46a6f84572a020329b0e899e3a49ed3a95 /net/boinc/patches | |
parent | d183d3750baf2cdb57039538620fb4b4f7a61224 (diff) |
boinc: fix build with new autotools
Backport a patch that fixes build
with new versions of Autoconf and Automake.
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Diffstat (limited to 'net/boinc/patches')
-rw-r--r-- | net/boinc/patches/000-100-backport-reset-cflags-before-call.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/net/boinc/patches/000-100-backport-reset-cflags-before-call.patch b/net/boinc/patches/000-100-backport-reset-cflags-before-call.patch new file mode 100644 index 000000000..5f4858209 --- /dev/null +++ b/net/boinc/patches/000-100-backport-reset-cflags-before-call.patch @@ -0,0 +1,45 @@ +From 3f6fc35cc28387e327cb6f47feb00061ed17b84c +From: Mamoru TASAKA <mtasaka@fedoraproject.org> +Date: Sat, 30 Apr 2022 13:32:34 +0900 +Subject: [PATCH] configure.ac: reset compiler flags before calling + AC_CHECK_DECLS + +With autoconf 2.71, [AC_CHECK_DECLS] calls new internal macro +[_AC_UNDECLARED_BUILTIN], which raises error with unknown compiler +flag. On non-x86 archs, -mavx or so is not recognized, so configure +fails on such architecture. + +To fix this, reset vector related compiler flags before calling +AC_CHECK_DECLS. + +*OPENWRT EDIT: typo "sse_flags" +--- + configure.ac | 16 ++++++++++++---- + 1 file changed, 12 insertions(+), 4 deletions(-) + +--- a/configure.ac ++++ b/configure.ac +@@ -674,11 +674,19 @@ AC_CHECK_HEADERS([sys/types.h sys/un.h a + + save_cxxflags="${CXXFLAGS}" + save_cppflags="${CPPFLAGS}" +-CXXFLAGS="${CXXFLAGS} -msse3" +-CPPFLAGS="${CPPFLAGS} -msse3" ++sse3_flags="-msse3" ++avx_flags="-mavx" ++CXXFLAGS="${save_cxxflags} ${sse3_flags}" ++CPPFLAGS="${save_cppflags} ${sse3_flags}" ++AC_LINK_IFELSE([AC_LANG_PROGRAM([],)], [], [sse3_flags=""]) ++CXXFLAGS="${save_cxxflags} ${avx_flags}" ++CPPFLAGS="${save_cppflags} ${avx_flags}" ++AC_LINK_IFELSE([AC_LANG_PROGRAM([],)], [], [avx_flags=""]) ++CXXFLAGS="${save_cxxflags} ${sse3_flags}" ++CXXFLAGS="${save_cxxflags} ${sse3_flags}" + AC_CHECK_HEADERS([intrin.h x86intrin.h pmmintrin.h xmmintrin.h emmintrin.h]) +-CXXFLAGS="${save_cxxflags} -mavx" +-CPPFLAGS="${save_cppflags} -mavx" ++CXXFLAGS="${save_cxxflags} ${avx_flags}" ++CPPFLAGS="${save_cppflags} ${avx_flags}" + AC_CHECK_HEADERS([immintrin.h avxintrin.h]) + + AC_CHECK_DECLS([_xgetbv, xgetbv, __xgetbv, cpuid, _cpuid, __cpuid], |