From 657ffee375f4751a760b28795c7064e89b882147 Mon Sep 17 00:00:00 2001 From: Giulio Benetti Date: Fri, 14 Jun 2019 11:43:28 +0200 Subject: [PATCH] package/brotli: properly pass TARGET_CFLAGS in Microblaze workaround In commit 39dde1ffb6a7111c2fa2b340c940e4d3e685aa29 ("package/brotli: work around gcc bug 68485"), a mistake was made: when BR2_TOOLCHAIN_HAS_GCC_BUG_68485=y, we're only passing -O0 as CFLAGS, completely ignoring TARGET_CFLAGS, which is not good. This commit fixes that by introducing a BROTLI_CFLAGS variable, initially defined to TARGET_CFLAGS, and to which we add -O0 when BR2_TOOLCHAIN_HAS_GCC_BUG_68485=y. Signed-off-by: Giulio Benetti [Thomas: rework commit log] Signed-off-by: Thomas Petazzoni --- package/brotli/brotli.mk | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/package/brotli/brotli.mk b/package/brotli/brotli.mk index 248bfb9daf..134f480895 100644 --- a/package/brotli/brotli.mk +++ b/package/brotli/brotli.mk @@ -14,8 +14,12 @@ BROTLI_CONF_OPTS = \ -DBROTLI_DISABLE_TESTS=ON \ -DBROTLI_BUNDLED_MODE=OFF +BROTLI_CFLAGS = $(TARGET_CFLAGS) + ifeq ($(BR2_TOOLCHAIN_HAS_GCC_BUG_68485),y) -BROTLI_CONF_OPTS += -DCMAKE_C_FLAGS="-O0" +BROTLI_CFLAGS += -O0 endif +BROTLI_CONF_OPTS += -DCMAKE_C_FLAGS="$(BROTLI_CFLAGS)" + $(eval $(cmake-package)) -- 2.30.2