Browse code

aarch64 compilation: added conditions for aarch64 for mongodb

Change-Id: Ida443a4c9d75013e156a32fc21d390592b49b82e
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/5451
Reviewed-by: Alexey Makhalov <amakhalov@vmware.com>
Tested-by: gerrit-photon <photon-checkins@vmware.com>

Ajay Kaher authored on 2018/08/04 02:44:58
Showing 1 changed files
... ...
@@ -19,13 +19,31 @@ MongoDB (from "humongous") is a scalable, high-performance, open source, documen
19 19
 %setup -qn mongo-r%{version}
20 20
 
21 21
 %build
22
+%ifarch x86_64
22 23
 scons %{?_smp_mflags} MONGO_VERSION=%{version} \
23 24
     --disable-warnings-as-errors
25
+%endif
26
+
27
+%ifarch aarch64
28
+scons %{?_smp_mflags} MONGO_VERSION=%{version} CCFLAGS="-march=armv8-a+crc" \
29
+    --disable-warnings-as-errors
30
+%endif
31
+
32
+
24 33
 
25 34
 %install
35
+%ifarch x86_64
26 36
 scons %{?_smp_mflags} MONGO_VERSION=%{version} install \
27 37
     --prefix=%{buildroot}%{_prefix} \
28 38
     --disable-warnings-as-errors
39
+%endif
40
+
41
+%ifarch aarch64
42
+scons %{?_smp_mflags} MONGO_VERSION=%{version} CCFLAGS="-march=armv8-a+crc" install \
43
+    --prefix=%{buildroot}%{_prefix} \
44
+    --disable-warnings-as-errors
45
+%endif
46
+
29 47
 install -d %{buildroot}/var/log/%{name}
30 48
 install -d %{buildroot}/var/lib/mongo
31 49
 install -d -m 755 %{buildroot}%{_unitdir}