gdb/version.in is generated with hard coding in gdb.spec:
cat > gdb/version.in << _FOO
openEuler %{version}-%{release}
_FOO
fix it by using rpm maroc %{_vendor}
Signed-off-by: 刘文宇 <liuwenyu7@huawei.com>
(cherry picked from commit 8bdd9fb9d1eaec620b50560fdf969f7058485aab)
There is build error if build env upgrade from 2109 to 2203.
../../gdb/c-exp.y:3320:1: error: 'void c_print_token(FILE*, int, YYSTYPE)' defined but not used [-Werror=unused-function]
The root cause is bison version changed from 3.7.4 to 3.8.2
Meanwhile, bison 3.8.x removed removed YYPRINT support, so there
will be trigger this function is unused.
Solution:
Backport upstream patch to check bison version which means
function only work bison < 3.8
After this change, both aarch64 and x86 build successfully.
Change-Id: Ib80d828fcca8e1eb8e085f36fc5a9a197259e35f
Signed-off-by: Chenxi Mao <chenxi.mao@suse.com>