From 4231a9d7eaab0726818ec3ac66420ac8012c66d7 Mon Sep 17 00:00:00 2001 From: luofeng14 Date: Sun, 25 Feb 2024 10:13:30 +0000 Subject: [PATCH] support clang build Signed-off-by: luofeng14 --- ntp.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/ntp.spec b/ntp.spec index 89504fd..a6db5cc 100644 --- a/ntp.spec +++ b/ntp.spec @@ -2,7 +2,7 @@ Name: ntp Version: 4.2.8p17 -Release: 3 +Release: 4 Summary: A protocol designed to synchronize the clocks of computers over a network License: MIT and BSD and BSD with advertising URL: https://www.ntp.org/ @@ -68,6 +68,9 @@ done %build sed -i 's|$CFLAGS -Wstrict-overflow|$CFLAGS|' configure sntp/configure export CFLAGS="$RPM_OPT_FLAGS -fno-strict-aliasing -fno-strict-overflow" +%if "%{?toolchain}" == "clang" + CFLAGS="${CFLAGS:-%{?build_cflags}} $CFLAGS -Wno-error=int-conversion"; export CFLAGS; +%endif %configure \ --sysconfdir=%{_sysconfdir}/ntp/crypto --with-locfile=redhat \ --without-ntpsnmpd --enable-all-clocks --enable-parse-clocks \ @@ -208,6 +211,12 @@ make check %{_mandir}/man8/*.8* %changelog +* Thu Feb 22 2024 luofng - 4.2.8p17-4 +- Type: enhencement +- CVE:NA +- SUG:NA +- DESC:support for building with clang + * Tue Jan 23 2024 chengyechun - 4.2.8p17-3 - Type:bugfix - ID:NA -- Gitee