1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
|
Description: Fix ppc64* FTBFS of ghdl's gcc backend
On Power, ghdl fails to build from source with the following error :
/<<BUILDDIR>>/ghdl-0.35+git20180503+dfsg/builddir/gcc/gccbuild/gcc/ghdl -a --GHDL1=/<<BUILDDIR>>/ghdl-0.35+git20180503+dfsg/builddir/gcc/gccbuild/gcc/ghdl1 --std=87 --bootstrap --work=std ../../src/std/textio.v87
/<<BUILDDIR>>/ghdl-0.35+git20180503+dfsg/builddir/gcc/lib/ghdl/gcc/std/v87/../../src/std/textio.v87: In function 'std__textio__ELAB_SPEC':
/<<BUILDDIR>>/ghdl-0.35+git20180503+dfsg/builddir/gcc/lib/ghdl/gcc/std/v87/../../src/std/textio.v87:1:0: internal compiler error: in rs6000_output_function_epilogue, at config/rs6000/rs6000.c:31660
-- Std.Textio package declaration. This file is part of GHDL.
0x10a330ef rs6000_output_function_epilogue
../../src/gcc/config/rs6000/rs6000.c:31660
0x103723c7 final_end_function()
../../src/gcc/final.c:1919
0x10377777 rest_of_handle_final
../../src/gcc/final.c:4492
0x10377777 execute
../../src/gcc/final.c:4562
Please submit a full bug report,
with preprocessed source if appropriate.
Please include the complete backtrace with any bug report.
See <https://gcc.gnu.org/bugs/> for instructions.
/<<BUILDDIR>>/ghdl-0.35+git20180503+dfsg/builddir/gcc/gccbuild/gcc/ghdl: exec error
It seems that Power specific code rs6000.c has no knowledge of the language_string/lang_hooks.name
which is defined in ortho-lang-7.c:#define LANG_HOOKS_NAME "vhdl"
So adding vhdl in the language type searching. Not sure though if 0 is correct.
Author: Frédéric Bonnard <frediz@debian.org>
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
Index: tmp/src/gcc/config/rs6000/rs6000-logue.cc
===================================================================
--- tmp.orig/src/gcc/config/rs6000/rs6000-logue.cc 2022-11-30 03:49:09.890714462 +0100
+++ tmp/src/gcc/config/rs6000/rs6000-logue.cc 2022-11-30 03:49:09.886714437 +0100
@@ -5330,7 +5330,8 @@
|| ! strcmp (language_string, "GNU GIMPLE")
|| ! strcmp (language_string, "GNU Go")
|| ! strcmp (language_string, "GNU D")
- || ! strcmp (language_string, "libgccjit"))
+ || ! strcmp (language_string, "libgccjit")
+ || ! strcmp (language_string, "vhdl"))
i = 0;
else if (! strcmp (language_string, "GNU F77")
|| lang_GNU_Fortran ())
|