[Git][haskell-team/DHG_packages][master] gtk2hs-buildtools: Add upstream patch to fix a gcc-11 build failure

Gianfranco Costamagna (@locutusofborg) gitlab at salsa.debian.org
Thu Mar 17 10:50:47 GMT 2022



Gianfranco Costamagna pushed to branch master at Debian Haskell Group / DHG_packages


Commits:
043031ca by Gianfranco Costamagna at 2022-03-17T11:50:11+01:00
gtk2hs-buildtools: Add upstream patch to fix a gcc-11 build failure

- - - - -


3 changed files:

- p/gtk2hs-buildtools/debian/changelog
- + p/gtk2hs-buildtools/debian/patches/304.patch
- p/gtk2hs-buildtools/debian/patches/series


Changes:

=====================================
p/gtk2hs-buildtools/debian/changelog
=====================================
@@ -1,3 +1,10 @@
+gtk2hs-buildtools (0.13.8.0-2) unstable; urgency=medium
+
+  * debian/patches/304.patch:
+    - cherry-pick upstream fix for gcc-11 (Closes: #1005806)
+
+ -- Gianfranco Costamagna <locutusofborg at debian.org>  Thu, 17 Mar 2022 11:48:35 +0100
+
 gtk2hs-buildtools (0.13.8.0-1) unstable; urgency=medium
 
   [ Sean Whitton ]


=====================================
p/gtk2hs-buildtools/debian/patches/304.patch
=====================================
@@ -0,0 +1,40 @@
+From f4e880b934a2ddcb7f65a68185a84043f2f152a7 Mon Sep 17 00:00:00 2001
+From: Felix Yan <felixonmars at archlinux.org>
+Date: Fri, 14 May 2021 21:28:55 +0800
+Subject: [PATCH] CLexer: allow zeros as line numbers in preprocessed
+ directives
+
+Starting from `gcc-11` initial line numbers not related to
+actual files are marked as zeros. See the "preprocessor:
+Better line info for <builtin> & <command-line>"
+https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=6bf2ff0d52a9
+
+language-c's grammar did not allow it (by accident)
+
+```
+Prelude> Language.C.parseC (Data.ByteString.Char8.pack "# 0 \"/dev/null\"\n") Language.C.nopos
+Left <no file>:: [ERROR]  >>> Syntax Error !
+  Lexical error !
+  The character '#' does not fit here.
+```
+
+The change allows '0' in line numbers as well.
+
+Backported from https://github.com/visq/language-c/commit/8133e1526750ab74ca4d5180fb140a7e172d473f
+---
+ c2hs/c/CLexer.x | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/c2hs/c/CLexer.x b/c2hs/c/CLexer.x
+index 0099af5c..9ed0bfba 100644
+--- a/c2hs/c/CLexer.x
++++ b/c2hs/c/CLexer.x
+@@ -130,7 +130,7 @@ $white+					;
+ --  * allows further ints after the file name a la GCC; as the GCC CPP docu
+ --   doesn't say how many ints there can be, we allow an unbound number
+ --
+-\#$space*@int$space*(\"($infname|@charesc)*\"$space*)?(@int$space*)*$eol
++\#$space*@digits$space*(\"($infname|@charesc)*\"$space*)?(@int$space*)*$eol
+   { \pos len str -> setPos (adjustPos (take len str) pos) >> lexToken }
+ 
+ -- #pragma directive (K&R A12.8)


=====================================
p/gtk2hs-buildtools/debian/patches/series
=====================================
@@ -1 +1,2 @@
 manpages.patch
+304.patch



View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/043031ca671fa2d87daf4cd5ca021f8e21a213bd

-- 
View it on GitLab: https://salsa.debian.org/haskell-team/DHG_packages/-/commit/043031ca671fa2d87daf4cd5ca021f8e21a213bd
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/pkg-haskell-commits/attachments/20220317/918a585c/attachment-0001.htm>


More information about the Pkg-haskell-commits mailing list