From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mout.kundenserver.de ([212.227.126.187]) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1XZfUF-0000e6-Fk for ptxdist@pengutronix.de; Thu, 02 Oct 2014 14:27:59 +0200 From: Alexander Dahl Date: Thu, 2 Oct 2014 14:27:24 +0200 Message-Id: <1412252844-3757-1-git-send-email-post@lespocky.de> Subject: [ptxdist] [PATCH] gdbserver: add GDBSERVER_DISABLE_WERROR option Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de If you activate -Wcast-align globally (which is useful if you build for older ARM architectures) gdbserver can not compile, because it throws almost 50 of those warnings and has -Werror set. Would be better to fix gdb, but as a quick and dirty workaround we can disable it like this. Signed-off-by: Alexander Dahl --- rules/gdbserver.in | 9 ++++++++- rules/gdbserver.make | 2 ++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/rules/gdbserver.in b/rules/gdbserver.in index 43d059d..039ab41 100644 --- a/rules/gdbserver.in +++ b/rules/gdbserver.in @@ -18,5 +18,12 @@ config GDBSERVER_SHARED If not set, the build option LDFLAGS=-static will be activated. -endif +config GDBSERVER_DISABLE_WERROR + bool "disable -Werror" + help + gdb configure says "enable -Werror in bootstrap stage2 and later" + about --enable-werror which is default. you may disable this if + you have problems with some warning types like -Wcast-align but + it's not recommended! +endif diff --git a/rules/gdbserver.make b/rules/gdbserver.make index 2eadd7d..792a3f1 100644 --- a/rules/gdbserver.make +++ b/rules/gdbserver.make @@ -43,6 +43,8 @@ GDBSERVER_ENV += LDFLAGS=-static endif GDBSERVER_CONF_TOOL := autoconf +GDBSERVER_CONF_OPT := $(CROSS_AUTOCONF_USR) \ + --$(call ptx/disen,PTXCONF_GDBSERVER_DISABLE_WERROR)-werror GDBSERVER_BUILD_OOT := YES GDBSERVER_SUBDIR := gdb/gdbserver -- 1.7.10.4 -- ptxdist mailing list ptxdist@pengutronix.de