All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/memcached: disable -Werror
@ 2022-08-28  7:14 Fabrice Fontaine
  2022-08-28  9:41 ` Yann E. MORIN
  0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2022-08-28  7:14 UTC (permalink / raw)
  To: buildroot; +Cc: Fabrice Fontaine

Disable -Werror to avoid the following build failure:

In file included from hash.c:7:
xxhash.h:2667:5: error: #warning is a GCC extension [-Werror]
 2667 | #   warning "XXH3 is highly inefficient without ARM or Thumb-2."
      |     ^~~~~~~
xxhash.h:2667:5: error: #warning "XXH3 is highly inefficient without ARM or Thumb-2." [-Werror=cpp]

Fixes:
 - http://autobuild.buildroot.org/results/3124bae73c207f1a118e57e41e222ef464ccb297

Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
 ...0003-configure.ac-add-disable-werror.patch | 65 +++++++++++++++++++
 package/memcached/memcached.mk                |  2 +-
 2 files changed, 66 insertions(+), 1 deletion(-)
 create mode 100644 package/memcached/0003-configure.ac-add-disable-werror.patch

diff --git a/package/memcached/0003-configure.ac-add-disable-werror.patch b/package/memcached/0003-configure.ac-add-disable-werror.patch
new file mode 100644
index 0000000000..dab9b8835d
--- /dev/null
+++ b/package/memcached/0003-configure.ac-add-disable-werror.patch
@@ -0,0 +1,65 @@
+From 8497f7ed38146378a988bc22800b3a5eba38b0fd Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+Date: Mon, 13 Jun 2022 16:29:38 +0200
+Subject: [PATCH] configure.ac: add --disable-werror
+
+Allow the user to disable -Werror to avoid the following build failure:
+
+In file included from hash.c:7:
+xxhash.h:2667:5: error: #warning is a GCC extension [-Werror]
+ 2667 | #   warning "XXH3 is highly inefficient without ARM or Thumb-2."
+      |     ^~~~~~~
+xxhash.h:2667:5: error: #warning "XXH3 is highly inefficient without ARM or Thumb-2." [-Werror=cpp]
+
+Fixes:
+ - http://autobuild.buildroot.org/results/3124bae73c207f1a118e57e41e222ef464ccb297
+
+Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/memcached/memcached/pull/926]
+---
+ configure.ac | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 3337fe7..7683b8f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -114,6 +114,9 @@ AC_ARG_ENABLE(static,
+ AC_ARG_ENABLE(unix_socket,
+   [AS_HELP_STRING([--disable-unix-socket], [Disable unix domain socket])])
+ 
++AC_ARG_ENABLE(werror,
++  [AS_HELP_STRING([--disable-werror], [Disable -Werror])])
++
+ dnl **********************************************************************
+ dnl DETECT_SASL_CB_GETCONF
+ dnl
+@@ -783,6 +786,10 @@ AM_CONDITIONAL([BUILD_SPECIFICATIONS],
+                [test "x$enable_docs" != "xno" -a "x$XML2RFC" != "xno" -a "x$XSLTPROC" != "xno"])
+ 
+ 
++if test "x$enable_werror" != "xno"; then
++   CFLAGS="$CFLAGS -Werror"
++fi
++
+ dnl Let the compiler be a bit more picky. Please note that you cannot
+ dnl specify these flags to the compiler before AC_CHECK_FUNCS, because
+ dnl the test program will generate a compilation warning and hence fail
+@@ -790,12 +797,12 @@ dnl to detect the function ;-)
+ if test "$ICC" = "yes"
+ then
+    dnl ICC trying to be gcc.
+-   CFLAGS="$CFLAGS -diag-disable 187 -Wall -Werror"
++   CFLAGS="$CFLAGS -diag-disable 187 -Wall"
+    AC_DEFINE([_GNU_SOURCE],[1],[make sure IOV_MAX is defined])
+ elif test "$GCC" = "yes"
+ then
+   GCC_VERSION=`$CC -dumpversion`
+-  CFLAGS="$CFLAGS -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls"
++  CFLAGS="$CFLAGS -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls"
+   if test "x$enable_asan" = "xyes"; then
+     CFLAGS="$CFLAGS -fsanitize=address"
+   fi
+-- 
+2.35.1
+
diff --git a/package/memcached/memcached.mk b/package/memcached/memcached.mk
index 5249195c2e..bddb713458 100644
--- a/package/memcached/memcached.mk
+++ b/package/memcached/memcached.mk
@@ -8,7 +8,7 @@ MEMCACHED_VERSION = 1.6.16
 MEMCACHED_SITE = http://www.memcached.org/files
 MEMCACHED_DEPENDENCIES = libevent
 MEMCACHED_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
-MEMCACHED_CONF_OPTS = --disable-coverage
+MEMCACHED_CONF_OPTS = --disable-coverage --disable-werror
 MEMCACHED_LICENSE = BSD-3-Clause
 MEMCACHED_LICENSE_FILES = COPYING
 MEMCACHED_CPE_ID_VENDOR = memcached
-- 
2.35.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

* Re: [Buildroot] [PATCH 1/1] package/memcached: disable -Werror
  2022-08-28  7:14 [Buildroot] [PATCH 1/1] package/memcached: disable -Werror Fabrice Fontaine
@ 2022-08-28  9:41 ` Yann E. MORIN
  0 siblings, 0 replies; 2+ messages in thread
From: Yann E. MORIN @ 2022-08-28  9:41 UTC (permalink / raw)
  To: Fabrice Fontaine; +Cc: buildroot

Fabrice, all,

On 2022-08-28 09:14 +0200, Fabrice Fontaine spake thusly:
> Disable -Werror to avoid the following build failure:
> 
> In file included from hash.c:7:
> xxhash.h:2667:5: error: #warning is a GCC extension [-Werror]
>  2667 | #   warning "XXH3 is highly inefficient without ARM or Thumb-2."
>       |     ^~~~~~~
> xxhash.h:2667:5: error: #warning "XXH3 is highly inefficient without ARM or Thumb-2." [-Werror=cpp]
> 
> Fixes:
>  - http://autobuild.buildroot.org/results/3124bae73c207f1a118e57e41e222ef464ccb297
> 
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>

Upstream is not too keen on disabling Werror, but that's still the best
solution we have.

Applied to master, thanks.

Regards,
Yann E. MORIN.

> ---
>  ...0003-configure.ac-add-disable-werror.patch | 65 +++++++++++++++++++
>  package/memcached/memcached.mk                |  2 +-
>  2 files changed, 66 insertions(+), 1 deletion(-)
>  create mode 100644 package/memcached/0003-configure.ac-add-disable-werror.patch
> 
> diff --git a/package/memcached/0003-configure.ac-add-disable-werror.patch b/package/memcached/0003-configure.ac-add-disable-werror.patch
> new file mode 100644
> index 0000000000..dab9b8835d
> --- /dev/null
> +++ b/package/memcached/0003-configure.ac-add-disable-werror.patch
> @@ -0,0 +1,65 @@
> +From 8497f7ed38146378a988bc22800b3a5eba38b0fd Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +Date: Mon, 13 Jun 2022 16:29:38 +0200
> +Subject: [PATCH] configure.ac: add --disable-werror
> +
> +Allow the user to disable -Werror to avoid the following build failure:
> +
> +In file included from hash.c:7:
> +xxhash.h:2667:5: error: #warning is a GCC extension [-Werror]
> + 2667 | #   warning "XXH3 is highly inefficient without ARM or Thumb-2."
> +      |     ^~~~~~~
> +xxhash.h:2667:5: error: #warning "XXH3 is highly inefficient without ARM or Thumb-2." [-Werror=cpp]
> +
> +Fixes:
> + - http://autobuild.buildroot.org/results/3124bae73c207f1a118e57e41e222ef464ccb297
> +
> +Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +[Upstream status: https://github.com/memcached/memcached/pull/926]
> +---
> + configure.ac | 11 +++++++++--
> + 1 file changed, 9 insertions(+), 2 deletions(-)
> +
> +diff --git a/configure.ac b/configure.ac
> +index 3337fe7..7683b8f 100644
> +--- a/configure.ac
> ++++ b/configure.ac
> +@@ -114,6 +114,9 @@ AC_ARG_ENABLE(static,
> + AC_ARG_ENABLE(unix_socket,
> +   [AS_HELP_STRING([--disable-unix-socket], [Disable unix domain socket])])
> + 
> ++AC_ARG_ENABLE(werror,
> ++  [AS_HELP_STRING([--disable-werror], [Disable -Werror])])
> ++
> + dnl **********************************************************************
> + dnl DETECT_SASL_CB_GETCONF
> + dnl
> +@@ -783,6 +786,10 @@ AM_CONDITIONAL([BUILD_SPECIFICATIONS],
> +                [test "x$enable_docs" != "xno" -a "x$XML2RFC" != "xno" -a "x$XSLTPROC" != "xno"])
> + 
> + 
> ++if test "x$enable_werror" != "xno"; then
> ++   CFLAGS="$CFLAGS -Werror"
> ++fi
> ++
> + dnl Let the compiler be a bit more picky. Please note that you cannot
> + dnl specify these flags to the compiler before AC_CHECK_FUNCS, because
> + dnl the test program will generate a compilation warning and hence fail
> +@@ -790,12 +797,12 @@ dnl to detect the function ;-)
> + if test "$ICC" = "yes"
> + then
> +    dnl ICC trying to be gcc.
> +-   CFLAGS="$CFLAGS -diag-disable 187 -Wall -Werror"
> ++   CFLAGS="$CFLAGS -diag-disable 187 -Wall"
> +    AC_DEFINE([_GNU_SOURCE],[1],[make sure IOV_MAX is defined])
> + elif test "$GCC" = "yes"
> + then
> +   GCC_VERSION=`$CC -dumpversion`
> +-  CFLAGS="$CFLAGS -Wall -Werror -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls"
> ++  CFLAGS="$CFLAGS -Wall -pedantic -Wmissing-prototypes -Wmissing-declarations -Wredundant-decls"
> +   if test "x$enable_asan" = "xyes"; then
> +     CFLAGS="$CFLAGS -fsanitize=address"
> +   fi
> +-- 
> +2.35.1
> +
> diff --git a/package/memcached/memcached.mk b/package/memcached/memcached.mk
> index 5249195c2e..bddb713458 100644
> --- a/package/memcached/memcached.mk
> +++ b/package/memcached/memcached.mk
> @@ -8,7 +8,7 @@ MEMCACHED_VERSION = 1.6.16
>  MEMCACHED_SITE = http://www.memcached.org/files
>  MEMCACHED_DEPENDENCIES = libevent
>  MEMCACHED_CONF_ENV = ac_cv_prog_cc_c99='-std=gnu99'
> -MEMCACHED_CONF_OPTS = --disable-coverage
> +MEMCACHED_CONF_OPTS = --disable-coverage --disable-werror
>  MEMCACHED_LICENSE = BSD-3-Clause
>  MEMCACHED_LICENSE_FILES = COPYING
>  MEMCACHED_CPE_ID_VENDOR = memcached
> -- 
> 2.35.1
> 
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 561 099 427 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

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

end of thread, other threads:[~2022-08-28  9:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-08-28  7:14 [Buildroot] [PATCH 1/1] package/memcached: disable -Werror Fabrice Fontaine
2022-08-28  9:41 ` Yann E. MORIN

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.