From 83ffbac5dbbbc679cf084d5e5c58223e83240cd6 Mon Sep 17 00:00:00 2001 From: luofeng14 Date: Sun, 4 Feb 2024 08:59:41 +0000 Subject: [PATCH] support clang build Signed-off-by: luofeng14 --- backport-support-clang.patch | 37 ++++++++++++++++++++++++++++++++++++ gnutls.spec | 9 ++++++++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 backport-support-clang.patch diff --git a/backport-support-clang.patch b/backport-support-clang.patch new file mode 100644 index 0000000..c811724 --- /dev/null +++ b/backport-support-clang.patch @@ -0,0 +1,37 @@ +From 4a43dec6ede89b70d7298b1e16514872a1ba7221 Mon Sep 17 00:00:00 2001 +From: luofeng +Date: Sun, 4 Feb 2024 08:53:39 +0000 +Subject: [PATCH] support clang build + +--- + configure.ac | 14 ++++++++++++++ + 1 file changed, 14 insertions(+) + +diff --git a/configure.ac b/configure.ac +index 4c898b3..bc9363d 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -252,6 +252,20 @@ if test "$hw_accel" = aarch64; then + AC_SUBST(AARCH64_CCASFLAGS) + fi + ++# Check if the assembler supports -march=all ++if test "$hw_accel" = aarch64; then ++ AARCH64_CCASFLAGS="-Wa,-march=all" ++ AC_MSG_CHECKING([whether the compiler supports -Wa,-march=all]) ++ : > conftest.s ++ if "$CCAS" "$AARCH64_CCASFLAGS" -c conftest.s >/dev/null 2>&1; then ++ AC_MSG_RESULT(yes) ++ else ++ AC_MSG_RESULT(no) ++ AARCH64_CCASFLAGS= ++ fi ++ AC_SUBST(AARCH64_CCASFLAGS) ++fi ++ + # check for gcc's __get_cpuid_count functionality + AC_MSG_CHECKING([for __get_cpuid_count]) + AC_LINK_IFELSE( +-- +2.33.0 + diff --git a/gnutls.spec b/gnutls.spec index 99bca99..688a74a 100644 --- a/gnutls.spec +++ b/gnutls.spec @@ -1,6 +1,6 @@ Name: gnutls Version: 3.8.2 -Release: 1 +Release: 2 Summary: The GNU Secure Communication Protocol Library License: LGPLv2.1+ and GPLv3+ @@ -11,6 +11,7 @@ Source1: https://www.gnupg.org/ftp/gcrypt/gnutls/v3.8/%{name}-%{version}.tar.xz. Patch0: fix-ipv6-handshake-failed.patch Patch1: backport-CVE-2024-0553-rsa-psk-minimize-branching-after-decryption.patch Patch2: backport-CVE-2024-0567-x509-detect-loop-in-certificate-chain.patch +Patch3: backport-support-clang.patch %bcond_without dane %bcond_with guile @@ -200,6 +201,12 @@ make check %{?_smp_mflags} %endif %changelog +* Tue Nov 14 2023 r30030392 - 3.8.2-2 +- Type:NA +- CVE:NA +- SUG:NA +- DESC:support for building with clang + * Mon Jan 29 2024 xuraoqing - 3.8.2-1 - update to 3.8.2 - some API and ABI modifications, see NEWS for details -- Gitee