From ba7d322aafb1ea50b0c633a4d8eb696cfe9a0a8f Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Tue, 9 Jul 2013 09:57:15 +0200 Subject: [PATCH 1/2] plugins: try harder to compile alarm_speech on linux Using GNUStep. Modified from a debian patch of Janos Guljas. --- plugins/alarm_speech/uwsgiplugin.py | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/plugins/alarm_speech/uwsgiplugin.py b/plugins/alarm_speech/uwsgiplugin.py index fef16eb1..dead5faa 100644 --- a/plugins/alarm_speech/uwsgiplugin.py +++ b/plugins/alarm_speech/uwsgiplugin.py @@ -1,6 +1,15 @@ +import os + NAME='alarm_speech' -CFLAGS = [] +uwsgi_os = os.uname()[0] + LDFLAGS = [] -LIBS = ['-framework appkit'] +if uwsgi_os == "Darwin": + CFLAGS = [] + LIBS = ['-framework appkit'] +else: + CFLAGS = ['-I /usr/include/GNUstep'] + LIBS = [] + GCC_LIST = ['alarm_speech.m'] From 7c31b6657ffdbbbe566822fbcdb6cf2eb4b44026 Mon Sep 17 00:00:00 2001 From: Riccardo Magliocchetti Date: Tue, 9 Jul 2013 09:58:35 +0200 Subject: [PATCH 2/2] uwsgiconfig: force no-format-security too It may happen that a plugin is using -Wformat -Wformat-security so need to remove both otherwise as seen in emperor_pg plugin: cc1: error: -Wformat-security ignored without -Wformat [-Werror=format-security] Based on a debian patch of Janos Guljas. --- uwsgiconfig.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uwsgiconfig.py b/uwsgiconfig.py index 4bf2c525..2d334c08 100644 --- a/uwsgiconfig.py +++ b/uwsgiconfig.py @@ -585,7 +585,7 @@ class uConf(object): if gcc_major >= 4: self.cflags = self.cflags + [ '-Wextra', '-Wno-unused-parameter', '-Wno-missing-field-initializers' ] if (gcc_major == 4 and gcc_minor >= 8) or gcc_major > 4: - self.cflags.append('-Wno-format') + self.cflags.append('-Wno-format -Wno-format-security') self.ldflags = os.environ.get("LDFLAGS", "").split() self.libs = ['-lpthread', '-lm', '-rdynamic']