More build fixes.

This commit is contained in:
Adam Ierymenko 2016-06-27 14:21:54 -07:00
parent 8de5b2beda
commit 147f735333
5 changed files with 42 additions and 8 deletions

View File

@ -5,10 +5,13 @@ RUN yum update -y
RUN yum install -y epel-release RUN yum install -y epel-release
RUN yum install -y make development-tools rpmdevtools http-parser-devel lz4-devel libnatpmp-devel RUN yum install -y make development-tools rpmdevtools http-parser-devel lz4-devel libnatpmp-devel
RUN yum install -y centos-release-scl #RUN yum install -y centos-release-scl
RUN yum install -y devtoolset-4-gcc-c++ #RUN yum install -y devtoolset-4-gcc-c++
RUN ln -sf /opt/rh/devtoolset-4/root/usr/bin/gcc /usr/bin/gcc RUN yum install -y clang
RUN ln -sf /opt/rh/devtoolset-4/root/usr/bin/g++ /usr/bin/g++ RUN yum install -y gcc-c++
#RUN ln -sf /opt/rh/devtoolset-4/root/usr/bin/gcc /usr/bin/gcc
#RUN ln -sf /opt/rh/devtoolset-4/root/usr/bin/g++ /usr/bin/g++
ADD zt1-src.tar.gz / ADD zt1-src.tar.gz /

View File

@ -17,7 +17,7 @@ RUN yum install -y gcc-c++
ADD zt1-src.tar.gz / ADD zt1-src.tar.gz /
RUN mv /ZeroTierOne/make-linux.mk /ZeroTierOne/make-linux.mk.old #RUN mv /ZeroTierOne/make-linux.mk /ZeroTierOne/make-linux.mk.old
RUN echo 'CFLAGS=-O3 -fstack-protector' >/ZeroTierOne/make-linux.mk #RUN echo 'CFLAGS=-O3 -fstack-protector' >/ZeroTierOne/make-linux.mk
RUN echo 'CXXFLAGS=-O3 -fstack-protector' >>/ZeroTierOne/make-linux.mk #RUN echo 'CXXFLAGS=-O3 -fstack-protector' >>/ZeroTierOne/make-linux.mk
RUN cat /ZeroTierOne/make-linux.mk.old >>/ZeroTierOne/make-linux.mk #RUN cat /ZeroTierOne/make-linux.mk.old >>/ZeroTierOne/make-linux.mk

View File

@ -0,0 +1,10 @@
FROM centos:7
MAINTAINER Adam Ierymenko <adam.ierymenko@zerotier.com>
RUN yum update -y
RUN yum install -y epel-release
RUN yum install -y make development-tools rpmdevtools http-parser-devel lz4-devel libnatpmp-devel
RUN yum install -y clang gcc-c++
ADD zt1-src.tar.gz /

View File

@ -0,0 +1,17 @@
#FROM zerotier/centos7-32bit
#MAINTAINER Adam Ierymenko <adam.ierymenko@zerotier.com>
#RUN echo 'i686-redhat-linux' >/etc/rpm/platform
#RUN yum update -y
#RUN yum install -y make development-tools rpmdevtools http-parser-devel lz4-devel libnatpmp-devel
#RUN yum install -y gcc-c++
#RUN rpm --install --force https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm
#RUN rpm --install --force ftp://rpmfind.net/linux/centos/6.8/os/i386/Packages/libffi-3.0.5-3.2.el6.i686.rpm
#RUN yum install -y clang
FROM zerotier/zt1-build-centos-7-x86-base
MAINTAINER Adam Ierymenko <adam.ierymenko@zerotier.com>
ADD zt1-src.tar.gz /

View File

@ -64,7 +64,11 @@ rm -f %{name}-%{version}
cp -a %{getenv:PWD}/* . cp -a %{getenv:PWD}/* .
%build %build
%if 0%{?rhel} <= 7
make CFLAGS="`echo %{optflags} | sed s/stack-protector-strong/stack-protector/`" CXXFLAGS="`echo %{optflags} | sed s/stack-protector-strong/stack-protector/`" ZT_USE_MINIUPNPC=1 %{?_smp_mflags} one manpages selftest make CFLAGS="`echo %{optflags} | sed s/stack-protector-strong/stack-protector/`" CXXFLAGS="`echo %{optflags} | sed s/stack-protector-strong/stack-protector/`" ZT_USE_MINIUPNPC=1 %{?_smp_mflags} one manpages selftest
%else
make CFLAGS="%{optflags}" CXXFLAGS="%{optflags}" ZT_USE_MINIUPNPC=1 %{?_smp_mflags} one manpages selftest
%endif
%install %install
rm -rf $RPM_BUILD_ROOT rm -rf $RPM_BUILD_ROOT