summaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/wireshark/files/0002-flex-Remove-line-directives.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-networking/recipes-support/wireshark/files/0002-flex-Remove-line-directives.patch')
-rw-r--r--meta-networking/recipes-support/wireshark/files/0002-flex-Remove-line-directives.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-networking/recipes-support/wireshark/files/0002-flex-Remove-line-directives.patch b/meta-networking/recipes-support/wireshark/files/0002-flex-Remove-line-directives.patch
new file mode 100644
index 0000000000..069b5793d9
--- /dev/null
+++ b/meta-networking/recipes-support/wireshark/files/0002-flex-Remove-line-directives.patch
@@ -0,0 +1,46 @@
1From 3e571e24c730f747d18ed02ba7451e9e00480fc7 Mon Sep 17 00:00:00 2001
2From: Oleksiy Obitotskyy <oobitots@cisco.com>
3Date: Thu, 26 Nov 2020 12:00:43 -0800
4Subject: [PATCH] flex: Remove #line directives
5
6Append --noline option to flex to not
7generate #line directives with absolute file patch.
8
9Upstream-Status: Pending
10Signed-off-by: Oleksiy Obitotskyy <oobitots@cisco.com>
11---
12 cmake/modules/FindLEX.cmake | 18 +++++++++++++-----
13 1 file changed, 13 insertions(+), 5 deletions(-)
14
15diff --git a/cmake/modules/FindLEX.cmake b/cmake/modules/FindLEX.cmake
16index 0008bc4..ec68f84 100644
17--- a/cmake/modules/FindLEX.cmake
18+++ b/cmake/modules/FindLEX.cmake
19@@ -32,11 +32,19 @@ MACRO(ADD_LEX_FILES _source _generated)
20 SET(_outc ${CMAKE_CURRENT_BINARY_DIR}/${_basename}.c)
21 SET(_outh ${CMAKE_CURRENT_BINARY_DIR}/${_basename}_lex.h)
22
23- ADD_CUSTOM_COMMAND(
24- OUTPUT ${_outc} ${_outh}
25- COMMAND ${LEX_EXECUTABLE} -o${_outc} --header-file=${_outh} ${_in}
26- DEPENDS ${_in}
27- )
28+ IF (DEFINED ENV{SOURCE_DATE_EPOCH})
29+ ADD_CUSTOM_COMMAND(
30+ OUTPUT ${_outc} ${_outh}
31+ COMMAND ${LEX_EXECUTABLE} --noline -o${_outc} --header-file=${_outh} ${_in}
32+ DEPENDS ${_in}
33+ )
34+ ELSE ()
35+ ADD_CUSTOM_COMMAND(
36+ OUTPUT ${_outc} ${_outh}
37+ COMMAND ${LEX_EXECUTABLE} -o${_outc} --header-file=${_outh} ${_in}
38+ DEPENDS ${_in}
39+ )
40+ ENDIF ()
41 LIST(APPEND ${_source} ${_in})
42 LIST(APPEND ${_generated} ${_outc})
43 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
44--
452.26.2.Cisco
46