From a23a72dc5298b97c9320a409b4e87b3e5113e8e3 Mon Sep 17 00:00:00 2001 From: David Gidwani Date: Mon, 27 Nov 2023 00:16:33 -0500 Subject: [PATCH] build: :package: set -march to core2 on musllinux_1_1 --- Dockerfile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3a33aa1..2b1faa1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -51,10 +51,11 @@ ARG pcre_version RUN mkdir -p build WORKDIR /tmp/hyperscan/build ENV CFLAGS="-fPIC" -ENV CXXFLAGS="$CFLAGS -D_GLIBCXX_USE_CXX11_ABI=0" -RUN cmake \ +RUN [[ "$POLICY" == 'musllinux_1_1' ]] && \ + export CFLAGS="$CFLAGS -march=core2"; \ + export CXXFLAGS="$CFLAGS -D_GLIBCXX_USE_CXX11_ABI=0"; \ + cmake \ -DCMAKE_INSTALL_PREFIX=/opt/hyperscan \ - -DFAT_RUNTIME=ON \ -DBUILD_STATIC_AND_SHARED=ON \ -DCMAKE_BUILD_TYPE=${build_type} \ -DCMAKE_C_FLAGS="${CFLAGS}" \