- Fix configure test compromised by LTO.

This commit is contained in:
Jeff Law 2020-05-26 14:52:36 -06:00
parent aa7ecd4f2d
commit 136ed1774f
2 changed files with 30 additions and 1 deletions

24
hugs98-config.patch Normal file
View File

@ -0,0 +1,24 @@
diff -Nrup a/configure b/configure
--- a/configure 2006-09-20 16:34:03.000000000 -0600
+++ b/configure 2019-12-19 06:07:54.302627575 -0700
@@ -11959,7 +11959,7 @@ cat >>conftest.$ac_ext <<_ACEOF
/* end confdefs.h. */
#include <malloc.h>
-int test1() {
+__attribute__ ((used)) int test1() {
return _alloca(42);
}
diff -Nrup a/configure.ac b/configure.ac
--- a/configure.ac 2006-05-03 08:10:36.000000000 -0600
+++ b/configure.ac 2019-12-19 06:07:27.468727400 -0700
@@ -451,7 +451,7 @@ dnl Visual C++ doesn't have alloca, does
AC_CACHE_CHECK(for _alloca, ac_cv_c__alloca,
[AC_TRY_LINK([
#include <malloc.h>
-int test1() {
+__attribute__ ((used)) int test1() {
return _alloca(42);
}
],

View File

@ -2,13 +2,14 @@
Name: hugs98
Version: 2006.09
Release: 37%{?dist}
Release: 38%{?dist}
Summary: Haskell Interpreter
License: BSD
URL: http://www.haskell.org/hugs
Source0: http://cvs.haskell.org/Hugs/downloads/2006-09/%{name}-%{hugs_ver}.tar.gz
Patch0: hugs98-gnu.patch
Patch1: hugs98-config.patch
BuildRequires: docbook-utils
BuildRequires: freeglut-devel
@ -100,6 +101,7 @@ Demo files for Hugs98.
%setup -q -n %{name}-%{hugs_ver}
# add undefined struct
%patch0 -p1 -b .gnu
%patch1 -p1 -b .config
# use inline keyword
sed -i 's|extern inline|inline|' packages/base/include/HsBase.h packages/network/include/HsNet.h packages/unix/include/HsUnix.h hsc2hs/Main.hs
# libalut needs libopenal
@ -189,6 +191,9 @@ sed -i "s|^bindir.*|bindir=\"%{_bindir}\"|
%changelog
* Tue May 26 2020 Jeff Law <law@redhat.com> - 2006.09-38
- Fix configure test compromised by LTO.
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 2006.09-37
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild