From bcd669946973d59ed6d786ed7e96890129e5fdb3 Mon Sep 17 00:00:00 2001 From: matoro <12038583+matoro@users.noreply.github.com> Date: Tue, 30 Jan 2024 12:07:36 -0500 Subject: [PATCH] Quote CPPFLAGS in webapp Makefile, add corresponding optipng fix for PPC (#26076) The optipng issue that the CPPFLAGS fix here was working around may have already been fixed in downstream packaging by overriding CPPFLAGS, so it should be appended to rather than replaced, this also respects any existing CPPFLAGS the user has configured. Also, an identical issue exists on PPC with its corresponding SIMD extensions (VSX), so add the same workaround there in the upstream Makefile. Co-authored-by: matoro --- webapp/Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/webapp/Makefile b/webapp/Makefile index 9c5928897d..da56ad1c1f 100644 --- a/webapp/Makefile +++ b/webapp/Makefile @@ -8,7 +8,12 @@ CI ?= false # please see optipng-bin Linux arm64 support issue (https://github.com/imagemin/optipng-bin/issues/118) for details: ifeq ($(shell uname)/$(shell uname -m),Linux/aarch64) LINUX_ARM64 = true - CPPFLAGS = "-DPNG_ARM_NEON_OPT=0" + CPPFLAGS += " -DPNG_ARM_NEON_OPT=0" +endif +# Exact same issue but for Linux/PPC64 +ifeq ($(findstring Linux/ppc64,$(shell uname)/$(shell uname -m)),Linux/ppc64) + LINUX_PPC64 = true + CPPFLAGS += " -DPNG_POWERPC_VSX_OPT=0" endif .PHONY: run @@ -68,7 +73,7 @@ node_modules: package.json $(wildcard package-lock.json) @echo Getting dependencies using npm ifeq ($(CI),false) - CPPFLAGS=$(CPPFLAGS) npm install + CPPFLAGS="$(CPPFLAGS)" npm install else # This runs in CI with NODE_ENV=production which skips devDependencies without this flag npm ci --include=dev