Skip to content

Commit

Permalink
perf: add amd64 compile flags back
Browse files Browse the repository at this point in the history
  • Loading branch information
oilbeater committed May 19, 2020
1 parent e755288 commit 1d5c695
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 3 additions & 1 deletion dist/images/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# syntax = docker/dockerfile:experimental
FROM centos:8 as ovs-rpm

ARG RPM_ARCH
ARG ARCH

RUN yum install dnf-plugins-core -y && \
yum config-manager --set-enabled PowerTools && \
yum install python36 git wget openssl-devel gcc \
Expand All @@ -10,7 +13,6 @@ RUN yum install dnf-plugins-core -y && \
desktop-file-utils graphviz groff python3-sphinx -y
COPY build.sh /root/build.sh
RUN bash /root/build.sh
ARG RPM_ARCH
RUN mkdir /rpms/ && \
cp /ovs/rpm/rpmbuild/RPMS/${RPM_ARCH}/* /ovn/rpm/rpmbuild/RPMS/${RPM_ARCH}/* /rpms && \
cd /rpms && rm -f *debug* *docker* *vtep* *ipsec*
Expand Down
12 changes: 10 additions & 2 deletions dist/images/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@ curl https://github.com/alauda/ovs/commit/238003290766808ba310e1875157b3d4142456
sed -i 's/2.13.1/2.13.0/g' configure.ac
sed -i 's/sphinx-build-3/sphinx-build/g' rhel/openvswitch-fedora.spec.in
./boot.sh
./configure LIBS=-ljemalloc
if [ "$ARCH" = "amd64" ]; then
./configure LIBS=-ljemalloc CFLAGS="-O2 -g -msse4.2 -mpopcnt"
else
./configure LIBS=-ljemalloc
fi
make rpm-fedora
cd ..

Expand All @@ -28,5 +32,9 @@ curl https://github.com/oilbeater/ovn/commit/7e49a662d9a9d23d673958564048eee71dc
curl https://github.com/oilbeater/ovn/commit/1e0d051acb355ca835e07f87be402cfb5d68f5b2.patch | git apply
sed -i 's/20.03.1/20.03.0/g' configure.ac
./boot.sh
./configure LIBS=-ljemalloc --with-ovs-source=/ovs
if [ "$ARCH" = "amd64" ]; then
./configure LIBS=-ljemalloc --with-ovs-source=/ovs CFLAGS="-O2 -g -msse4.2 -mpopcnt"
else
./configure LIBS=-ljemalloc --with-ovs-source=/ovs
fi
make rpm-fedora

0 comments on commit 1d5c695

Please sign in to comment.