mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] gdbserver: add GDBSERVER_DISABLE_WERROR option
@ 2014-10-02 12:27 Alexander Dahl
  2014-10-14  9:14 ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2014-10-02 12:27 UTC (permalink / raw)
  To: ptxdist

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 <post@lespocky.de>
---
 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] gdbserver: add GDBSERVER_DISABLE_WERROR option
  2014-10-02 12:27 [ptxdist] [PATCH] gdbserver: add GDBSERVER_DISABLE_WERROR option Alexander Dahl
@ 2014-10-14  9:14 ` Michael Olbrich
  2014-10-29 11:43   ` [ptxdist] [PATCH] gdbserver: add --disable-werror Alexander Dahl
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Olbrich @ 2014-10-14  9:14 UTC (permalink / raw)
  To: ptxdist

On Thu, Oct 02, 2014 at 02:27:24PM +0200, Alexander Dahl wrote:
> 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.
> 

I think we should always set --disable-werror. No need for an option.

Michael

> Signed-off-by: Alexander Dahl <post@lespocky.de>
> ---
>  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
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ptxdist] [PATCH] gdbserver: add --disable-werror
  2014-10-14  9:14 ` Michael Olbrich
@ 2014-10-29 11:43   ` Alexander Dahl
  2014-11-13 16:53     ` Michael Olbrich
  0 siblings, 1 reply; 4+ messages in thread
From: Alexander Dahl @ 2014-10-29 11:43 UTC (permalink / raw)
  To: ptxdist

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 <post@lespocky.de>
---
 rules/gdbserver.make |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/rules/gdbserver.make b/rules/gdbserver.make
index 2eadd7d..2cdaf42 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) \
+	--disable-werror
 
 GDBSERVER_BUILD_OOT := YES
 GDBSERVER_SUBDIR := gdb/gdbserver
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ptxdist] [PATCH] gdbserver: add --disable-werror
  2014-10-29 11:43   ` [ptxdist] [PATCH] gdbserver: add --disable-werror Alexander Dahl
@ 2014-11-13 16:53     ` Michael Olbrich
  0 siblings, 0 replies; 4+ messages in thread
From: Michael Olbrich @ 2014-11-13 16:53 UTC (permalink / raw)
  To: ptxdist

On Wed, Oct 29, 2014 at 12:43:18PM +0100, Alexander Dahl wrote:
> 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 <post@lespocky.de>

Thanks, applied.

Michael

> ---
>  rules/gdbserver.make |    2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/rules/gdbserver.make b/rules/gdbserver.make
> index 2eadd7d..2cdaf42 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) \
> +	--disable-werror
>  
>  GDBSERVER_BUILD_OOT := YES
>  GDBSERVER_SUBDIR := gdb/gdbserver
> -- 
> 1.7.10.4
> 
> 
> -- 
> ptxdist mailing list
> ptxdist@pengutronix.de
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-11-13 16:53 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-10-02 12:27 [ptxdist] [PATCH] gdbserver: add GDBSERVER_DISABLE_WERROR option Alexander Dahl
2014-10-14  9:14 ` Michael Olbrich
2014-10-29 11:43   ` [ptxdist] [PATCH] gdbserver: add --disable-werror Alexander Dahl
2014-11-13 16:53     ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox