![Joris Lijssens](/assets/img/avatar_default.png)
Signed-off-by: Joris Lijssens <joris.lijssens@gmail.com> [Thomas: - Adjust license: it is "GPLv2+ or BSD-2c" and not "GPLv2, BSD-2c" - Add the COPYING file to the license files, since it indicates explictly that the license is GPLv2+ or BSD-2c. - Remove the --with-shared configure options, which doesn't exist. - Use LIBCOAP_AUTORECONF = YES instead of calling the autogen.sh script manually. - Add patch to fix build with old gcc versions.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
39 lines
1.2 KiB
Diff
39 lines
1.2 KiB
Diff
From d5914ecbb0285aea1eb2b9432d6e91155877fd95 Mon Sep 17 00:00:00 2001
|
|
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
Date: Thu, 9 Jun 2016 21:53:59 +0200
|
|
Subject: [PATCH] configure: only add -Wunused-result if supported by the
|
|
compiler
|
|
|
|
Old gcc versions such as 4.3.x do not support -Wunused-result, so
|
|
instead of unconditionally using this warning, only use it if supported
|
|
by the compiler.
|
|
|
|
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
|
|
---
|
|
Submitted upstream: https://github.com/obgm/libcoap/pull/32
|
|
|
|
configure.ac | 2 +-
|
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
|
diff --git a/configure.ac b/configure.ac
|
|
index f4452ac..6354fcf 100644
|
|
--- a/configure.ac
|
|
+++ b/configure.ac
|
|
@@ -110,12 +110,12 @@ WARNING_CFLAGS="\
|
|
-Wswitch-default \
|
|
-Wswitch-enum \
|
|
-Wunused \
|
|
--Wunused-result \
|
|
"
|
|
|
|
# check whether or not the compiler supports -Wlogical-op (clang does not...)
|
|
AX_CHECK_COMPILE_FLAG([-Wlogical-op], [WARNING_CFLAGS="$WARNING_CFLAGS -Wlogical-op"],,[-Werror])
|
|
AX_CHECK_COMPILE_FLAG([-fdiagnostics-color], [CFLAGS="$CFLAGS -fdiagnostics-color"],,[-Werror])
|
|
+AX_CHECK_COMPILE_FLAG([-Wunused-result], [WARNING_CFLAGS="$WARNING_CFLAGS -Wunused-result"])
|
|
|
|
AC_SUBST([WARNING_CFLAGS])
|
|
|
|
--
|
|
2.7.4
|
|
|