Skip to content
Snippets Groups Projects
Commit eacdc0c1 authored by Thomas Juerges's avatar Thomas Juerges
Browse files

ROHD-2434: Bug fix for lofar-base code optimisation

Fix a bug where parts of the image are always compiled with
-march=haswell setting.  This breaks even the compilation of lofar-base
further down the line when executed on a non-haswell build host.
parent 35ea1fa0
No related branches found
No related tags found
2 merge requests!138Lofar release 4 0,!130Resolve ROHD-2434 "Bug fix lofar docker base cpu optimisation"
......@@ -62,7 +62,20 @@ ENV CASACORE_VERSION=v3.1.0 \
# Allow to specify the number of cpus as --build-arg.
#
ARG J=6
ENV J=${J} CXX_FLAGS="--std=c++11 -W -Wall -Woverloaded-virtual -Wno-unknown-pragmas -D_GLIBCXX_USE_CXX11_ABI=${CXX_ABI} -O3 -march=haswell"
ENV J=${J}
# Allow to overwrite the default CXX_FLAGS settings for code compilation
# by specifying --build-args CXX_FLAGS="blah blah"
ARG CXX_FLAGS="--std=c++11 -W -Wall -Woverloaded-virtual -Wno-unknown-pragmas -D_GLIBCXX_USE_CXX11_ABI=${CXX_ABI} -O3"
# Allow to overwrite the CPU optimisation default setting by specifying
# --build-arg CPU_OPTIMISATION="-march=native"
ARG CPU_OPTIMISATION="-march=haswell"
ENV CPU_OPTIMISATION=${CPU_OPTIMISATION}
# Combine CXX_FLAGS and CPU_OPTIMISATION
ENV CXX_FLAGS=${CXXFLAGS} ${CPU_OPTIMISATION}
#
# Base and runtime dependencies
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment