Add patch to support __float128

Related: rhbz#1915340
This commit is contained in:
Matthias Clasen 2021-04-27 09:00:45 -04:00
parent ae423de841
commit c17f038cc9
2 changed files with 39 additions and 1 deletions

View File

@ -0,0 +1,31 @@
From 60b0cf2fc2fdc74d13832d1fdde21cfdc813b84e Mon Sep 17 00:00:00 2001
From: Emmanuele Bassi <ebassi@gnome.org>
Date: Mon, 26 Apr 2021 10:59:52 +0100
Subject: [PATCH] scanner: Add more float types
The scanner is chocking on the `__float80` and `__float128` types that
are provided by GCC as extensions to ISO/IEC TS 18661-3:2015:
https://gcc.gnu.org/onlinedocs/gcc/Floating-Types.html
Fixes: #384
---
giscanner/scannerlexer.l | 2 ++
1 file changed, 2 insertions(+)
diff --git a/giscanner/scannerlexer.l b/giscanner/scannerlexer.l
index cfec4d58..b6cc6499 100644
--- a/giscanner/scannerlexer.l
+++ b/giscanner/scannerlexer.l
@@ -224,6 +224,8 @@ stringtext ([^\\\"])|(\\.)
"_Float32x" { return BASIC_TYPE; }
"_Float64x" { return BASIC_TYPE; }
"_Float128x" { return BASIC_TYPE; }
+"__float80" { return BASIC_TYPE; }
+"__float128" { return BASIC_TYPE; }
"for" { return FOR; }
"goto" { return GOTO; }
"if" { return IF; }
--
2.31.1

View File

@ -2,13 +2,15 @@
Name: gobject-introspection
Version: 1.68.0
Release: 2%{?dist}
Release: 3%{?dist}
Summary: Introspection system for GObject-based libraries
License: GPLv2+, LGPLv2+, MIT
URL: https://wiki.gnome.org/Projects/GObjectIntrospection
Source0: https://download.gnome.org/sources/gobject-introspection/1.68/%{name}-%{version}.tar.xz
Patch0: 0001-scanner-Add-more-float-types.patch
BuildRequires: gcc
BuildRequires: bison
BuildRequires: cairo-gobject-devel
@ -53,6 +55,7 @@ Libraries and headers for gobject-introspection
%prep
%autosetup -p1
%patch0 -p1 -b .float128
%build
%meson -Ddoctool=enabled -Dgtk_doc=true -Dpython=%{__python3}
@ -84,6 +87,10 @@ Libraries and headers for gobject-introspection
%{_mandir}/man1/g-ir-scanner.1*
%changelog
* Tue Apr 27 2010 Matthias Clasen <mclasen@redhat.com - 1.68.0-3
- Add upstream patch to support __float128 as used in graphene
- Related: rhbz#1915340
* Thu Apr 15 2021 Mohan Boddu <mboddu@redhat.com> - 1.68.0-2
- Rebuilt for RHEL 9 BETA on Apr 15th 2021. Related: rhbz#1947937