Silent miscompilation with GCC 14 due to C89 compatibility issue

Related to:

  <https://fedoraproject.org/wiki/Changes/PortingToModernC>
  <https://fedoraproject.org/wiki/Toolchain/PortingToModernC>
This commit is contained in:
Florian Weimer 2024-01-21 19:31:08 +01:00
parent 4c445e210b
commit 5f7167e287
2 changed files with 45 additions and 1 deletions

40
linuxdoc-tools-c89.patch Normal file
View File

@ -0,0 +1,40 @@
From f7b501c2dd7170d45f92a8678a84d2228cd9e6a4 Mon Sep 17 00:00:00 2001
From: rpm-build <rpm-build>
Date: Sun, 21 Jan 2024 19:29:25 +0100
Subject: [PATCH] Correct function prototype for signal handers in sgmls
configure
Content-type: text/plain
This avoids altering the outcome of the checks with GCC 14 and Clang 16.
Submitted upstream: <https://bugs.debian.org/1061266>
---
sgmls-1.1/configure | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sgmls-1.1/configure b/sgmls-1.1/configure
index e674d24..898b522 100755
--- a/sgmls-1.1/configure
+++ b/sgmls-1.1/configure
@@ -113,7 +113,7 @@ cat >doit.c <<\EOF
#include <stdlib.h>
#include <unistd.h>
-static int whoops()
+static void whoops(int signo)
{
_exit(1);
}
@@ -459,7 +459,7 @@ cat >doit.c <<\EOF
#include <unistd.h>
#include <string.h>
-static int whoops()
+static void whoops(int signo)
{
_exit(1);
}
--
2.43.0

View File

@ -5,12 +5,13 @@
Summary: A text formatting package based on SGML
Name: linuxdoc-tools
Version: 0.9.82
Release: 5%{?dist}
Release: 6%{?dist}
License: X11-distribute-modifications-variant
Source: http://http.us.debian.org/debian/pool/main/l/linuxdoc-tools/%{name}_%{version}.orig.tar.gz
Patch01: 0001-downstream-Changed-default-papersize-to-letter.patch
Patch02: 0002-downstream-Added-fix-to-have-lib64-in-perl-path-on-6.patch
Patch3: linuxdoc-tools-c99.patch
Patch4: linuxdoc-tools-c89.patch
Url: http://packages.qa.debian.org/l/linuxdoc-tools.html
BuildRequires: git gcc
BuildRequires: flex flex-static sgml-common jade gawk groff autoconf automake texinfo
@ -103,6 +104,9 @@ exit 0
%{_mandir}/*/*
%changelog
* Sun Jan 21 2024 Florian Weimer <fweimer@redhat.com> - 0.9.82-6
- Silent miscompilation with GCC 14 due to C89 compatibility issue
* Sun Jan 21 2024 Fedora Release Engineering <releng@fedoraproject.org> - 0.9.82-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild