Skip to content

Commit

Permalink
Merge pull request #9158 from cms-sw/140x-multi-arch-os-hook
Browse files Browse the repository at this point in the history
[14.0.X] backport of multi-arch and scram os mismatch hook
  • Loading branch information
smuzaffar authored Apr 25, 2024
2 parents 69a2316 + bd548e3 commit 5aa89b7
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 6 deletions.
4 changes: 2 additions & 2 deletions SCRAMV1.spec
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### RPM lcg SCRAMV1 V3_00_68
### RPM lcg SCRAMV1 V3_00_70
## NOCOMPILER
## NO_VERSION_SUFFIX

%define tag 15a8797db3180ba786e6e131a9c4e3011b53bc68
%define tag 121148347412a0362c99139de0aa67e06171909d
%define branch SCRAMV3
%define github_user cms-sw
Source: git+https://github.com/%{github_user}/SCRAM.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&output=/%{n}-%{realversion}-%{tag}.tgz
Expand Down
4 changes: 2 additions & 2 deletions cms-common.spec
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
### RPM cms cms-common 1.0
## REVISION 1233
## REVISION 1234
## NOCOMPILER

%define tag 17fc23fb375c04706a08f3f607a35ac6761067e1
%define tag f1821e6c6953b601cb5501ced2125b15b65d6e26
Source: git+https://github.com/cms-sw/cms-common.git?obj=master/%{tag}&export=%{n}-%{realversion}-%{tag}&output=/%{n}-%{realversion}-%{tag}.tgz

%prep
Expand Down
7 changes: 7 additions & 0 deletions cmssw-queue-override.file
Original file line number Diff line number Diff line change
Expand Up @@ -50,3 +50,10 @@ Source20: CXXModules.mk
%define patchsrc20 cp %{_sourcedir}/CXXModules.mk config/SCRAM/GMake/CXXModules.mk
%endif

%if "%(case %realversion in (*MULTIARCH*) echo true ;; (*) echo false ;; esac)" == "true"
%define scram_target_default auto
%endif

%if "%(case %realversion in (*SKYLAKE*) echo true ;; (*) echo false ;; esac)" == "true"
%define scram_target_default auto
%endif
11 changes: 9 additions & 2 deletions scram-project-build.file
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,16 @@
%define cmssw_libs biglib/%{cmsplatf} lib/%{cmsplatf}
%define scram_home_suffix %(echo %{directpkgreqs} | grep -q /SCRAMV1/V2_ && echo /src || true)
%define scram_script_prefix %(echo %{directpkgreqs} | grep -q /SCRAMV1/V2_ && echo .pl || echo .py)

%if "%{?pkgname}" != "coral"
%if "%{?package_vectorization}" != ""
%define vectorized_build yes
%if "%{?scram_target_default:set}" != "set"
%define scram_target_default default
%endif
%endif
%endif

%if "%{?pgo_generate}"
%undefine runGlimpse
%undefine saveDeps
Expand Down Expand Up @@ -55,7 +60,7 @@ BuildRequires: dwz
%endif

%if "%{?configtag:set}" != "set"
%define configtag V09-02-13
%define configtag V09-02-14
%endif

%if "%{?buildarch:set}" != "set"
Expand Down Expand Up @@ -123,10 +128,12 @@ echo %{configtag} > %_builddir/config/config_tag
%else
--keys ENABLE_PGO=0
%endif

%if "%{?vectorized_build:set}" == "set"
sed -i -e 's| SCRAM_TARGETS=.*"| SCRAM_TARGETS="%{package_vectorization}"|' %_builddir/config/Self.xml
sed -i -e 's|</tool>|<runtime name="SCRAM_TARGET" value="auto"/><runtime name="USER_TARGETS_ALL" value="1"/></tool>|' %_builddir/config/Self.xml
sed -i -e 's|</tool>|<runtime name="SCRAM_TARGET" value="%{scram_target_default}"/><runtime name="USER_TARGETS_ALL" value="1"/></tool>|' %_builddir/config/Self.xml
%endif

%if "%{?release_usercxxflags:set}" == "set"
echo '<flags CXXFLAGS="%{release_usercxxflags}"/>' >> %_builddir/config/BuildFile.xml
%endif
Expand Down

0 comments on commit 5aa89b7

Please sign in to comment.