From 9fdae371f7a15f6345705ee9fba84be06d6b9ae8 Mon Sep 17 00:00:00 2001 From: Julian Waller Date: Wed, 17 Jul 2019 18:43:58 +0100 Subject: [PATCH] hack: nosse42 --- HACK.md | 10 ++++++++++ images/nginx/rootfs/build.sh | 3 ++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 HACK.md diff --git a/HACK.md b/HACK.md new file mode 100644 index 0000000000..c07b960d1d --- /dev/null +++ b/HACK.md @@ -0,0 +1,10 @@ +1. `cd images/nginx` +1. Modify the `CC_OPTS` for the x86_64 arch to `CC_OPT+=' -m64 -mtune=core2'` +1. Add `--with-luajit-xcflags='-mno-sse4.2' \` to the `WITH_FLAGS` variable +1. `REGISTRY=julusian/nginx-ingress TAG=base-amd64 make container` +1. `docker tag julusian/nginx-ingress/nginx:base-amd64 julusian/nginx-ingress:base-amd64` +1. `docker push julusian/nginx-ingress:base-amd64` +1. `cd ../..` +1. `BASEIMAGE=julusian/nginx-ingress:base-amd64 ARCH=amd64 TAG=v0.25.0-nosse42 REGISTRY=julusian/nginx-ingress make build container` +1. `docker tag julusian/nginx-ingress/nginx-ingress-controller-amd64:v0.25.0-nosse42 julusian/nginx-ingress:v0.25.0-nosse42` +1. `docker push julusian/nginx-ingress:v0.25.0-nosse42` diff --git a/images/nginx/rootfs/build.sh b/images/nginx/rootfs/build.sh index cbda0c18fa..06f8958c58 100755 --- a/images/nginx/rootfs/build.sh +++ b/images/nginx/rootfs/build.sh @@ -397,6 +397,7 @@ WITH_FLAGS="--with-debug \ --with-http_gunzip_module \ --with-md5-asm \ --with-sha1-asm \ + --with-luajit-xcflags='-mno-sse4.2' \ -j${CORES} " # "Combining -flto with -g is currently experimental and expected to produce unexpected results." @@ -424,7 +425,7 @@ if [[ ${ARCH} != "aarch64" ]]; then fi if [[ ${ARCH} == "x86_64" ]]; then - CC_OPT+=' -m64 -mtune=native' + CC_OPT+=' -m64 -mtune=core2' fi WITH_MODULES="--add-module=$BUILD_PATH/nginx-http-auth-digest-$NGINX_DIGEST_AUTH \