From 89b2b14b1bf566d356f338ef42d79015da12ca03 Mon Sep 17 00:00:00 2001 From: s Date: Sat, 19 Aug 2023 12:21:43 +0800 Subject: [PATCH] fix clang build error --- libhugetlbfs.spec | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/libhugetlbfs.spec b/libhugetlbfs.spec index 780bcf2..574dfe4 100644 --- a/libhugetlbfs.spec +++ b/libhugetlbfs.spec @@ -2,7 +2,7 @@ Name: libhugetlbfs Version: 2.23 -Release: 3 +Release: 4 Summary: A library which provides easy access to huge pages of memory License: LGPLv2+ URL: https://github.com/libhugetlbfs/libhugetlbfs @@ -44,6 +44,9 @@ Userspace utilities for configuring the hugepage environment %autosetup -n %{name}-%{version} -p1 %build +%if "%toolchain" == "clang" + cp -r ldscripts %{_builddir}/ +%endif %set_build_flags make BUILDTYPE=NATIVEONLY @@ -52,6 +55,9 @@ make BUILDTYPE=NATIVEONLY make install-helper PREFIX=%{_prefix} DESTDIR=$RPM_BUILD_ROOT LDSCRIPTDIR=%{ldscriptdir} BUILDTYPE=NATIVEONLY mkdir -p -m755 $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d touch $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d/hugepages.conf +%if "%toolchain" == "clang" + rm -rf %{_builddir}/ldscripts +%endif %post -p /sbin/ldconfig @@ -88,6 +94,9 @@ touch $RPM_BUILD_ROOT%{_sysconfdir}/security/limits.d/hugepages.conf %changelog +* Sat Aug 19 2023 yoo - 2.23-4 +- fix clang build error + * Fri Dec 2 2022 huajingyun - 2.23-3 - add loongarch support -- Gitee