Skip to content

Commit b3c742b

Browse files
make fedora.spec.into be el7 friendly
add if() to detect build for el7 and then switch to use devtoolset. Change-Id: I34d00ee59d73a9dec8e030091ff15b5fb858a548 Signed-off-by: Artur Harasimiuk <[email protected]>
1 parent aedbf48 commit b3c742b

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

manifests/manifest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ components:
1717
branch: infra
1818
clean_on_sync: true
1919
dest_dir: infra
20-
revision: a228519d4601f11ceef1f3cce1f013277be14388
20+
revision: 9343fbf2e206466fc0485d7cd2952e0535c91be2
2121
type: git
2222
internal:
2323
branch: master

scripts/fedora.spec.in

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,14 @@ URL: https://github.com/intel/compute-runtime
1212
Source0: https://github.com/intel/compute-runtime/archive/%{neo_commit_id}/neo.tar.gz
1313
Source1: https://github.com/intel/gmmlib/archive/%{gmmlib_commit_id}/gmmlib.tar.gz
1414

15+
%if 0%{?el7}
16+
BuildRequires: centos-release-scl epel-release
17+
BuildRequires: devtoolset-4-gcc-c++ cmake3
18+
BuildRequires: gcc-c++ ninja-build make procps python2 libva-devel
19+
%else
1520
BuildRequires: cmake clang gcc-c++ ninja-build make procps python2 sed libva-devel
21+
%endif
22+
1623
BuildRequires: intel-igc-opencl-devel >= __IGC_VERSION_REQUIRED__
1724
Requires: intel-igc-opencl >= __IGC_VERSION_REQUIRED__
1825

@@ -32,8 +39,15 @@ tar xzf $RPM_SOURCE_DIR/gmmlib.tar.gz -C gmmlib --strip-components=1
3239

3340
mkdir build
3441
cd build
42+
43+
%if 0%{?el7}
44+
scl enable devtoolset-4 "cmake3 ../neo -DCMAKE_BUILD_TYPE=Release -DNEO_DRIVER_VERSION=%{version}"
45+
scl enable devtoolset-4 "make -j`nproc` igdrcl_dll"
46+
%else
3547
cmake ../neo -DCMAKE_BUILD_TYPE=Release -DNEO_DRIVER_VERSION=%{version}
3648
make -j`nproc` igdrcl_dll
49+
%endif
50+
3751
echo "==== DONE ===="
3852

3953

0 commit comments

Comments
 (0)