[PATCH BlueZ 2/2] build-sys: Don't use -Werror for generated lexer.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Source files that are generated by tools can't be compiled with -Werror
because we can't really fix the issue in version of the tools that was
already release and is used by distributions.

After updating to flex 2.5.36 the following error occurs:

	tools/lexer.c:1599:17: error: comparison between signed and
	unsigned integer expressions [-Werror=sign-compare]

Override -Werror with -Wno-error for this specific file so warning is
still emitted but we no longer fail the build.
---
 Makefile.tools | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/Makefile.tools b/Makefile.tools
index 5579b86..1499bf7 100644
--- a/Makefile.tools
+++ b/Makefile.tools
@@ -14,11 +14,15 @@ noinst_PROGRAMS += tools/avinfo tools/ppporc \
 
 tools/kword.c: tools/parser.h
 
-tools_rfcomm_SOURCES = tools/rfcomm.c tools/parser.y tools/lexer.l \
-					tools/kword.h tools/kword.c
+noinst_LTLIBRARIES += tools/librfcomm-lexer.la
+tools_librfcomm_lexer_la_SOURCES = tools/lexer.l
+tools_librfcomm_lexer_la_CFLAGS = $(AM_CFLAGS) -Wno-error
+
+tools_rfcomm_SOURCES = tools/rfcomm.c tools/parser.y tools/kword.h \
+							tools/kword.c
 EXTRA_tools_rfcomm_SOURCES = tools/parser.h tools/parser.c \
 							tools/lexer.c
-tools_rfcomm_LDADD = lib/libbluetooth-private.la
+tools_rfcomm_LDADD = lib/libbluetooth-private.la tools/librfcomm-lexer.la
 
 tools_l2ping_LDADD = lib/libbluetooth-private.la
 
-- 
1.7.11.3

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux