mirror of
https://gitlab.com/buildroot.org/buildroot.git
synced 2026-09-19 16:40:46 -09:00
With bootgen xilinx_v2025.1, the local FlexLexer.h file is not in the same
directory as the cpp files including it, so the previous patch used to solve
the issue below needs to be updated to find the local FlexLexer.h which is in
the win_include directory of bootgen version xilinx_v2025.1.
See upstream commit [1].
So this patch corrects the path for including the local FlexLexer.h header for
fixing the below issue.
Bootgen embeds an old version of flex, but uses the system include syntax
(#include <>) to reference it, causing conflicts on systems with the
development headers for a modern flex version installed, leading to build
issues like:
../bisonflex/bif.yy.cpp: In member function 'virtual int BIF::FlexScanner::yylex()':
../bisonflex/bif.yy.cpp:1608:18: error: no match for 'operator=' (operand types are 'std::istream' {aka 'std::basic_istream'} and 'std::istream*' {aka 'std::basic_istream*'})
This build failure can also happen if the host-flex Buildroot package
is built before host-bootgen.
The failure can be reproduced, in the Buildroot docker reference image
with the commands:
utils/docker-run
make versal_vck190_defconfig
make host-flex host-bootgen
Fix it by using normal local #include statements by:
sed -i 's/<FlexLexer.h>/"../win_include/FlexLexer.h"/g' *
Fixes: https://autobuild.buildroot.org/results/60220f94cca1bcca5667afcb2acffb5aacae048b
[1] 86b862096b (diff-0d754a86508dc8a894b72796966f332c0316942c5d5ab42ae6a0766dcfcb52dc)
Signed-off-by: Neal Frager <neal.frager@amd.com>
[Julien: add extra info in commit log]
Signed-off-by: Julien Olivain <ju.o@free.fr>
73 lines
2.4 KiB
Diff
73 lines
2.4 KiB
Diff
From e7e341b7ba6fa9fb875718e8740b03c2041278e8 Mon Sep 17 00:00:00 2001
|
|
From: Neal Frager <neal.frager@amd.com>
|
|
Date: Mon, 2 Jun 2025 12:09:13 +0100
|
|
Subject: [PATCH] bisonflex: Fix build on machines with modern flex
|
|
|
|
With bootgen 2025.1, the directory structure was re-done. In the process of
|
|
doing this, the source files in the bisonflex directory lost the fix below
|
|
which had been applied on an earlier version of bootgen:
|
|
|
|
Bootgen embeds an old version of flex, but uses the system include syntax
|
|
(#include <>) to reference it, causing conflicts on systems with the
|
|
development headers for a modern flex version installed, leading to build
|
|
issues like:
|
|
|
|
../bisonflex/bif.yy.cpp: In member function 'virtual int BIF::FlexScanner::yylex()':
|
|
../bisonflex/bif.yy.cpp:1608:18: error: no match for 'operator=' (operand types are 'std::istream' {aka 'std::basic_istream'} and 'std::istream*' {aka 'std::basic_istream*'})
|
|
|
|
Fix it by using normal local #include statements by:
|
|
|
|
sed -i 's/<FlexLexer.h>/"../win_include/FlexLexer.h"/g' *
|
|
|
|
Upstream: submitted to AMD internal jira process
|
|
|
|
Signed-off-by: Neal Frager <neal.frager@amd.com>
|
|
---
|
|
bisonflex/bif.yy.cpp | 2 +-
|
|
bisonflex/cmdoptions.yy.cpp | 2 +-
|
|
bisonflex/reginit.yy.cpp | 2 +-
|
|
3 files changed, 3 insertions(+), 3 deletions(-)
|
|
|
|
diff --git a/bisonflex/bif.yy.cpp b/bisonflex/bif.yy.cpp
|
|
index 8d4d364..35f0aa5 100755
|
|
--- a/bisonflex/bif.yy.cpp
|
|
+++ b/bisonflex/bif.yy.cpp
|
|
@@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR;
|
|
|
|
#define yytext_ptr yytext
|
|
|
|
-#include <FlexLexer.h>
|
|
+#include "../win_include/FlexLexer.h"
|
|
|
|
int yyFlexLexer::yywrap() { return 1; }
|
|
int yyFlexLexer::yylex()
|
|
diff --git a/bisonflex/cmdoptions.yy.cpp b/bisonflex/cmdoptions.yy.cpp
|
|
index 661d7f3..a76ac81 100755
|
|
--- a/bisonflex/cmdoptions.yy.cpp
|
|
+++ b/bisonflex/cmdoptions.yy.cpp
|
|
@@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR;
|
|
|
|
#define yytext_ptr yytext
|
|
|
|
-#include <FlexLexer.h>
|
|
+#include "../win_include/FlexLexer.h"
|
|
|
|
int yyFlexLexer::yywrap() { return 1; }
|
|
int yyFlexLexer::yylex()
|
|
diff --git a/bisonflex/reginit.yy.cpp b/bisonflex/reginit.yy.cpp
|
|
index d830734..dede473 100755
|
|
--- a/bisonflex/reginit.yy.cpp
|
|
+++ b/bisonflex/reginit.yy.cpp
|
|
@@ -379,7 +379,7 @@ typedef unsigned char YY_CHAR;
|
|
|
|
#define yytext_ptr yytext
|
|
|
|
-#include <FlexLexer.h>
|
|
+#include "../win_include/FlexLexer.h"
|
|
|
|
int yyFlexLexer::yywrap() { return 1; }
|
|
int yyFlexLexer::yylex()
|
|
--
|
|
2.25.1
|
|
|