From 50431f32e5c726df710d0bca4bd49a92cf1e6f3d Mon Sep 17 00:00:00 2001 From: lf14 Date: Thu, 12 Oct 2023 09:44:57 +0800 Subject: [PATCH] support clang build --- hadoop.spec | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hadoop.spec b/hadoop.spec index 11df1ec..32a0d3b 100644 --- a/hadoop.spec +++ b/hadoop.spec @@ -11,7 +11,7 @@ %define _binaries_in_noarch_packages_terminate_build 0 Name: hadoop Version: 3.3.4 -Release: 4 +Release: 5 Summary: A software platform for processing vast amounts of data # The BSD license file is missing # https://issues.apache.org/jira/browse/HADOOP-9849 @@ -312,6 +312,11 @@ ${HOME}/repository/com/github/eirslett/yarn/1.22.5/yarn-v1.22.5/bin/yarn config %mvn_file :%{name}-common::tests: %{name}/%{name}-common %build +if [[ "%{?toolchain}" == "clang" ]] +then + export CXXFLAGS="$CXXFLAGS -mcpu=generic+Crc -Wno-reserved-user-defined-literal" + export CFLAGS="$CFLAGS -mcpu=generic+Crc -Wno-reserved-user-defined-literal" +fi mvn clean -Dsnappy.lib=/usr/lib64 -Dbundle.snappy -Dcontainer-executor.conf.dir=%{_sysconfdir}/%{name} -Pdist,native -DskipTests -DskipIT -Dmaven.javadoc.skip=true package -s settings.xml %install @@ -1132,6 +1137,9 @@ fi %config(noreplace) %{_sysconfdir}/%{name}/container-executor.cfg %changelog +* Wed Oct 11 2023 luofeng - 3.3.4-5 +- support clang build + * Wed Aug 16 2023 Jia Chao - 3.3.4-4 - fix: use $HOME rather than /home/abuild, suit for all buildtools. - fix: yarn have ELF bin, not noarch at all. -- Gitee