Commit d2a2aa5a authored by Frédéric Bonnard's avatar Frédéric Bonnard Committed by Jonathan McDowell

Fix FTBFS on ppc64* (Closes: #907170)

Tentatively patch gcc on Power for vhdl language.

[Jonathan McDowell: Changed build system to append to GCC's patches
 list]
parent 28d7ae69
......@@ -7,6 +7,9 @@ ghdl (0.35+git20181129+dfsg-3) UNRELEASED; urgency=medium
* Set Rules-Requires-Root to no
* Remove debian/source/options - xz is now the default
[ Frédéric Bonnard ]
* Fix FTBFS on ppc64* (Closes: #907170)
-- Jonathan McDowell <noodles@earth.li> Fri, 14 Dec 2018 08:29:24 +0000
ghdl (0.35+git20181129+dfsg-2) unstable; urgency=medium
......
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: ghdl-0.35+git20180503+dfsg/builddir/gcc/debian/rules.patch
===================================================================
--- ghdl-0.35+git20180503+dfsg.orig/builddir/gcc/debian/rules.patch 2018-08-22 16:46:49.986911838 +0000
+++ ghdl-0.35+git20180503+dfsg/builddir/gcc/debian/rules.patch 2018-08-22 16:46:49.982911740 +0000
@@ -326,6 +326,8 @@
# Has to be refreshed manually as described in the header.
debian_patches += ada-changes-in-autogen-output
+debian_patches += ghdl_ppc64
+
series_stamp = $(stampdir)/02-series-stamp
series: $(series_stamp)
$(series_stamp):
Index: ghdl-0.35+git20180503+dfsg/builddir/gcc/debian/patches/ghdl_ppc64.diff
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ ghdl-0.35+git20180503+dfsg/builddir/gcc/debian/patches/ghdl_ppc64.diff 2018-08-22 16:48:52.969923543 +0000
@@ -0,0 +1,14 @@
+Index: gcc/src/gcc/config/rs6000/rs6000.c
+===================================================================
+--- gcc.orig/src/gcc/config/rs6000/rs6000.c 2018-08-22 16:47:50.200386379 +0000
++++ gcc/src/gcc/config/rs6000/rs6000.c 2018-08-22 16:48:49.045827445 +0000
+@@ -31640,7 +31640,8 @@
+ || ! strcmp (language_string, "GNU GIMPLE")
+ || ! strcmp (language_string, "GNU Go")
+ || ! strcmp (language_string, "libgccjit")
+- || ! strcmp (language_string, "GNU D"))
++ || ! strcmp (language_string, "GNU D")
++ || ! strcmp (language_string, "vhdl"))
+ i = 0;
+ else if (! strcmp (language_string, "GNU F77")
+ || lang_GNU_Fortran ())
fix_ghdl_ppc64.diff -p3
......@@ -83,7 +83,8 @@ override_dh_auto_configure:
ln -sf ${GCC_DIR}/$(GCC_TARBALL) $(GCC_TARBALL); \
cp -a ${GCC_DIR}/debian/ .; \
if [ -n "$$(grep -v '^\#' ${CURDIR}/debian/patches/gcc-${GCC_VER}/series)" ]; then \
QUILT_PATCHES=${CURDIR}/debian/patches/gcc-${GCC_VER} quilt push --quiltrc /dev/null -a; \
cp -n ${CURDIR}/debian/patches/gcc-${GCC_VER}/*.diff debian/patches/ ; \
cat ${CURDIR}/debian/patches/gcc-${GCC_VER}/series >> debian/patches/series ; \
fi; \
debian/rules patch; \
../../configure --srcdir=../.. --prefix=/usr \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment