gnu: doxygen: Work around GCC ICE on armhf-linux.
Reported by Mark H Weaver <mhw@netris.org> at <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=31708#10>. * gnu/packages/patches/doxygen-gcc-ice.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/documentation.scm (doxygen)[inputs]: Add "gcc-ice-patch" on armhf-* only. [arguments]: Add 'apply-gcc-patch' phase on armhf-* only.
This commit is contained in:
parent
9953685c09
commit
849a1399ca
|
@ -634,6 +634,7 @@ dist_patch_DATA = \
|
||||||
%D%/packages/patches/docbook-xsl-nonrecursive-string-subst.patch \
|
%D%/packages/patches/docbook-xsl-nonrecursive-string-subst.patch \
|
||||||
%D%/packages/patches/doc++-include-directives.patch \
|
%D%/packages/patches/doc++-include-directives.patch \
|
||||||
%D%/packages/patches/doc++-segfault-fix.patch \
|
%D%/packages/patches/doc++-segfault-fix.patch \
|
||||||
|
%D%/packages/patches/doxygen-gcc-ice.patch \
|
||||||
%D%/packages/patches/doxygen-test.patch \
|
%D%/packages/patches/doxygen-test.patch \
|
||||||
%D%/packages/patches/dvd+rw-tools-add-include.patch \
|
%D%/packages/patches/dvd+rw-tools-add-include.patch \
|
||||||
%D%/packages/patches/e2fsprogs-glibc-2.27.patch \
|
%D%/packages/patches/e2fsprogs-glibc-2.27.patch \
|
||||||
|
|
|
@ -139,10 +139,23 @@ markup) can be customized and extended by the user.")
|
||||||
("libxml2" ,libxml2) ; provides xmllint for the tests
|
("libxml2" ,libxml2) ; provides xmllint for the tests
|
||||||
("python" ,python-2))) ; for creating the documentation
|
("python" ,python-2))) ; for creating the documentation
|
||||||
(inputs
|
(inputs
|
||||||
`(("bash" ,bash-minimal)))
|
`(("bash" ,bash-minimal)
|
||||||
|
,@(if (string-prefix? "armhf-" (%current-system))
|
||||||
|
`(("gcc-ice-patch" ,@(search-patches "doxygen-gcc-ice.patch")))
|
||||||
|
'())))
|
||||||
(arguments
|
(arguments
|
||||||
`(#:test-target "tests"
|
`(#:test-target "tests"
|
||||||
#:phases (modify-phases %standard-phases
|
#:phases (modify-phases %standard-phases
|
||||||
|
;; Work around an ICE that shows up on native compiles for
|
||||||
|
;; armhf-linux.
|
||||||
|
,@(if (string-prefix? "armhf-" (%current-system))
|
||||||
|
`((add-after 'unpack 'apply-gcc-patch
|
||||||
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
|
(let ((patch (assoc-ref inputs "gcc-ice-patch")))
|
||||||
|
(invoke "patch" "-p1" "--force"
|
||||||
|
"--input" patch)))))
|
||||||
|
'())
|
||||||
|
|
||||||
(add-before 'configure 'patch-sh
|
(add-before 'configure 'patch-sh
|
||||||
(lambda* (#:key inputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(substitute* "src/portable.cpp"
|
(substitute* "src/portable.cpp"
|
||||||
|
|
|
@ -0,0 +1,25 @@
|
||||||
|
Work around this GCC ICE: <https://bugs.gnu.org/31708>. It shows up
|
||||||
|
only when doing native compiles on armhf-linux.
|
||||||
|
|
||||||
|
Yes it's a terrible patch, but it does the job.
|
||||||
|
|
||||||
|
--- doxygen-1.8.13/qtools/qutfcodec.cpp 1970-01-01 01:00:00.000000000 +0100
|
||||||
|
+++ doxygen-1.8.13/qtools/qutfcodec.cpp 2018-06-08 14:14:29.614009929 +0200
|
||||||
|
@@ -189,7 +189,7 @@ int QUtf16Codec::heuristicContentMatch(c
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
-
|
||||||
|
+volatile const void *bomPointer = &QChar::byteOrderMark;
|
||||||
|
|
||||||
|
class QUtf16Encoder : public QTextEncoder {
|
||||||
|
bool headerdone;
|
||||||
|
@@ -209,7 +209,7 @@ public:
|
||||||
|
headerdone = TRUE;
|
||||||
|
len_in_out = (1+uc.length())*(int)sizeof(QChar);
|
||||||
|
QCString d(len_in_out);
|
||||||
|
- memcpy(d.rawData(),&QChar::byteOrderMark,sizeof(QChar));
|
||||||
|
+ memcpy(d.rawData(),(void *)bomPointer,sizeof(QChar));
|
||||||
|
memcpy(d.rawData()+sizeof(QChar),uc.unicode(),uc.length()*sizeof(QChar));
|
||||||
|
return d;
|
||||||
|
}
|
Loading…
Reference in New Issue