From 3979890755dcde448fa62aef9790daf609ab093f Mon Sep 17 00:00:00 2001 From: Chenxi Mao Date: Tue, 18 Apr 2023 14:28:42 +0800 Subject: [PATCH] Fix build error if compiler is clang If toolchain switch from gcc to clang, build error as below: [ 346s] checking whether the C compiler works... no [ 346s] configure: error: in `/home/abuild/rpmbuild/BUILD/anaconda-36.16.5': [ 346s] configure: error: C compiler cannot create executables [ 346s] See `config.log' for more details This patch is try to fix build error if toolchain switch from gcc to clang. The modification affect the compiler is clang only. Signed-off-by: Chenxi Mao --- anaconda.spec | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/anaconda.spec b/anaconda.spec index 6d72101..bea58de 100644 --- a/anaconda.spec +++ b/anaconda.spec @@ -1,7 +1,7 @@ %define _empty_manifest_terminate_build 0 Name: anaconda Version: 36.16.5 -Release: 14 +Release: 15 Summary: Graphical system installer License: GPLv2+ and MIT URL: http://fedoraproject.org/wiki/Anaconda @@ -164,7 +164,11 @@ runtime on NFS/HTTP/FTP servers or local disks. %build # use actual build-time release number, not tarball creation time release number +%if "%toolchain" == "clang" +%configure ANACONDA_RELEASE=%{release} CC=clang +%else %configure ANACONDA_RELEASE=%{release} +%endif %make_build %install @@ -278,6 +282,12 @@ update-desktop-database &> /dev/null || : %{_prefix}/libexec/anaconda/dd_* %changelog +* Tue May 16 2023 Chenxi Mao - 36.16.5-15 +- Type:bugfix +- ID:NA +- SUG:NA +- DESC: Support build with clang. + * Fri Feb 24 2023 sunhai - 36.16.5-14 - Type:bugfix - ID:NA